Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

20221101095111_AddedTechnology.Designer.cs 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. // <auto-generated />
  2. using System;
  3. using Diligent.WebAPI.Data;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Metadata;
  7. using Microsoft.EntityFrameworkCore.Migrations;
  8. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  9. #nullable disable
  10. namespace Diligent.WebAPI.Data.Migrations
  11. {
  12. [DbContext(typeof(DatabaseContext))]
  13. [Migration("20221101095111_AddedTechnology")]
  14. partial class AddedTechnology
  15. {
  16. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  17. {
  18. #pragma warning disable 612, 618
  19. modelBuilder
  20. .HasAnnotation("ProductVersion", "6.0.10")
  21. .HasAnnotation("Relational:MaxIdentifierLength", 128);
  22. SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
  23. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b =>
  24. {
  25. b.Property<int>("ApplicantId")
  26. .ValueGeneratedOnAdd()
  27. .HasColumnType("int");
  28. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ApplicantId"), 1L, 1);
  29. b.Property<string>("ApplicationChannel")
  30. .HasColumnType("nvarchar(max)");
  31. b.Property<string>("BitBucketLink")
  32. .HasColumnType("nvarchar(max)");
  33. b.Property<string>("CV")
  34. .IsRequired()
  35. .HasColumnType("nvarchar(max)");
  36. b.Property<DateTime>("DateOfApplication")
  37. .HasColumnType("datetime2");
  38. b.Property<string>("Email")
  39. .IsRequired()
  40. .HasMaxLength(128)
  41. .HasColumnType("nvarchar(128)");
  42. b.Property<int>("Experience")
  43. .HasColumnType("int");
  44. b.Property<string>("FirstName")
  45. .IsRequired()
  46. .HasMaxLength(128)
  47. .HasColumnType("nvarchar(128)");
  48. b.Property<string>("GithubLink")
  49. .HasColumnType("nvarchar(max)");
  50. b.Property<string>("LastName")
  51. .IsRequired()
  52. .HasMaxLength(128)
  53. .HasColumnType("nvarchar(128)");
  54. b.Property<string>("LinkedlnLink")
  55. .HasColumnType("nvarchar(max)");
  56. b.Property<string>("PhoneNumber")
  57. .IsRequired()
  58. .HasMaxLength(30)
  59. .HasColumnType("nvarchar(30)");
  60. b.Property<string>("Position")
  61. .IsRequired()
  62. .HasMaxLength(128)
  63. .HasColumnType("nvarchar(128)");
  64. b.HasKey("ApplicantId");
  65. b.ToTable("Applicants");
  66. });
  67. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.AppRole", b =>
  68. {
  69. b.Property<int>("Id")
  70. .ValueGeneratedOnAdd()
  71. .HasColumnType("int");
  72. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  73. b.Property<string>("ConcurrencyStamp")
  74. .IsConcurrencyToken()
  75. .HasColumnType("nvarchar(max)");
  76. b.Property<string>("Name")
  77. .HasMaxLength(256)
  78. .HasColumnType("nvarchar(256)");
  79. b.Property<string>("NormalizedName")
  80. .HasMaxLength(256)
  81. .HasColumnType("nvarchar(256)");
  82. b.HasKey("Id");
  83. b.HasIndex("NormalizedName")
  84. .IsUnique()
  85. .HasDatabaseName("RoleNameIndex")
  86. .HasFilter("[NormalizedName] IS NOT NULL");
  87. b.ToTable("AspNetRoles", (string)null);
  88. });
  89. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b =>
  90. {
  91. b.Property<long>("Id")
  92. .ValueGeneratedOnAdd()
  93. .HasColumnType("bigint");
  94. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  95. b.Property<string>("City")
  96. .IsRequired()
  97. .HasColumnType("nvarchar(max)");
  98. b.Property<string>("Country")
  99. .IsRequired()
  100. .HasColumnType("nvarchar(max)");
  101. b.Property<DateTime>("CreatedAtUtc")
  102. .HasColumnType("datetime2");
  103. b.Property<DateTime?>("DeletedAtUtc")
  104. .HasColumnType("datetime2");
  105. b.Property<string>("Fax")
  106. .IsRequired()
  107. .HasColumnType("nvarchar(max)");
  108. b.Property<string>("LegalAddress")
  109. .IsRequired()
  110. .HasColumnType("nvarchar(max)");
  111. b.Property<string>("LegalEmail")
  112. .IsRequired()
  113. .HasColumnType("nvarchar(max)");
  114. b.Property<string>("Name")
  115. .IsRequired()
  116. .HasColumnType("nvarchar(max)");
  117. b.Property<string>("PhoneNumber")
  118. .IsRequired()
  119. .HasColumnType("nvarchar(max)");
  120. b.Property<string>("PostalCode")
  121. .IsRequired()
  122. .HasColumnType("nvarchar(max)");
  123. b.Property<DateTime?>("UpdatedAtUtc")
  124. .HasColumnType("datetime2");
  125. b.HasKey("Id");
  126. b.ToTable("InsuranceCompanies");
  127. });
  128. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  129. {
  130. b.Property<long>("Id")
  131. .ValueGeneratedOnAdd()
  132. .HasColumnType("bigint");
  133. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  134. b.Property<DateTime>("CreatedAtUtc")
  135. .HasColumnType("datetime2");
  136. b.Property<DateTime?>("DeletedAtUtc")
  137. .HasColumnType("datetime2");
  138. b.Property<DateTime>("EndDate")
  139. .HasColumnType("datetime2");
  140. b.Property<long>("InsurerId")
  141. .HasColumnType("bigint");
  142. b.Property<decimal>("Premium")
  143. .HasColumnType("decimal(18,2)");
  144. b.Property<DateTime>("StartDate")
  145. .HasColumnType("datetime2");
  146. b.Property<string>("Type")
  147. .IsRequired()
  148. .HasColumnType("nvarchar(max)");
  149. b.Property<DateTime?>("UpdatedAtUtc")
  150. .HasColumnType("datetime2");
  151. b.HasKey("Id");
  152. b.HasIndex("InsurerId");
  153. b.ToTable("InsurancePolicies");
  154. });
  155. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  156. {
  157. b.Property<long>("Id")
  158. .ValueGeneratedOnAdd()
  159. .HasColumnType("bigint");
  160. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  161. b.Property<string>("Address")
  162. .IsRequired()
  163. .HasColumnType("nvarchar(max)");
  164. b.Property<string>("City")
  165. .IsRequired()
  166. .HasColumnType("nvarchar(max)");
  167. b.Property<string>("Country")
  168. .IsRequired()
  169. .HasColumnType("nvarchar(max)");
  170. b.Property<DateTime>("CreatedAtUtc")
  171. .HasColumnType("datetime2");
  172. b.Property<DateTime>("DateOfBirth")
  173. .HasColumnType("datetime2");
  174. b.Property<DateTime?>("DeletedAtUtc")
  175. .HasColumnType("datetime2");
  176. b.Property<string>("Email")
  177. .IsRequired()
  178. .HasColumnType("nvarchar(max)");
  179. b.Property<string>("FirstName")
  180. .IsRequired()
  181. .HasColumnType("nvarchar(max)");
  182. b.Property<long>("InsuranceCompanyId")
  183. .HasColumnType("bigint");
  184. b.Property<string>("LastName")
  185. .IsRequired()
  186. .HasColumnType("nvarchar(max)");
  187. b.Property<string>("PhoneNumber")
  188. .IsRequired()
  189. .HasColumnType("nvarchar(max)");
  190. b.Property<string>("PostalCode")
  191. .IsRequired()
  192. .HasColumnType("nvarchar(max)");
  193. b.Property<DateTime?>("UpdatedAtUtc")
  194. .HasColumnType("datetime2");
  195. b.HasKey("Id");
  196. b.HasIndex("InsuranceCompanyId");
  197. b.ToTable("Insurers");
  198. });
  199. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  200. {
  201. b.Property<int>("Id")
  202. .ValueGeneratedOnAdd()
  203. .HasColumnType("int");
  204. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  205. b.Property<DateTime>("CreationDate")
  206. .HasColumnType("datetime2");
  207. b.Property<DateTime>("ExpiryDate")
  208. .HasColumnType("datetime2");
  209. b.Property<bool>("Invalidated")
  210. .HasColumnType("bit");
  211. b.Property<string>("JwtId")
  212. .IsRequired()
  213. .HasColumnType("nvarchar(max)");
  214. b.Property<string>("Token")
  215. .IsRequired()
  216. .HasColumnType("nvarchar(max)");
  217. b.Property<bool>("Used")
  218. .HasColumnType("bit");
  219. b.Property<int>("UserId")
  220. .HasColumnType("int");
  221. b.HasKey("Id");
  222. b.HasIndex("UserId");
  223. b.ToTable("RefreshTokens");
  224. });
  225. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  226. {
  227. b.Property<int>("TechnologyId")
  228. .ValueGeneratedOnAdd()
  229. .HasColumnType("int");
  230. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TechnologyId"), 1L, 1);
  231. b.Property<string>("Name")
  232. .IsRequired()
  233. .HasMaxLength(128)
  234. .HasColumnType("nvarchar(128)");
  235. b.HasKey("TechnologyId");
  236. b.ToTable("Technologies");
  237. });
  238. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  239. {
  240. b.Property<int>("Id")
  241. .ValueGeneratedOnAdd()
  242. .HasColumnType("int");
  243. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  244. b.Property<int>("AccessFailedCount")
  245. .HasColumnType("int");
  246. b.Property<string>("ConcurrencyStamp")
  247. .IsConcurrencyToken()
  248. .HasColumnType("nvarchar(max)");
  249. b.Property<string>("Email")
  250. .HasMaxLength(256)
  251. .HasColumnType("nvarchar(256)");
  252. b.Property<bool>("EmailConfirmed")
  253. .HasColumnType("bit");
  254. b.Property<string>("FirstName")
  255. .IsRequired()
  256. .HasColumnType("nvarchar(max)");
  257. b.Property<string>("LastName")
  258. .IsRequired()
  259. .HasColumnType("nvarchar(max)");
  260. b.Property<bool>("LockoutEnabled")
  261. .HasColumnType("bit");
  262. b.Property<DateTimeOffset?>("LockoutEnd")
  263. .HasColumnType("datetimeoffset");
  264. b.Property<string>("NormalizedEmail")
  265. .HasMaxLength(256)
  266. .HasColumnType("nvarchar(256)");
  267. b.Property<string>("NormalizedUserName")
  268. .HasMaxLength(256)
  269. .HasColumnType("nvarchar(256)");
  270. b.Property<string>("PasswordHash")
  271. .HasColumnType("nvarchar(max)");
  272. b.Property<string>("PhoneNumber")
  273. .HasColumnType("nvarchar(max)");
  274. b.Property<bool>("PhoneNumberConfirmed")
  275. .HasColumnType("bit");
  276. b.Property<string>("SecurityStamp")
  277. .HasColumnType("nvarchar(max)");
  278. b.Property<bool>("TwoFactorEnabled")
  279. .HasColumnType("bit");
  280. b.Property<string>("UserName")
  281. .HasMaxLength(256)
  282. .HasColumnType("nvarchar(256)");
  283. b.HasKey("Id");
  284. b.HasIndex("NormalizedEmail")
  285. .HasDatabaseName("EmailIndex");
  286. b.HasIndex("NormalizedUserName")
  287. .IsUnique()
  288. .HasDatabaseName("UserNameIndex")
  289. .HasFilter("[NormalizedUserName] IS NOT NULL");
  290. b.ToTable("AspNetUsers", (string)null);
  291. });
  292. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b =>
  293. {
  294. b.Property<long>("Id")
  295. .ValueGeneratedOnAdd()
  296. .HasColumnType("bigint");
  297. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  298. b.Property<DateTime>("CreatedAtUtc")
  299. .HasColumnType("datetime2");
  300. b.Property<DateTime?>("DeletedAtUtc")
  301. .HasColumnType("datetime2");
  302. b.Property<string>("Description")
  303. .IsRequired()
  304. .HasColumnType("nvarchar(max)");
  305. b.Property<string>("DisplayName")
  306. .IsRequired()
  307. .HasMaxLength(100)
  308. .HasColumnType("nvarchar(100)");
  309. b.Property<string>("Name")
  310. .IsRequired()
  311. .HasMaxLength(100)
  312. .HasColumnType("nvarchar(100)");
  313. b.Property<DateTime?>("UpdatedAtUtc")
  314. .HasColumnType("datetime2");
  315. b.HasKey("Id");
  316. b.ToTable("WebhookDefinitions");
  317. });
  318. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  319. {
  320. b.Property<long>("Id")
  321. .ValueGeneratedOnAdd()
  322. .HasColumnType("bigint");
  323. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  324. b.Property<DateTime>("CreatedAtUtc")
  325. .HasColumnType("datetime2");
  326. b.Property<DateTime?>("DeletedAtUtc")
  327. .HasColumnType("datetime2");
  328. b.Property<bool>("IsActive")
  329. .HasColumnType("bit");
  330. b.Property<DateTime?>("UpdatedAtUtc")
  331. .HasColumnType("datetime2");
  332. b.Property<long>("WebhookDefinitionId")
  333. .HasColumnType("bigint");
  334. b.Property<string>("WebhookURL")
  335. .IsRequired()
  336. .HasColumnType("nvarchar(max)");
  337. b.HasKey("Id");
  338. b.HasIndex("WebhookDefinitionId");
  339. b.ToTable("WebhookSubscriptions");
  340. });
  341. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  342. {
  343. b.Property<int>("Id")
  344. .ValueGeneratedOnAdd()
  345. .HasColumnType("int");
  346. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  347. b.Property<string>("ClaimType")
  348. .HasColumnType("nvarchar(max)");
  349. b.Property<string>("ClaimValue")
  350. .HasColumnType("nvarchar(max)");
  351. b.Property<int>("RoleId")
  352. .HasColumnType("int");
  353. b.HasKey("Id");
  354. b.HasIndex("RoleId");
  355. b.ToTable("AspNetRoleClaims", (string)null);
  356. });
  357. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  358. {
  359. b.Property<int>("Id")
  360. .ValueGeneratedOnAdd()
  361. .HasColumnType("int");
  362. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  363. b.Property<string>("ClaimType")
  364. .HasColumnType("nvarchar(max)");
  365. b.Property<string>("ClaimValue")
  366. .HasColumnType("nvarchar(max)");
  367. b.Property<int>("UserId")
  368. .HasColumnType("int");
  369. b.HasKey("Id");
  370. b.HasIndex("UserId");
  371. b.ToTable("AspNetUserClaims", (string)null);
  372. });
  373. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  374. {
  375. b.Property<string>("LoginProvider")
  376. .HasColumnType("nvarchar(450)");
  377. b.Property<string>("ProviderKey")
  378. .HasColumnType("nvarchar(450)");
  379. b.Property<string>("ProviderDisplayName")
  380. .HasColumnType("nvarchar(max)");
  381. b.Property<int>("UserId")
  382. .HasColumnType("int");
  383. b.HasKey("LoginProvider", "ProviderKey");
  384. b.HasIndex("UserId");
  385. b.ToTable("AspNetUserLogins", (string)null);
  386. });
  387. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  388. {
  389. b.Property<int>("UserId")
  390. .HasColumnType("int");
  391. b.Property<int>("RoleId")
  392. .HasColumnType("int");
  393. b.HasKey("UserId", "RoleId");
  394. b.HasIndex("RoleId");
  395. b.ToTable("AspNetUserRoles", (string)null);
  396. });
  397. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  398. {
  399. b.Property<int>("UserId")
  400. .HasColumnType("int");
  401. b.Property<string>("LoginProvider")
  402. .HasColumnType("nvarchar(450)");
  403. b.Property<string>("Name")
  404. .HasColumnType("nvarchar(450)");
  405. b.Property<string>("Value")
  406. .HasColumnType("nvarchar(max)");
  407. b.HasKey("UserId", "LoginProvider", "Name");
  408. b.ToTable("AspNetUserTokens", (string)null);
  409. });
  410. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  411. {
  412. b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer")
  413. .WithMany()
  414. .HasForeignKey("InsurerId")
  415. .OnDelete(DeleteBehavior.Cascade)
  416. .IsRequired();
  417. b.Navigation("Insurer");
  418. });
  419. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  420. {
  421. b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany")
  422. .WithMany()
  423. .HasForeignKey("InsuranceCompanyId")
  424. .OnDelete(DeleteBehavior.Cascade)
  425. .IsRequired();
  426. b.Navigation("InsuranceCompany");
  427. });
  428. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  429. {
  430. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  431. .WithMany()
  432. .HasForeignKey("UserId")
  433. .OnDelete(DeleteBehavior.Cascade)
  434. .IsRequired();
  435. b.Navigation("User");
  436. });
  437. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  438. {
  439. b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition")
  440. .WithMany()
  441. .HasForeignKey("WebhookDefinitionId")
  442. .OnDelete(DeleteBehavior.Cascade)
  443. .IsRequired();
  444. b.Navigation("WebhookDefinition");
  445. });
  446. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  447. {
  448. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  449. .WithMany()
  450. .HasForeignKey("RoleId")
  451. .OnDelete(DeleteBehavior.Cascade)
  452. .IsRequired();
  453. });
  454. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  455. {
  456. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  457. .WithMany()
  458. .HasForeignKey("UserId")
  459. .OnDelete(DeleteBehavior.Cascade)
  460. .IsRequired();
  461. });
  462. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  463. {
  464. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  465. .WithMany()
  466. .HasForeignKey("UserId")
  467. .OnDelete(DeleteBehavior.Cascade)
  468. .IsRequired();
  469. });
  470. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  471. {
  472. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  473. .WithMany()
  474. .HasForeignKey("RoleId")
  475. .OnDelete(DeleteBehavior.Cascade)
  476. .IsRequired();
  477. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  478. .WithMany()
  479. .HasForeignKey("UserId")
  480. .OnDelete(DeleteBehavior.Cascade)
  481. .IsRequired();
  482. });
  483. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  484. {
  485. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  486. .WithMany()
  487. .HasForeignKey("UserId")
  488. .OnDelete(DeleteBehavior.Cascade)
  489. .IsRequired();
  490. });
  491. #pragma warning restore 612, 618
  492. }
  493. }
  494. }