The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TeknikEntitiesModelSnapshot.cs 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. // <auto-generated />
  2. using System;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore.Infrastructure;
  5. using Microsoft.EntityFrameworkCore.Metadata;
  6. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  7. using Teknik.Data;
  8. namespace Teknik.Data.Migrations
  9. {
  10. [DbContext(typeof(TeknikEntities))]
  11. partial class TeknikEntitiesModelSnapshot : ModelSnapshot
  12. {
  13. protected override void BuildModel(ModelBuilder modelBuilder)
  14. {
  15. #pragma warning disable 612, 618
  16. modelBuilder
  17. .HasAnnotation("ProductVersion", "2.2.0-preview3-35497")
  18. .HasAnnotation("Relational:MaxIdentifierLength", 128)
  19. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  20. modelBuilder.Entity("Teknik.Areas.Blog.Models.Blog", b =>
  21. {
  22. b.Property<int>("BlogId")
  23. .ValueGeneratedOnAdd()
  24. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  25. b.Property<int>("UserId");
  26. b.HasKey("BlogId");
  27. b.HasIndex("UserId");
  28. b.ToTable("Blogs");
  29. });
  30. modelBuilder.Entity("Teknik.Areas.Blog.Models.BlogPost", b =>
  31. {
  32. b.Property<int>("BlogPostId")
  33. .ValueGeneratedOnAdd()
  34. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  35. b.Property<string>("Article");
  36. b.Property<int>("BlogId");
  37. b.Property<DateTime>("DateEdited");
  38. b.Property<DateTime>("DatePosted");
  39. b.Property<DateTime>("DatePublished");
  40. b.Property<bool>("Published");
  41. b.Property<bool>("System");
  42. b.Property<string>("Title");
  43. b.HasKey("BlogPostId");
  44. b.HasIndex("BlogId");
  45. b.ToTable("BlogPosts");
  46. });
  47. modelBuilder.Entity("Teknik.Areas.Blog.Models.BlogPostComment", b =>
  48. {
  49. b.Property<int>("BlogPostCommentId")
  50. .ValueGeneratedOnAdd()
  51. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  52. b.Property<string>("Article");
  53. b.Property<int>("BlogPostId");
  54. b.Property<DateTime>("DateEdited");
  55. b.Property<DateTime>("DatePosted");
  56. b.Property<int?>("UserId");
  57. b.HasKey("BlogPostCommentId");
  58. b.HasIndex("BlogPostId");
  59. b.HasIndex("UserId");
  60. b.ToTable("BlogPostComments");
  61. });
  62. modelBuilder.Entity("Teknik.Areas.Blog.Models.BlogPostTag", b =>
  63. {
  64. b.Property<int>("BlogPostTagId")
  65. .ValueGeneratedOnAdd()
  66. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  67. b.Property<int>("BlogPostId");
  68. b.Property<string>("Description");
  69. b.Property<string>("Name");
  70. b.HasKey("BlogPostTagId");
  71. b.HasIndex("BlogPostId");
  72. b.ToTable("BlogPostTags");
  73. });
  74. modelBuilder.Entity("Teknik.Areas.Contact.Models.Contact", b =>
  75. {
  76. b.Property<int>("ContactId")
  77. .ValueGeneratedOnAdd()
  78. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  79. b.Property<DateTime>("DateAdded");
  80. b.Property<string>("Email");
  81. b.Property<string>("Message");
  82. b.Property<string>("Name");
  83. b.Property<string>("Subject");
  84. b.HasKey("ContactId");
  85. b.ToTable("Contact");
  86. });
  87. modelBuilder.Entity("Teknik.Areas.Paste.Models.Paste", b =>
  88. {
  89. b.Property<int>("PasteId")
  90. .ValueGeneratedOnAdd()
  91. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  92. b.Property<int>("BlockSize");
  93. b.Property<string>("Content");
  94. b.Property<DateTime>("DateEdited");
  95. b.Property<DateTime>("DatePosted");
  96. b.Property<string>("DeleteKey")
  97. .HasAnnotation("CaseSensitive", true);
  98. b.Property<DateTime?>("ExpireDate");
  99. b.Property<string>("FileName")
  100. .HasAnnotation("CaseSensitive", true);
  101. b.Property<string>("HashedPassword")
  102. .HasAnnotation("CaseSensitive", true);
  103. b.Property<string>("IV")
  104. .HasAnnotation("CaseSensitive", true);
  105. b.Property<string>("Key")
  106. .HasAnnotation("CaseSensitive", true);
  107. b.Property<int>("KeySize");
  108. b.Property<int>("MaxViews");
  109. b.Property<string>("Syntax");
  110. b.Property<string>("Title");
  111. b.Property<string>("Url")
  112. .HasAnnotation("CaseSensitive", true);
  113. b.Property<int?>("UserId");
  114. b.Property<int>("Views");
  115. b.HasKey("PasteId");
  116. b.HasIndex("UserId");
  117. b.ToTable("Pastes");
  118. });
  119. modelBuilder.Entity("Teknik.Areas.Podcast.Models.Podcast", b =>
  120. {
  121. b.Property<int>("PodcastId")
  122. .ValueGeneratedOnAdd()
  123. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  124. b.Property<DateTime>("DateEdited");
  125. b.Property<DateTime>("DatePosted");
  126. b.Property<DateTime>("DatePublished");
  127. b.Property<string>("Description");
  128. b.Property<int>("Episode");
  129. b.Property<bool>("Published");
  130. b.Property<string>("Title");
  131. b.HasKey("PodcastId");
  132. b.ToTable("Podcasts");
  133. });
  134. modelBuilder.Entity("Teknik.Areas.Podcast.Models.PodcastComment", b =>
  135. {
  136. b.Property<int>("PodcastCommentId")
  137. .ValueGeneratedOnAdd()
  138. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  139. b.Property<string>("Article");
  140. b.Property<DateTime>("DateEdited");
  141. b.Property<DateTime>("DatePosted");
  142. b.Property<int>("PodcastId");
  143. b.Property<int>("UserId");
  144. b.HasKey("PodcastCommentId");
  145. b.HasIndex("PodcastId");
  146. b.HasIndex("UserId");
  147. b.ToTable("PodcastComments");
  148. });
  149. modelBuilder.Entity("Teknik.Areas.Podcast.Models.PodcastFile", b =>
  150. {
  151. b.Property<int>("PodcastFileId")
  152. .ValueGeneratedOnAdd()
  153. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  154. b.Property<long>("ContentLength");
  155. b.Property<string>("ContentType");
  156. b.Property<string>("FileName");
  157. b.Property<string>("Path");
  158. b.Property<int>("PodcastId");
  159. b.Property<int>("Size");
  160. b.HasKey("PodcastFileId");
  161. b.HasIndex("PodcastId");
  162. b.ToTable("PodcastFiles");
  163. });
  164. modelBuilder.Entity("Teknik.Areas.Podcast.Models.PodcastTag", b =>
  165. {
  166. b.Property<int>("PodcastTagId")
  167. .ValueGeneratedOnAdd()
  168. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  169. b.Property<string>("Description");
  170. b.Property<string>("Name");
  171. b.Property<int>("PodcastId");
  172. b.HasKey("PodcastTagId");
  173. b.HasIndex("PodcastId");
  174. b.ToTable("PodcastTags");
  175. });
  176. modelBuilder.Entity("Teknik.Areas.Shortener.Models.ShortenedUrl", b =>
  177. {
  178. b.Property<int>("ShortenedUrlId")
  179. .ValueGeneratedOnAdd()
  180. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  181. b.Property<DateTime>("DateAdded");
  182. b.Property<string>("OriginalUrl");
  183. b.Property<string>("ShortUrl")
  184. .HasAnnotation("CaseSensitive", true);
  185. b.Property<int?>("UserId");
  186. b.Property<int>("Views");
  187. b.HasKey("ShortenedUrlId");
  188. b.HasIndex("UserId");
  189. b.ToTable("ShortenedUrls");
  190. });
  191. modelBuilder.Entity("Teknik.Areas.Stats.Models.Takedown", b =>
  192. {
  193. b.Property<int>("TakedownId")
  194. .ValueGeneratedOnAdd()
  195. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  196. b.Property<string>("ActionTaken");
  197. b.Property<DateTime>("DateActionTaken");
  198. b.Property<DateTime>("DateRequested");
  199. b.Property<string>("Reason");
  200. b.Property<string>("Requester");
  201. b.Property<string>("RequesterContact");
  202. b.HasKey("TakedownId");
  203. b.ToTable("Takedowns");
  204. });
  205. modelBuilder.Entity("Teknik.Areas.Stats.Models.Transaction", b =>
  206. {
  207. b.Property<int>("TransactionId")
  208. .ValueGeneratedOnAdd()
  209. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  210. b.Property<decimal>("Amount")
  211. .HasColumnType("decimal(19, 5)");
  212. b.Property<int>("Currency");
  213. b.Property<DateTime>("DateSent");
  214. b.Property<string>("Reason");
  215. b.HasKey("TransactionId");
  216. b.ToTable("Transactions");
  217. });
  218. modelBuilder.Entity("Teknik.Areas.Upload.Models.Upload", b =>
  219. {
  220. b.Property<int>("UploadId")
  221. .ValueGeneratedOnAdd()
  222. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  223. b.Property<int>("BlockSize");
  224. b.Property<long>("ContentLength");
  225. b.Property<string>("ContentType");
  226. b.Property<DateTime>("DateUploaded");
  227. b.Property<string>("DeleteKey")
  228. .HasAnnotation("CaseSensitive", true);
  229. b.Property<int>("Downloads");
  230. b.Property<DateTime?>("ExpireDate");
  231. b.Property<string>("FileName")
  232. .HasAnnotation("CaseSensitive", true);
  233. b.Property<string>("IV")
  234. .HasAnnotation("CaseSensitive", true);
  235. b.Property<string>("Key")
  236. .HasAnnotation("CaseSensitive", true);
  237. b.Property<int>("KeySize");
  238. b.Property<int>("MaxDownloads");
  239. b.Property<int?>("Takedown_TakedownId");
  240. b.Property<string>("Url")
  241. .HasAnnotation("CaseSensitive", true);
  242. b.Property<int?>("UserId");
  243. b.HasKey("UploadId");
  244. b.HasIndex("Takedown_TakedownId");
  245. b.HasIndex("UserId");
  246. b.ToTable("Uploads");
  247. });
  248. modelBuilder.Entity("Teknik.Areas.Users.Models.InviteCode", b =>
  249. {
  250. b.Property<int>("InviteCodeId")
  251. .ValueGeneratedOnAdd()
  252. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  253. b.Property<bool>("Active");
  254. b.Property<int?>("ClaimedUserId");
  255. b.Property<string>("Code")
  256. .HasAnnotation("CaseSensitive", true);
  257. b.Property<int?>("OwnerId");
  258. b.HasKey("InviteCodeId");
  259. b.HasIndex("ClaimedUserId")
  260. .IsUnique()
  261. .HasFilter("[ClaimedUserId] IS NOT NULL");
  262. b.HasIndex("OwnerId");
  263. b.ToTable("InviteCodes");
  264. });
  265. modelBuilder.Entity("Teknik.Areas.Users.Models.LoginInfo", b =>
  266. {
  267. b.Property<int>("LoginInfoId")
  268. .ValueGeneratedOnAdd()
  269. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  270. b.Property<string>("LoginProvider");
  271. b.Property<string>("ProviderDisplayName");
  272. b.Property<string>("ProviderKey");
  273. b.Property<int>("UserId");
  274. b.HasKey("LoginInfoId");
  275. b.HasIndex("UserId");
  276. b.ToTable("UserLogins");
  277. });
  278. modelBuilder.Entity("Teknik.Areas.Users.Models.User", b =>
  279. {
  280. b.Property<int>("UserId")
  281. .ValueGeneratedOnAdd()
  282. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  283. b.Property<string>("Username");
  284. b.HasKey("UserId");
  285. b.ToTable("Users");
  286. });
  287. modelBuilder.Entity("Teknik.Areas.Vault.Models.Vault", b =>
  288. {
  289. b.Property<int>("VaultId")
  290. .ValueGeneratedOnAdd()
  291. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  292. b.Property<DateTime>("DateCreated");
  293. b.Property<DateTime>("DateEdited");
  294. b.Property<string>("Description");
  295. b.Property<string>("Title");
  296. b.Property<string>("Url");
  297. b.Property<int?>("UserId");
  298. b.Property<int>("Views");
  299. b.HasKey("VaultId");
  300. b.HasIndex("UserId");
  301. b.ToTable("Vaults");
  302. });
  303. modelBuilder.Entity("Teknik.Areas.Vault.Models.VaultItem", b =>
  304. {
  305. b.Property<int>("VaultItemId")
  306. .ValueGeneratedOnAdd()
  307. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  308. b.Property<DateTime>("DateAdded");
  309. b.Property<string>("Description");
  310. b.Property<string>("Discriminator")
  311. .IsRequired();
  312. b.Property<string>("Title");
  313. b.Property<int>("VaultId");
  314. b.HasKey("VaultItemId");
  315. b.HasIndex("VaultId");
  316. b.ToTable("VaultItems");
  317. b.HasDiscriminator<string>("Discriminator").HasValue("VaultItem");
  318. });
  319. modelBuilder.Entity("Teknik.Areas.Vault.Models.PasteVaultItem", b =>
  320. {
  321. b.HasBaseType("Teknik.Areas.Vault.Models.VaultItem");
  322. b.Property<int>("PasteId");
  323. b.HasIndex("PasteId");
  324. b.HasDiscriminator().HasValue("PasteVaultItem");
  325. });
  326. modelBuilder.Entity("Teknik.Areas.Vault.Models.UploadVaultItem", b =>
  327. {
  328. b.HasBaseType("Teknik.Areas.Vault.Models.VaultItem");
  329. b.Property<int>("UploadId");
  330. b.HasIndex("UploadId");
  331. b.HasDiscriminator().HasValue("UploadVaultItem");
  332. });
  333. modelBuilder.Entity("Teknik.Areas.Blog.Models.Blog", b =>
  334. {
  335. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  336. .WithMany()
  337. .HasForeignKey("UserId")
  338. .OnDelete(DeleteBehavior.Cascade);
  339. });
  340. modelBuilder.Entity("Teknik.Areas.Blog.Models.BlogPost", b =>
  341. {
  342. b.HasOne("Teknik.Areas.Blog.Models.Blog", "Blog")
  343. .WithMany("BlogPosts")
  344. .HasForeignKey("BlogId")
  345. .OnDelete(DeleteBehavior.Cascade);
  346. });
  347. modelBuilder.Entity("Teknik.Areas.Blog.Models.BlogPostComment", b =>
  348. {
  349. b.HasOne("Teknik.Areas.Blog.Models.BlogPost", "BlogPost")
  350. .WithMany("Comments")
  351. .HasForeignKey("BlogPostId")
  352. .OnDelete(DeleteBehavior.Cascade);
  353. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  354. .WithMany()
  355. .HasForeignKey("UserId");
  356. });
  357. modelBuilder.Entity("Teknik.Areas.Blog.Models.BlogPostTag", b =>
  358. {
  359. b.HasOne("Teknik.Areas.Blog.Models.BlogPost", "BlogPost")
  360. .WithMany("Tags")
  361. .HasForeignKey("BlogPostId")
  362. .OnDelete(DeleteBehavior.Cascade);
  363. });
  364. modelBuilder.Entity("Teknik.Areas.Paste.Models.Paste", b =>
  365. {
  366. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  367. .WithMany("Pastes")
  368. .HasForeignKey("UserId");
  369. });
  370. modelBuilder.Entity("Teknik.Areas.Podcast.Models.PodcastComment", b =>
  371. {
  372. b.HasOne("Teknik.Areas.Podcast.Models.Podcast", "Podcast")
  373. .WithMany("Comments")
  374. .HasForeignKey("PodcastId")
  375. .OnDelete(DeleteBehavior.Cascade);
  376. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  377. .WithMany()
  378. .HasForeignKey("UserId")
  379. .OnDelete(DeleteBehavior.Cascade);
  380. });
  381. modelBuilder.Entity("Teknik.Areas.Podcast.Models.PodcastFile", b =>
  382. {
  383. b.HasOne("Teknik.Areas.Podcast.Models.Podcast", "Podcast")
  384. .WithMany("Files")
  385. .HasForeignKey("PodcastId")
  386. .OnDelete(DeleteBehavior.Cascade);
  387. });
  388. modelBuilder.Entity("Teknik.Areas.Podcast.Models.PodcastTag", b =>
  389. {
  390. b.HasOne("Teknik.Areas.Podcast.Models.Podcast", "Podcast")
  391. .WithMany("Tags")
  392. .HasForeignKey("PodcastId")
  393. .OnDelete(DeleteBehavior.Cascade);
  394. });
  395. modelBuilder.Entity("Teknik.Areas.Shortener.Models.ShortenedUrl", b =>
  396. {
  397. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  398. .WithMany("ShortenedUrls")
  399. .HasForeignKey("UserId");
  400. });
  401. modelBuilder.Entity("Teknik.Areas.Upload.Models.Upload", b =>
  402. {
  403. b.HasOne("Teknik.Areas.Stats.Models.Takedown")
  404. .WithMany("Attachments")
  405. .HasForeignKey("Takedown_TakedownId");
  406. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  407. .WithMany("Uploads")
  408. .HasForeignKey("UserId");
  409. });
  410. modelBuilder.Entity("Teknik.Areas.Users.Models.InviteCode", b =>
  411. {
  412. b.HasOne("Teknik.Areas.Users.Models.User", "ClaimedUser")
  413. .WithOne("ClaimedInviteCode")
  414. .HasForeignKey("Teknik.Areas.Users.Models.InviteCode", "ClaimedUserId");
  415. b.HasOne("Teknik.Areas.Users.Models.User", "Owner")
  416. .WithMany("OwnedInviteCodes")
  417. .HasForeignKey("OwnerId");
  418. });
  419. modelBuilder.Entity("Teknik.Areas.Users.Models.LoginInfo", b =>
  420. {
  421. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  422. .WithMany("Logins")
  423. .HasForeignKey("UserId")
  424. .OnDelete(DeleteBehavior.Cascade);
  425. });
  426. modelBuilder.Entity("Teknik.Areas.Users.Models.User", b =>
  427. {
  428. b.OwnsOne("Teknik.Areas.Users.Models.BlogSettings", "BlogSettings", b1 =>
  429. {
  430. b1.Property<int>("UserId")
  431. .ValueGeneratedOnAdd()
  432. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  433. b1.Property<string>("Description")
  434. .HasColumnName("Description");
  435. b1.Property<string>("Title")
  436. .HasColumnName("Title");
  437. b1.HasKey("UserId");
  438. b1.ToTable("Users");
  439. b1.HasOne("Teknik.Areas.Users.Models.User")
  440. .WithOne("BlogSettings")
  441. .HasForeignKey("Teknik.Areas.Users.Models.BlogSettings", "UserId")
  442. .OnDelete(DeleteBehavior.Cascade);
  443. });
  444. b.OwnsOne("Teknik.Areas.Users.Models.UploadSettings", "UploadSettings", b1 =>
  445. {
  446. b1.Property<int>("UserId")
  447. .ValueGeneratedOnAdd()
  448. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  449. b1.Property<bool>("Encrypt")
  450. .HasColumnName("Encrypt");
  451. b1.Property<int>("ExpirationLength")
  452. .HasColumnName("ExpirationLength");
  453. b1.Property<int>("ExpirationUnit")
  454. .HasColumnName("ExpirationUnit");
  455. b1.HasKey("UserId");
  456. b1.ToTable("Users");
  457. b1.HasOne("Teknik.Areas.Users.Models.User")
  458. .WithOne("UploadSettings")
  459. .HasForeignKey("Teknik.Areas.Users.Models.UploadSettings", "UserId")
  460. .OnDelete(DeleteBehavior.Cascade);
  461. });
  462. b.OwnsOne("Teknik.Areas.Users.Models.UserSettings", "UserSettings", b1 =>
  463. {
  464. b1.Property<int>("UserId")
  465. .ValueGeneratedOnAdd()
  466. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  467. b1.Property<string>("About")
  468. .HasColumnName("About");
  469. b1.Property<string>("Quote")
  470. .HasColumnName("Quote");
  471. b1.Property<string>("Website")
  472. .HasColumnName("Website");
  473. b1.HasKey("UserId");
  474. b1.ToTable("Users");
  475. b1.HasOne("Teknik.Areas.Users.Models.User")
  476. .WithOne("UserSettings")
  477. .HasForeignKey("Teknik.Areas.Users.Models.UserSettings", "UserId")
  478. .OnDelete(DeleteBehavior.Cascade);
  479. });
  480. });
  481. modelBuilder.Entity("Teknik.Areas.Vault.Models.Vault", b =>
  482. {
  483. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  484. .WithMany("Vaults")
  485. .HasForeignKey("UserId");
  486. });
  487. modelBuilder.Entity("Teknik.Areas.Vault.Models.VaultItem", b =>
  488. {
  489. b.HasOne("Teknik.Areas.Vault.Models.Vault", "Vault")
  490. .WithMany("VaultItems")
  491. .HasForeignKey("VaultId")
  492. .OnDelete(DeleteBehavior.Cascade);
  493. });
  494. modelBuilder.Entity("Teknik.Areas.Vault.Models.PasteVaultItem", b =>
  495. {
  496. b.HasOne("Teknik.Areas.Paste.Models.Paste", "Paste")
  497. .WithMany("PasteVaultItems")
  498. .HasForeignKey("PasteId")
  499. .OnDelete(DeleteBehavior.Cascade);
  500. });
  501. modelBuilder.Entity("Teknik.Areas.Vault.Models.UploadVaultItem", b =>
  502. {
  503. b.HasOne("Teknik.Areas.Upload.Models.Upload", "Upload")
  504. .WithMany("UploadVaultItems")
  505. .HasForeignKey("UploadId")
  506. .OnDelete(DeleteBehavior.Cascade);
  507. });
  508. #pragma warning restore 612, 618
  509. }
  510. }
  511. }