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.

DatabaseContextModelSnapshot.cs 36KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020
  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.Storage.ValueConversion;
  8. #nullable disable
  9. namespace Diligent.WebAPI.Data.Migrations
  10. {
  11. [DbContext(typeof(DatabaseContext))]
  12. partial class DatabaseContextModelSnapshot : ModelSnapshot
  13. {
  14. protected override void BuildModel(ModelBuilder modelBuilder)
  15. {
  16. #pragma warning disable 612, 618
  17. modelBuilder
  18. .HasAnnotation("ProductVersion", "6.0.10")
  19. .HasAnnotation("Relational:MaxIdentifierLength", 128);
  20. SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
  21. modelBuilder.Entity("AdApplicant", b =>
  22. {
  23. b.Property<int>("AdsId")
  24. .HasColumnType("int");
  25. b.Property<int>("ApplicantsApplicantId")
  26. .HasColumnType("int");
  27. b.HasKey("AdsId", "ApplicantsApplicantId");
  28. b.HasIndex("ApplicantsApplicantId");
  29. b.ToTable("AdApplicant");
  30. });
  31. modelBuilder.Entity("AdTechnology", b =>
  32. {
  33. b.Property<int>("AdsId")
  34. .HasColumnType("int");
  35. b.Property<int>("TechnologiesTechnologyId")
  36. .HasColumnType("int");
  37. b.HasKey("AdsId", "TechnologiesTechnologyId");
  38. b.HasIndex("TechnologiesTechnologyId");
  39. b.ToTable("AdTechnology");
  40. });
  41. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Ad", b =>
  42. {
  43. b.Property<int>("Id")
  44. .ValueGeneratedOnAdd()
  45. .HasColumnType("int");
  46. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  47. b.Property<DateTime>("CreatedAt")
  48. .HasColumnType("datetime2");
  49. b.Property<string>("EmploymentType")
  50. .IsRequired()
  51. .HasColumnType("nvarchar(max)");
  52. b.Property<DateTime>("ExpiredAt")
  53. .HasColumnType("datetime2");
  54. b.Property<string>("KeyResponsibilities")
  55. .IsRequired()
  56. .HasColumnType("nvarchar(max)");
  57. b.Property<int>("MinimumExperience")
  58. .HasColumnType("int");
  59. b.Property<string>("Offer")
  60. .IsRequired()
  61. .HasColumnType("nvarchar(max)");
  62. b.Property<string>("Requirements")
  63. .IsRequired()
  64. .HasColumnType("nvarchar(max)");
  65. b.Property<string>("Title")
  66. .IsRequired()
  67. .HasColumnType("nvarchar(max)");
  68. b.Property<string>("WorkHour")
  69. .IsRequired()
  70. .HasColumnType("nvarchar(max)");
  71. b.HasKey("Id");
  72. b.ToTable("Ads");
  73. });
  74. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b =>
  75. {
  76. b.Property<int>("ApplicantId")
  77. .ValueGeneratedOnAdd()
  78. .HasColumnType("int");
  79. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ApplicantId"), 1L, 1);
  80. b.Property<string>("ApplicationChannel")
  81. .HasColumnType("nvarchar(max)");
  82. b.Property<string>("BitBucketLink")
  83. .HasColumnType("nvarchar(max)");
  84. b.Property<string>("CV")
  85. .IsRequired()
  86. .HasColumnType("nvarchar(max)");
  87. b.Property<DateTime>("DateOfApplication")
  88. .HasColumnType("datetime2");
  89. b.Property<string>("Email")
  90. .IsRequired()
  91. .HasMaxLength(128)
  92. .HasColumnType("nvarchar(128)");
  93. b.Property<int>("Experience")
  94. .HasColumnType("int");
  95. b.Property<string>("FirstName")
  96. .IsRequired()
  97. .HasMaxLength(128)
  98. .HasColumnType("nvarchar(128)");
  99. b.Property<string>("GithubLink")
  100. .HasColumnType("nvarchar(max)");
  101. b.Property<string>("LastName")
  102. .IsRequired()
  103. .HasMaxLength(128)
  104. .HasColumnType("nvarchar(128)");
  105. b.Property<string>("LinkedlnLink")
  106. .HasColumnType("nvarchar(max)");
  107. b.Property<string>("PhoneNumber")
  108. .IsRequired()
  109. .HasMaxLength(30)
  110. .HasColumnType("nvarchar(30)");
  111. b.Property<string>("Position")
  112. .IsRequired()
  113. .HasMaxLength(128)
  114. .HasColumnType("nvarchar(128)");
  115. b.Property<string>("TypeOfEmployment")
  116. .IsRequired()
  117. .HasColumnType("nvarchar(max)");
  118. b.HasKey("ApplicantId");
  119. b.ToTable("Applicants");
  120. });
  121. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.AppRole", b =>
  122. {
  123. b.Property<int>("Id")
  124. .ValueGeneratedOnAdd()
  125. .HasColumnType("int");
  126. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  127. b.Property<string>("ConcurrencyStamp")
  128. .IsConcurrencyToken()
  129. .HasColumnType("nvarchar(max)");
  130. b.Property<string>("Name")
  131. .HasMaxLength(256)
  132. .HasColumnType("nvarchar(256)");
  133. b.Property<string>("NormalizedName")
  134. .HasMaxLength(256)
  135. .HasColumnType("nvarchar(256)");
  136. b.HasKey("Id");
  137. b.HasIndex("NormalizedName")
  138. .IsUnique()
  139. .HasDatabaseName("RoleNameIndex")
  140. .HasFilter("[NormalizedName] IS NOT NULL");
  141. b.ToTable("AspNetRoles", (string)null);
  142. });
  143. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Comment", b =>
  144. {
  145. b.Property<int>("Id")
  146. .ValueGeneratedOnAdd()
  147. .HasColumnType("int");
  148. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  149. b.Property<int>("ApplicantId")
  150. .HasColumnType("int");
  151. b.Property<string>("Content")
  152. .IsRequired()
  153. .HasMaxLength(1024)
  154. .HasColumnType("nvarchar(1024)");
  155. b.Property<DateTime>("DateOfSending")
  156. .HasColumnType("datetime2");
  157. b.Property<int>("UserId")
  158. .HasColumnType("int");
  159. b.HasKey("Id");
  160. b.HasIndex("ApplicantId");
  161. b.HasIndex("UserId");
  162. b.ToTable("Comments");
  163. });
  164. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b =>
  165. {
  166. b.Property<long>("Id")
  167. .ValueGeneratedOnAdd()
  168. .HasColumnType("bigint");
  169. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  170. b.Property<string>("City")
  171. .IsRequired()
  172. .HasColumnType("nvarchar(max)");
  173. b.Property<string>("Country")
  174. .IsRequired()
  175. .HasColumnType("nvarchar(max)");
  176. b.Property<DateTime>("CreatedAtUtc")
  177. .HasColumnType("datetime2");
  178. b.Property<DateTime?>("DeletedAtUtc")
  179. .HasColumnType("datetime2");
  180. b.Property<string>("Fax")
  181. .IsRequired()
  182. .HasColumnType("nvarchar(max)");
  183. b.Property<string>("LegalAddress")
  184. .IsRequired()
  185. .HasColumnType("nvarchar(max)");
  186. b.Property<string>("LegalEmail")
  187. .IsRequired()
  188. .HasColumnType("nvarchar(max)");
  189. b.Property<string>("Name")
  190. .IsRequired()
  191. .HasColumnType("nvarchar(max)");
  192. b.Property<string>("PhoneNumber")
  193. .IsRequired()
  194. .HasColumnType("nvarchar(max)");
  195. b.Property<string>("PostalCode")
  196. .IsRequired()
  197. .HasColumnType("nvarchar(max)");
  198. b.Property<DateTime?>("UpdatedAtUtc")
  199. .HasColumnType("datetime2");
  200. b.HasKey("Id");
  201. b.ToTable("InsuranceCompanies");
  202. });
  203. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  204. {
  205. b.Property<long>("Id")
  206. .ValueGeneratedOnAdd()
  207. .HasColumnType("bigint");
  208. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  209. b.Property<DateTime>("CreatedAtUtc")
  210. .HasColumnType("datetime2");
  211. b.Property<DateTime?>("DeletedAtUtc")
  212. .HasColumnType("datetime2");
  213. b.Property<DateTime>("EndDate")
  214. .HasColumnType("datetime2");
  215. b.Property<long>("InsurerId")
  216. .HasColumnType("bigint");
  217. b.Property<decimal>("Premium")
  218. .HasColumnType("decimal(18,2)");
  219. b.Property<DateTime>("StartDate")
  220. .HasColumnType("datetime2");
  221. b.Property<string>("Type")
  222. .IsRequired()
  223. .HasColumnType("nvarchar(max)");
  224. b.Property<DateTime?>("UpdatedAtUtc")
  225. .HasColumnType("datetime2");
  226. b.HasKey("Id");
  227. b.HasIndex("InsurerId");
  228. b.ToTable("InsurancePolicies");
  229. });
  230. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  231. {
  232. b.Property<long>("Id")
  233. .ValueGeneratedOnAdd()
  234. .HasColumnType("bigint");
  235. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  236. b.Property<string>("Address")
  237. .IsRequired()
  238. .HasColumnType("nvarchar(max)");
  239. b.Property<string>("City")
  240. .IsRequired()
  241. .HasColumnType("nvarchar(max)");
  242. b.Property<string>("Country")
  243. .IsRequired()
  244. .HasColumnType("nvarchar(max)");
  245. b.Property<DateTime>("CreatedAtUtc")
  246. .HasColumnType("datetime2");
  247. b.Property<DateTime>("DateOfBirth")
  248. .HasColumnType("datetime2");
  249. b.Property<DateTime?>("DeletedAtUtc")
  250. .HasColumnType("datetime2");
  251. b.Property<string>("Email")
  252. .IsRequired()
  253. .HasColumnType("nvarchar(max)");
  254. b.Property<string>("FirstName")
  255. .IsRequired()
  256. .HasColumnType("nvarchar(max)");
  257. b.Property<long>("InsuranceCompanyId")
  258. .HasColumnType("bigint");
  259. b.Property<string>("LastName")
  260. .IsRequired()
  261. .HasColumnType("nvarchar(max)");
  262. b.Property<string>("PhoneNumber")
  263. .IsRequired()
  264. .HasColumnType("nvarchar(max)");
  265. b.Property<string>("PostalCode")
  266. .IsRequired()
  267. .HasColumnType("nvarchar(max)");
  268. b.Property<DateTime?>("UpdatedAtUtc")
  269. .HasColumnType("datetime2");
  270. b.HasKey("Id");
  271. b.HasIndex("InsuranceCompanyId");
  272. b.ToTable("Insurers");
  273. });
  274. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  275. {
  276. b.Property<int>("Id")
  277. .ValueGeneratedOnAdd()
  278. .HasColumnType("int");
  279. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  280. b.Property<DateTime>("CreationDate")
  281. .HasColumnType("datetime2");
  282. b.Property<DateTime>("ExpiryDate")
  283. .HasColumnType("datetime2");
  284. b.Property<bool>("Invalidated")
  285. .HasColumnType("bit");
  286. b.Property<string>("JwtId")
  287. .IsRequired()
  288. .HasColumnType("nvarchar(max)");
  289. b.Property<string>("Token")
  290. .IsRequired()
  291. .HasColumnType("nvarchar(max)");
  292. b.Property<bool>("Used")
  293. .HasColumnType("bit");
  294. b.Property<int>("UserId")
  295. .HasColumnType("int");
  296. b.HasKey("Id");
  297. b.HasIndex("UserId");
  298. b.ToTable("RefreshTokens");
  299. });
  300. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b =>
  301. {
  302. b.Property<int>("Id")
  303. .ValueGeneratedOnAdd()
  304. .HasColumnType("int");
  305. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  306. b.Property<string>("Name")
  307. .IsRequired()
  308. .HasColumnType("nvarchar(max)");
  309. b.HasKey("Id");
  310. b.ToTable("SelectionLevels");
  311. b.HasData(
  312. new
  313. {
  314. Id = 1,
  315. Name = "HR intervju"
  316. },
  317. new
  318. {
  319. Id = 2,
  320. Name = "Screening test"
  321. },
  322. new
  323. {
  324. Id = 3,
  325. Name = "Tehnicki intervju"
  326. },
  327. new
  328. {
  329. Id = 4,
  330. Name = "Konacna odluka"
  331. });
  332. });
  333. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b =>
  334. {
  335. b.Property<int>("Id")
  336. .ValueGeneratedOnAdd()
  337. .HasColumnType("int");
  338. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  339. b.Property<int>("ApplicantId")
  340. .HasColumnType("int");
  341. b.Property<DateTime?>("Date")
  342. .HasColumnType("datetime2");
  343. b.Property<string>("Link")
  344. .HasColumnType("nvarchar(max)");
  345. b.Property<string>("Name")
  346. .IsRequired()
  347. .HasColumnType("nvarchar(max)");
  348. b.Property<int?>("SchedulerId")
  349. .HasColumnType("int");
  350. b.Property<int>("SelectionLevelId")
  351. .HasColumnType("int");
  352. b.Property<string>("Status")
  353. .IsRequired()
  354. .HasColumnType("nvarchar(max)");
  355. b.HasKey("Id");
  356. b.HasIndex("ApplicantId");
  357. b.HasIndex("SchedulerId");
  358. b.HasIndex("SelectionLevelId");
  359. b.ToTable("SelectionProcesses");
  360. });
  361. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  362. {
  363. b.Property<int>("TechnologyId")
  364. .ValueGeneratedOnAdd()
  365. .HasColumnType("int");
  366. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TechnologyId"), 1L, 1);
  367. b.Property<string>("Name")
  368. .IsRequired()
  369. .HasMaxLength(128)
  370. .HasColumnType("nvarchar(128)");
  371. b.Property<string>("TechnologyType")
  372. .IsRequired()
  373. .HasColumnType("nvarchar(max)");
  374. b.HasKey("TechnologyId");
  375. b.ToTable("Technologies");
  376. });
  377. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  378. {
  379. b.Property<int>("Id")
  380. .ValueGeneratedOnAdd()
  381. .HasColumnType("int");
  382. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  383. b.Property<int>("ApplicantId")
  384. .HasColumnType("int");
  385. b.Property<int>("TechnologyId")
  386. .HasColumnType("int");
  387. b.HasKey("Id");
  388. b.HasIndex("ApplicantId");
  389. b.HasIndex("TechnologyId");
  390. b.ToTable("ApplicantTechnologies");
  391. });
  392. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  393. {
  394. b.Property<int>("Id")
  395. .ValueGeneratedOnAdd()
  396. .HasColumnType("int");
  397. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  398. b.Property<int>("AccessFailedCount")
  399. .HasColumnType("int");
  400. b.Property<string>("ConcurrencyStamp")
  401. .IsConcurrencyToken()
  402. .HasColumnType("nvarchar(max)");
  403. b.Property<string>("Email")
  404. .HasMaxLength(256)
  405. .HasColumnType("nvarchar(256)");
  406. b.Property<bool>("EmailConfirmed")
  407. .HasColumnType("bit");
  408. b.Property<string>("FirstName")
  409. .IsRequired()
  410. .HasColumnType("nvarchar(max)");
  411. b.Property<bool?>("IsEnabled")
  412. .ValueGeneratedOnAdd()
  413. .HasColumnType("bit")
  414. .HasDefaultValue(true);
  415. b.Property<string>("LastName")
  416. .IsRequired()
  417. .HasColumnType("nvarchar(max)");
  418. b.Property<bool>("LockoutEnabled")
  419. .HasColumnType("bit");
  420. b.Property<DateTimeOffset?>("LockoutEnd")
  421. .HasColumnType("datetimeoffset");
  422. b.Property<string>("NormalizedEmail")
  423. .HasMaxLength(256)
  424. .HasColumnType("nvarchar(256)");
  425. b.Property<string>("NormalizedUserName")
  426. .HasMaxLength(256)
  427. .HasColumnType("nvarchar(256)");
  428. b.Property<string>("PasswordHash")
  429. .HasColumnType("nvarchar(max)");
  430. b.Property<string>("PasswordResetToken")
  431. .HasColumnType("nvarchar(max)");
  432. b.Property<string>("PhoneNumber")
  433. .HasColumnType("nvarchar(max)");
  434. b.Property<bool>("PhoneNumberConfirmed")
  435. .HasColumnType("bit");
  436. b.Property<string>("SecurityStamp")
  437. .HasColumnType("nvarchar(max)");
  438. b.Property<bool>("TwoFactorEnabled")
  439. .HasColumnType("bit");
  440. b.Property<string>("UserName")
  441. .HasMaxLength(256)
  442. .HasColumnType("nvarchar(256)");
  443. b.HasKey("Id");
  444. b.HasIndex("NormalizedEmail")
  445. .HasDatabaseName("EmailIndex");
  446. b.HasIndex("NormalizedUserName")
  447. .IsUnique()
  448. .HasDatabaseName("UserNameIndex")
  449. .HasFilter("[NormalizedUserName] IS NOT NULL");
  450. b.ToTable("AspNetUsers", (string)null);
  451. });
  452. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b =>
  453. {
  454. b.Property<long>("Id")
  455. .ValueGeneratedOnAdd()
  456. .HasColumnType("bigint");
  457. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  458. b.Property<DateTime>("CreatedAtUtc")
  459. .HasColumnType("datetime2");
  460. b.Property<DateTime?>("DeletedAtUtc")
  461. .HasColumnType("datetime2");
  462. b.Property<string>("Description")
  463. .IsRequired()
  464. .HasColumnType("nvarchar(max)");
  465. b.Property<string>("DisplayName")
  466. .IsRequired()
  467. .HasMaxLength(100)
  468. .HasColumnType("nvarchar(100)");
  469. b.Property<string>("Name")
  470. .IsRequired()
  471. .HasMaxLength(100)
  472. .HasColumnType("nvarchar(100)");
  473. b.Property<DateTime?>("UpdatedAtUtc")
  474. .HasColumnType("datetime2");
  475. b.HasKey("Id");
  476. b.ToTable("WebhookDefinitions");
  477. });
  478. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  479. {
  480. b.Property<long>("Id")
  481. .ValueGeneratedOnAdd()
  482. .HasColumnType("bigint");
  483. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  484. b.Property<DateTime>("CreatedAtUtc")
  485. .HasColumnType("datetime2");
  486. b.Property<DateTime?>("DeletedAtUtc")
  487. .HasColumnType("datetime2");
  488. b.Property<bool>("IsActive")
  489. .HasColumnType("bit");
  490. b.Property<DateTime?>("UpdatedAtUtc")
  491. .HasColumnType("datetime2");
  492. b.Property<long>("WebhookDefinitionId")
  493. .HasColumnType("bigint");
  494. b.Property<string>("WebhookURL")
  495. .IsRequired()
  496. .HasColumnType("nvarchar(max)");
  497. b.HasKey("Id");
  498. b.HasIndex("WebhookDefinitionId");
  499. b.ToTable("WebhookSubscriptions");
  500. });
  501. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  502. {
  503. b.Property<int>("Id")
  504. .ValueGeneratedOnAdd()
  505. .HasColumnType("int");
  506. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  507. b.Property<string>("ClaimType")
  508. .HasColumnType("nvarchar(max)");
  509. b.Property<string>("ClaimValue")
  510. .HasColumnType("nvarchar(max)");
  511. b.Property<int>("RoleId")
  512. .HasColumnType("int");
  513. b.HasKey("Id");
  514. b.HasIndex("RoleId");
  515. b.ToTable("AspNetRoleClaims", (string)null);
  516. });
  517. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  518. {
  519. b.Property<int>("Id")
  520. .ValueGeneratedOnAdd()
  521. .HasColumnType("int");
  522. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  523. b.Property<string>("ClaimType")
  524. .HasColumnType("nvarchar(max)");
  525. b.Property<string>("ClaimValue")
  526. .HasColumnType("nvarchar(max)");
  527. b.Property<int>("UserId")
  528. .HasColumnType("int");
  529. b.HasKey("Id");
  530. b.HasIndex("UserId");
  531. b.ToTable("AspNetUserClaims", (string)null);
  532. });
  533. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  534. {
  535. b.Property<string>("LoginProvider")
  536. .HasColumnType("nvarchar(450)");
  537. b.Property<string>("ProviderKey")
  538. .HasColumnType("nvarchar(450)");
  539. b.Property<string>("ProviderDisplayName")
  540. .HasColumnType("nvarchar(max)");
  541. b.Property<int>("UserId")
  542. .HasColumnType("int");
  543. b.HasKey("LoginProvider", "ProviderKey");
  544. b.HasIndex("UserId");
  545. b.ToTable("AspNetUserLogins", (string)null);
  546. });
  547. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  548. {
  549. b.Property<int>("UserId")
  550. .HasColumnType("int");
  551. b.Property<int>("RoleId")
  552. .HasColumnType("int");
  553. b.HasKey("UserId", "RoleId");
  554. b.HasIndex("RoleId");
  555. b.ToTable("AspNetUserRoles", (string)null);
  556. });
  557. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  558. {
  559. b.Property<int>("UserId")
  560. .HasColumnType("int");
  561. b.Property<string>("LoginProvider")
  562. .HasColumnType("nvarchar(450)");
  563. b.Property<string>("Name")
  564. .HasColumnType("nvarchar(450)");
  565. b.Property<string>("Value")
  566. .HasColumnType("nvarchar(max)");
  567. b.HasKey("UserId", "LoginProvider", "Name");
  568. b.ToTable("AspNetUserTokens", (string)null);
  569. });
  570. modelBuilder.Entity("AdApplicant", b =>
  571. {
  572. b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null)
  573. .WithMany()
  574. .HasForeignKey("AdsId")
  575. .OnDelete(DeleteBehavior.Cascade)
  576. .IsRequired();
  577. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", null)
  578. .WithMany()
  579. .HasForeignKey("ApplicantsApplicantId")
  580. .OnDelete(DeleteBehavior.Cascade)
  581. .IsRequired();
  582. });
  583. modelBuilder.Entity("AdTechnology", b =>
  584. {
  585. b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null)
  586. .WithMany()
  587. .HasForeignKey("AdsId")
  588. .OnDelete(DeleteBehavior.Cascade)
  589. .IsRequired();
  590. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", null)
  591. .WithMany()
  592. .HasForeignKey("TechnologiesTechnologyId")
  593. .OnDelete(DeleteBehavior.Cascade)
  594. .IsRequired();
  595. });
  596. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Comment", b =>
  597. {
  598. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  599. .WithMany("Comments")
  600. .HasForeignKey("ApplicantId")
  601. .OnDelete(DeleteBehavior.Cascade)
  602. .IsRequired();
  603. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  604. .WithMany("Comments")
  605. .HasForeignKey("UserId")
  606. .OnDelete(DeleteBehavior.Cascade)
  607. .IsRequired();
  608. b.Navigation("Applicant");
  609. b.Navigation("User");
  610. });
  611. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  612. {
  613. b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer")
  614. .WithMany()
  615. .HasForeignKey("InsurerId")
  616. .OnDelete(DeleteBehavior.Cascade)
  617. .IsRequired();
  618. b.Navigation("Insurer");
  619. });
  620. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  621. {
  622. b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany")
  623. .WithMany()
  624. .HasForeignKey("InsuranceCompanyId")
  625. .OnDelete(DeleteBehavior.Cascade)
  626. .IsRequired();
  627. b.Navigation("InsuranceCompany");
  628. });
  629. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  630. {
  631. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  632. .WithMany()
  633. .HasForeignKey("UserId")
  634. .OnDelete(DeleteBehavior.Cascade)
  635. .IsRequired();
  636. b.Navigation("User");
  637. });
  638. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b =>
  639. {
  640. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  641. .WithMany("SelectionProcesses")
  642. .HasForeignKey("ApplicantId")
  643. .OnDelete(DeleteBehavior.Cascade)
  644. .IsRequired();
  645. b.HasOne("Diligent.WebAPI.Data.Entities.User", "Scheduler")
  646. .WithMany("Processes")
  647. .HasForeignKey("SchedulerId")
  648. .OnDelete(DeleteBehavior.SetNull);
  649. b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel")
  650. .WithMany("SelectionProcesses")
  651. .HasForeignKey("SelectionLevelId")
  652. .OnDelete(DeleteBehavior.Cascade)
  653. .IsRequired();
  654. b.Navigation("Applicant");
  655. b.Navigation("Scheduler");
  656. b.Navigation("SelectionLevel");
  657. });
  658. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  659. {
  660. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  661. .WithMany("TechnologyApplicants")
  662. .HasForeignKey("ApplicantId")
  663. .OnDelete(DeleteBehavior.Cascade)
  664. .IsRequired();
  665. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Technology")
  666. .WithMany("TechnologyApplicants")
  667. .HasForeignKey("TechnologyId")
  668. .OnDelete(DeleteBehavior.Cascade)
  669. .IsRequired();
  670. b.Navigation("Applicant");
  671. b.Navigation("Technology");
  672. });
  673. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  674. {
  675. b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition")
  676. .WithMany()
  677. .HasForeignKey("WebhookDefinitionId")
  678. .OnDelete(DeleteBehavior.Cascade)
  679. .IsRequired();
  680. b.Navigation("WebhookDefinition");
  681. });
  682. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  683. {
  684. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  685. .WithMany()
  686. .HasForeignKey("RoleId")
  687. .OnDelete(DeleteBehavior.Cascade)
  688. .IsRequired();
  689. });
  690. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  691. {
  692. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  693. .WithMany()
  694. .HasForeignKey("UserId")
  695. .OnDelete(DeleteBehavior.Cascade)
  696. .IsRequired();
  697. });
  698. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  699. {
  700. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  701. .WithMany()
  702. .HasForeignKey("UserId")
  703. .OnDelete(DeleteBehavior.Cascade)
  704. .IsRequired();
  705. });
  706. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  707. {
  708. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  709. .WithMany()
  710. .HasForeignKey("RoleId")
  711. .OnDelete(DeleteBehavior.Cascade)
  712. .IsRequired();
  713. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  714. .WithMany()
  715. .HasForeignKey("UserId")
  716. .OnDelete(DeleteBehavior.Cascade)
  717. .IsRequired();
  718. });
  719. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  720. {
  721. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  722. .WithMany()
  723. .HasForeignKey("UserId")
  724. .OnDelete(DeleteBehavior.Cascade)
  725. .IsRequired();
  726. });
  727. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b =>
  728. {
  729. b.Navigation("Comments");
  730. b.Navigation("SelectionProcesses");
  731. b.Navigation("TechnologyApplicants");
  732. });
  733. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b =>
  734. {
  735. b.Navigation("SelectionProcesses");
  736. });
  737. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  738. {
  739. b.Navigation("TechnologyApplicants");
  740. });
  741. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  742. {
  743. b.Navigation("Comments");
  744. b.Navigation("Processes");
  745. });
  746. #pragma warning restore 612, 618
  747. }
  748. }
  749. }