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 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  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.Feature", b =>
  249. {
  250. b.Property<string>("FeatureId")
  251. .ValueGeneratedOnAdd();
  252. b.Property<string>("Description");
  253. b.Property<bool>("Enabled");
  254. b.Property<string>("Name");
  255. b.HasKey("FeatureId");
  256. b.ToTable("Features");
  257. });
  258. modelBuilder.Entity("Teknik.Areas.Users.Models.InviteCode", b =>
  259. {
  260. b.Property<int>("InviteCodeId")
  261. .ValueGeneratedOnAdd()
  262. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  263. b.Property<bool>("Active");
  264. b.Property<int?>("ClaimedUserId");
  265. b.Property<string>("Code")
  266. .HasAnnotation("CaseSensitive", true);
  267. b.Property<int?>("OwnerId");
  268. b.HasKey("InviteCodeId");
  269. b.HasIndex("ClaimedUserId")
  270. .IsUnique()
  271. .HasFilter("[ClaimedUserId] IS NOT NULL");
  272. b.HasIndex("OwnerId");
  273. b.ToTable("InviteCodes");
  274. });
  275. modelBuilder.Entity("Teknik.Areas.Users.Models.User", b =>
  276. {
  277. b.Property<int>("UserId")
  278. .ValueGeneratedOnAdd()
  279. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  280. b.Property<string>("Username");
  281. b.HasKey("UserId");
  282. b.ToTable("Users");
  283. });
  284. modelBuilder.Entity("Teknik.Areas.Users.Models.UserFeature", b =>
  285. {
  286. b.Property<int>("UserFeatureId")
  287. .ValueGeneratedOnAdd()
  288. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  289. b.Property<string>("FeatureId");
  290. b.Property<int>("UserId");
  291. b.HasKey("UserFeatureId");
  292. b.HasIndex("FeatureId");
  293. b.HasIndex("UserId");
  294. b.ToTable("UserFeatures");
  295. });
  296. modelBuilder.Entity("Teknik.Areas.Vault.Models.Vault", b =>
  297. {
  298. b.Property<int>("VaultId")
  299. .ValueGeneratedOnAdd()
  300. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  301. b.Property<DateTime>("DateCreated");
  302. b.Property<DateTime>("DateEdited");
  303. b.Property<string>("Description");
  304. b.Property<string>("Title");
  305. b.Property<string>("Url");
  306. b.Property<int?>("UserId");
  307. b.Property<int>("Views");
  308. b.HasKey("VaultId");
  309. b.HasIndex("UserId");
  310. b.ToTable("Vaults");
  311. });
  312. modelBuilder.Entity("Teknik.Areas.Vault.Models.VaultItem", b =>
  313. {
  314. b.Property<int>("VaultItemId")
  315. .ValueGeneratedOnAdd()
  316. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  317. b.Property<DateTime>("DateAdded");
  318. b.Property<string>("Description");
  319. b.Property<string>("Discriminator")
  320. .IsRequired();
  321. b.Property<int>("Index");
  322. b.Property<string>("Title");
  323. b.Property<int>("VaultId");
  324. b.HasKey("VaultItemId");
  325. b.HasIndex("VaultId");
  326. b.ToTable("VaultItems");
  327. b.HasDiscriminator<string>("Discriminator").HasValue("VaultItem");
  328. });
  329. modelBuilder.Entity("Teknik.Areas.Vault.Models.PasteVaultItem", b =>
  330. {
  331. b.HasBaseType("Teknik.Areas.Vault.Models.VaultItem");
  332. b.Property<int>("PasteId");
  333. b.HasIndex("PasteId");
  334. b.HasDiscriminator().HasValue("PasteVaultItem");
  335. });
  336. modelBuilder.Entity("Teknik.Areas.Vault.Models.UploadVaultItem", b =>
  337. {
  338. b.HasBaseType("Teknik.Areas.Vault.Models.VaultItem");
  339. b.Property<int>("UploadId");
  340. b.HasIndex("UploadId");
  341. b.HasDiscriminator().HasValue("UploadVaultItem");
  342. });
  343. modelBuilder.Entity("Teknik.Areas.Blog.Models.Blog", b =>
  344. {
  345. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  346. .WithMany()
  347. .HasForeignKey("UserId")
  348. .OnDelete(DeleteBehavior.Cascade);
  349. });
  350. modelBuilder.Entity("Teknik.Areas.Blog.Models.BlogPost", b =>
  351. {
  352. b.HasOne("Teknik.Areas.Blog.Models.Blog", "Blog")
  353. .WithMany("BlogPosts")
  354. .HasForeignKey("BlogId")
  355. .OnDelete(DeleteBehavior.Cascade);
  356. });
  357. modelBuilder.Entity("Teknik.Areas.Blog.Models.BlogPostComment", b =>
  358. {
  359. b.HasOne("Teknik.Areas.Blog.Models.BlogPost", "BlogPost")
  360. .WithMany("Comments")
  361. .HasForeignKey("BlogPostId")
  362. .OnDelete(DeleteBehavior.Cascade);
  363. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  364. .WithMany()
  365. .HasForeignKey("UserId");
  366. });
  367. modelBuilder.Entity("Teknik.Areas.Blog.Models.BlogPostTag", b =>
  368. {
  369. b.HasOne("Teknik.Areas.Blog.Models.BlogPost", "BlogPost")
  370. .WithMany("Tags")
  371. .HasForeignKey("BlogPostId")
  372. .OnDelete(DeleteBehavior.Cascade);
  373. });
  374. modelBuilder.Entity("Teknik.Areas.Paste.Models.Paste", b =>
  375. {
  376. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  377. .WithMany("Pastes")
  378. .HasForeignKey("UserId");
  379. });
  380. modelBuilder.Entity("Teknik.Areas.Podcast.Models.PodcastComment", b =>
  381. {
  382. b.HasOne("Teknik.Areas.Podcast.Models.Podcast", "Podcast")
  383. .WithMany("Comments")
  384. .HasForeignKey("PodcastId")
  385. .OnDelete(DeleteBehavior.Cascade);
  386. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  387. .WithMany()
  388. .HasForeignKey("UserId")
  389. .OnDelete(DeleteBehavior.Cascade);
  390. });
  391. modelBuilder.Entity("Teknik.Areas.Podcast.Models.PodcastFile", b =>
  392. {
  393. b.HasOne("Teknik.Areas.Podcast.Models.Podcast", "Podcast")
  394. .WithMany("Files")
  395. .HasForeignKey("PodcastId")
  396. .OnDelete(DeleteBehavior.Cascade);
  397. });
  398. modelBuilder.Entity("Teknik.Areas.Podcast.Models.PodcastTag", b =>
  399. {
  400. b.HasOne("Teknik.Areas.Podcast.Models.Podcast", "Podcast")
  401. .WithMany("Tags")
  402. .HasForeignKey("PodcastId")
  403. .OnDelete(DeleteBehavior.Cascade);
  404. });
  405. modelBuilder.Entity("Teknik.Areas.Shortener.Models.ShortenedUrl", b =>
  406. {
  407. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  408. .WithMany("ShortenedUrls")
  409. .HasForeignKey("UserId");
  410. });
  411. modelBuilder.Entity("Teknik.Areas.Upload.Models.Upload", b =>
  412. {
  413. b.HasOne("Teknik.Areas.Stats.Models.Takedown")
  414. .WithMany("Attachments")
  415. .HasForeignKey("Takedown_TakedownId");
  416. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  417. .WithMany("Uploads")
  418. .HasForeignKey("UserId");
  419. });
  420. modelBuilder.Entity("Teknik.Areas.Users.Models.InviteCode", b =>
  421. {
  422. b.HasOne("Teknik.Areas.Users.Models.User", "ClaimedUser")
  423. .WithOne("ClaimedInviteCode")
  424. .HasForeignKey("Teknik.Areas.Users.Models.InviteCode", "ClaimedUserId");
  425. b.HasOne("Teknik.Areas.Users.Models.User", "Owner")
  426. .WithMany("OwnedInviteCodes")
  427. .HasForeignKey("OwnerId");
  428. });
  429. modelBuilder.Entity("Teknik.Areas.Users.Models.User", b =>
  430. {
  431. b.OwnsOne("Teknik.Areas.Users.Models.BlogSettings", "BlogSettings", b1 =>
  432. {
  433. b1.Property<int>("UserId")
  434. .ValueGeneratedOnAdd()
  435. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  436. b1.Property<string>("Description")
  437. .HasColumnName("Description");
  438. b1.Property<string>("Title")
  439. .HasColumnName("Title");
  440. b1.HasKey("UserId");
  441. b1.ToTable("Users");
  442. b1.HasOne("Teknik.Areas.Users.Models.User")
  443. .WithOne("BlogSettings")
  444. .HasForeignKey("Teknik.Areas.Users.Models.BlogSettings", "UserId")
  445. .OnDelete(DeleteBehavior.Cascade);
  446. });
  447. b.OwnsOne("Teknik.Areas.Users.Models.UploadSettings", "UploadSettings", b1 =>
  448. {
  449. b1.Property<int>("UserId")
  450. .ValueGeneratedOnAdd()
  451. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  452. b1.Property<bool>("Encrypt")
  453. .HasColumnName("Encrypt");
  454. b1.Property<int>("ExpirationLength")
  455. .HasColumnName("ExpirationLength");
  456. b1.Property<int>("ExpirationUnit")
  457. .HasColumnName("ExpirationUnit");
  458. b1.HasKey("UserId");
  459. b1.ToTable("Users");
  460. b1.HasOne("Teknik.Areas.Users.Models.User")
  461. .WithOne("UploadSettings")
  462. .HasForeignKey("Teknik.Areas.Users.Models.UploadSettings", "UserId")
  463. .OnDelete(DeleteBehavior.Cascade);
  464. });
  465. b.OwnsOne("Teknik.Areas.Users.Models.UserSettings", "UserSettings", b1 =>
  466. {
  467. b1.Property<int>("UserId")
  468. .ValueGeneratedOnAdd()
  469. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  470. b1.Property<string>("About")
  471. .HasColumnName("About");
  472. b1.Property<string>("Quote")
  473. .HasColumnName("Quote");
  474. b1.Property<string>("Website")
  475. .HasColumnName("Website");
  476. b1.HasKey("UserId");
  477. b1.ToTable("Users");
  478. b1.HasOne("Teknik.Areas.Users.Models.User")
  479. .WithOne("UserSettings")
  480. .HasForeignKey("Teknik.Areas.Users.Models.UserSettings", "UserId")
  481. .OnDelete(DeleteBehavior.Cascade);
  482. });
  483. });
  484. modelBuilder.Entity("Teknik.Areas.Users.Models.UserFeature", b =>
  485. {
  486. b.HasOne("Teknik.Areas.Users.Models.Feature", "Feature")
  487. .WithMany()
  488. .HasForeignKey("FeatureId");
  489. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  490. .WithMany("Features")
  491. .HasForeignKey("UserId")
  492. .OnDelete(DeleteBehavior.Cascade);
  493. });
  494. modelBuilder.Entity("Teknik.Areas.Vault.Models.Vault", b =>
  495. {
  496. b.HasOne("Teknik.Areas.Users.Models.User", "User")
  497. .WithMany("Vaults")
  498. .HasForeignKey("UserId");
  499. });
  500. modelBuilder.Entity("Teknik.Areas.Vault.Models.VaultItem", b =>
  501. {
  502. b.HasOne("Teknik.Areas.Vault.Models.Vault", "Vault")
  503. .WithMany("VaultItems")
  504. .HasForeignKey("VaultId")
  505. .OnDelete(DeleteBehavior.Cascade);
  506. });
  507. modelBuilder.Entity("Teknik.Areas.Vault.Models.PasteVaultItem", b =>
  508. {
  509. b.HasOne("Teknik.Areas.Paste.Models.Paste", "Paste")
  510. .WithMany("PasteVaultItems")
  511. .HasForeignKey("PasteId")
  512. .OnDelete(DeleteBehavior.Cascade);
  513. });
  514. modelBuilder.Entity("Teknik.Areas.Vault.Models.UploadVaultItem", b =>
  515. {
  516. b.HasOne("Teknik.Areas.Upload.Models.Upload", "Upload")
  517. .WithMany("UploadVaultItems")
  518. .HasForeignKey("UploadId")
  519. .OnDelete(DeleteBehavior.Cascade);
  520. });
  521. #pragma warning restore 612, 618
  522. }
  523. }
  524. }