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.

20190116060104_UploadExpirationSettings.Designer.cs 26KB

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