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.

20200121080120_MaxUploadStorage.Designer.cs 27KB

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