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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  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>("Gender")
  100. .IsRequired()
  101. .HasColumnType("nvarchar(max)");
  102. b.Property<string>("GithubLink")
  103. .HasColumnType("nvarchar(max)");
  104. b.Property<string>("LastName")
  105. .IsRequired()
  106. .HasMaxLength(128)
  107. .HasColumnType("nvarchar(128)");
  108. b.Property<string>("LinkedlnLink")
  109. .HasColumnType("nvarchar(max)");
  110. b.Property<string>("PhoneNumber")
  111. .IsRequired()
  112. .HasMaxLength(30)
  113. .HasColumnType("nvarchar(30)");
  114. b.Property<string>("Position")
  115. .IsRequired()
  116. .HasMaxLength(128)
  117. .HasColumnType("nvarchar(128)");
  118. b.Property<string>("ProfessionalQualification")
  119. .IsRequired()
  120. .HasMaxLength(128)
  121. .HasColumnType("nvarchar(128)");
  122. b.Property<string>("TypeOfEmployment")
  123. .IsRequired()
  124. .HasColumnType("nvarchar(max)");
  125. b.HasKey("ApplicantId");
  126. b.ToTable("Applicants");
  127. });
  128. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.AppRole", b =>
  129. {
  130. b.Property<int>("Id")
  131. .ValueGeneratedOnAdd()
  132. .HasColumnType("int");
  133. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  134. b.Property<string>("ConcurrencyStamp")
  135. .IsConcurrencyToken()
  136. .HasColumnType("nvarchar(max)");
  137. b.Property<string>("Name")
  138. .HasMaxLength(256)
  139. .HasColumnType("nvarchar(256)");
  140. b.Property<string>("NormalizedName")
  141. .HasMaxLength(256)
  142. .HasColumnType("nvarchar(256)");
  143. b.HasKey("Id");
  144. b.HasIndex("NormalizedName")
  145. .IsUnique()
  146. .HasDatabaseName("RoleNameIndex")
  147. .HasFilter("[NormalizedName] IS NOT NULL");
  148. b.ToTable("AspNetRoles", (string)null);
  149. });
  150. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Category", b =>
  151. {
  152. b.Property<int>("Id")
  153. .ValueGeneratedOnAdd()
  154. .HasColumnType("int");
  155. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  156. b.Property<string>("Name")
  157. .IsRequired()
  158. .HasColumnType("nvarchar(max)");
  159. b.HasKey("Id");
  160. b.ToTable("Categories");
  161. });
  162. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Comment", b =>
  163. {
  164. b.Property<int>("Id")
  165. .ValueGeneratedOnAdd()
  166. .HasColumnType("int");
  167. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  168. b.Property<int>("ApplicantId")
  169. .HasColumnType("int");
  170. b.Property<string>("Content")
  171. .IsRequired()
  172. .HasMaxLength(1024)
  173. .HasColumnType("nvarchar(1024)");
  174. b.Property<DateTime>("DateOfSending")
  175. .HasColumnType("datetime2");
  176. b.Property<int>("UserId")
  177. .HasColumnType("int");
  178. b.HasKey("Id");
  179. b.HasIndex("ApplicantId");
  180. b.HasIndex("UserId");
  181. b.ToTable("Comments");
  182. });
  183. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.FileEntity", b =>
  184. {
  185. b.Property<int>("Id")
  186. .ValueGeneratedOnAdd()
  187. .HasColumnType("int");
  188. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  189. b.Property<int>("CategoryId")
  190. .HasColumnType("int");
  191. b.Property<Guid>("DocumentId")
  192. .HasColumnType("uniqueidentifier");
  193. b.Property<string>("Title")
  194. .IsRequired()
  195. .HasColumnType("nvarchar(max)");
  196. b.HasKey("Id");
  197. b.HasIndex("CategoryId");
  198. b.ToTable("Files");
  199. });
  200. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b =>
  201. {
  202. b.Property<long>("Id")
  203. .ValueGeneratedOnAdd()
  204. .HasColumnType("bigint");
  205. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  206. b.Property<string>("City")
  207. .IsRequired()
  208. .HasColumnType("nvarchar(max)");
  209. b.Property<string>("Country")
  210. .IsRequired()
  211. .HasColumnType("nvarchar(max)");
  212. b.Property<DateTime>("CreatedAtUtc")
  213. .HasColumnType("datetime2");
  214. b.Property<DateTime?>("DeletedAtUtc")
  215. .HasColumnType("datetime2");
  216. b.Property<string>("Fax")
  217. .IsRequired()
  218. .HasColumnType("nvarchar(max)");
  219. b.Property<string>("LegalAddress")
  220. .IsRequired()
  221. .HasColumnType("nvarchar(max)");
  222. b.Property<string>("LegalEmail")
  223. .IsRequired()
  224. .HasColumnType("nvarchar(max)");
  225. b.Property<string>("Name")
  226. .IsRequired()
  227. .HasColumnType("nvarchar(max)");
  228. b.Property<string>("PhoneNumber")
  229. .IsRequired()
  230. .HasColumnType("nvarchar(max)");
  231. b.Property<string>("PostalCode")
  232. .IsRequired()
  233. .HasColumnType("nvarchar(max)");
  234. b.Property<DateTime?>("UpdatedAtUtc")
  235. .HasColumnType("datetime2");
  236. b.HasKey("Id");
  237. b.ToTable("InsuranceCompanies");
  238. });
  239. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  240. {
  241. b.Property<long>("Id")
  242. .ValueGeneratedOnAdd()
  243. .HasColumnType("bigint");
  244. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  245. b.Property<DateTime>("CreatedAtUtc")
  246. .HasColumnType("datetime2");
  247. b.Property<DateTime?>("DeletedAtUtc")
  248. .HasColumnType("datetime2");
  249. b.Property<DateTime>("EndDate")
  250. .HasColumnType("datetime2");
  251. b.Property<long>("InsurerId")
  252. .HasColumnType("bigint");
  253. b.Property<decimal>("Premium")
  254. .HasColumnType("decimal(18,2)");
  255. b.Property<DateTime>("StartDate")
  256. .HasColumnType("datetime2");
  257. b.Property<string>("Type")
  258. .IsRequired()
  259. .HasColumnType("nvarchar(max)");
  260. b.Property<DateTime?>("UpdatedAtUtc")
  261. .HasColumnType("datetime2");
  262. b.HasKey("Id");
  263. b.HasIndex("InsurerId");
  264. b.ToTable("InsurancePolicies");
  265. });
  266. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  267. {
  268. b.Property<long>("Id")
  269. .ValueGeneratedOnAdd()
  270. .HasColumnType("bigint");
  271. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  272. b.Property<string>("Address")
  273. .IsRequired()
  274. .HasColumnType("nvarchar(max)");
  275. b.Property<string>("City")
  276. .IsRequired()
  277. .HasColumnType("nvarchar(max)");
  278. b.Property<string>("Country")
  279. .IsRequired()
  280. .HasColumnType("nvarchar(max)");
  281. b.Property<DateTime>("CreatedAtUtc")
  282. .HasColumnType("datetime2");
  283. b.Property<DateTime>("DateOfBirth")
  284. .HasColumnType("datetime2");
  285. b.Property<DateTime?>("DeletedAtUtc")
  286. .HasColumnType("datetime2");
  287. b.Property<string>("Email")
  288. .IsRequired()
  289. .HasColumnType("nvarchar(max)");
  290. b.Property<string>("FirstName")
  291. .IsRequired()
  292. .HasColumnType("nvarchar(max)");
  293. b.Property<long>("InsuranceCompanyId")
  294. .HasColumnType("bigint");
  295. b.Property<string>("LastName")
  296. .IsRequired()
  297. .HasColumnType("nvarchar(max)");
  298. b.Property<string>("PhoneNumber")
  299. .IsRequired()
  300. .HasColumnType("nvarchar(max)");
  301. b.Property<string>("PostalCode")
  302. .IsRequired()
  303. .HasColumnType("nvarchar(max)");
  304. b.Property<DateTime?>("UpdatedAtUtc")
  305. .HasColumnType("datetime2");
  306. b.HasKey("Id");
  307. b.HasIndex("InsuranceCompanyId");
  308. b.ToTable("Insurers");
  309. });
  310. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Pattern", b =>
  311. {
  312. b.Property<int>("Id")
  313. .ValueGeneratedOnAdd()
  314. .HasColumnType("int");
  315. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  316. b.Property<DateTime>("CreatedAt")
  317. .HasColumnType("datetime2");
  318. b.Property<string>("Message")
  319. .IsRequired()
  320. .HasColumnType("nvarchar(max)");
  321. b.Property<int>("SelectionLevelId")
  322. .HasColumnType("int");
  323. b.Property<string>("Title")
  324. .IsRequired()
  325. .HasColumnType("nvarchar(max)");
  326. b.HasKey("Id");
  327. b.HasIndex("SelectionLevelId");
  328. b.ToTable("Patterns");
  329. });
  330. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  331. {
  332. b.Property<int>("Id")
  333. .ValueGeneratedOnAdd()
  334. .HasColumnType("int");
  335. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  336. b.Property<DateTime>("CreationDate")
  337. .HasColumnType("datetime2");
  338. b.Property<DateTime>("ExpiryDate")
  339. .HasColumnType("datetime2");
  340. b.Property<bool>("Invalidated")
  341. .HasColumnType("bit");
  342. b.Property<string>("JwtId")
  343. .IsRequired()
  344. .HasColumnType("nvarchar(max)");
  345. b.Property<string>("Token")
  346. .IsRequired()
  347. .HasColumnType("nvarchar(max)");
  348. b.Property<bool>("Used")
  349. .HasColumnType("bit");
  350. b.Property<int>("UserId")
  351. .HasColumnType("int");
  352. b.HasKey("Id");
  353. b.HasIndex("UserId");
  354. b.ToTable("RefreshTokens");
  355. });
  356. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b =>
  357. {
  358. b.Property<int>("Id")
  359. .ValueGeneratedOnAdd()
  360. .HasColumnType("int");
  361. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  362. b.Property<string>("Name")
  363. .IsRequired()
  364. .HasColumnType("nvarchar(max)");
  365. b.HasKey("Id");
  366. b.ToTable("SelectionLevels");
  367. b.HasData(
  368. new
  369. {
  370. Id = 1,
  371. Name = "HR intervju"
  372. },
  373. new
  374. {
  375. Id = 2,
  376. Name = "Screening test"
  377. },
  378. new
  379. {
  380. Id = 3,
  381. Name = "Tehnicki intervju"
  382. },
  383. new
  384. {
  385. Id = 4,
  386. Name = "Konacna odluka"
  387. });
  388. });
  389. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b =>
  390. {
  391. b.Property<int>("Id")
  392. .ValueGeneratedOnAdd()
  393. .HasColumnType("int");
  394. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  395. b.Property<int>("ApplicantId")
  396. .HasColumnType("int");
  397. b.Property<string>("Comment")
  398. .HasColumnType("nvarchar(max)");
  399. b.Property<DateTime?>("Date")
  400. .HasColumnType("datetime2");
  401. b.Property<string>("Link")
  402. .HasColumnType("nvarchar(max)");
  403. b.Property<string>("Name")
  404. .IsRequired()
  405. .HasColumnType("nvarchar(max)");
  406. b.Property<int?>("SchedulerId")
  407. .HasColumnType("int");
  408. b.Property<int>("SelectionLevelId")
  409. .HasColumnType("int");
  410. b.Property<string>("Status")
  411. .IsRequired()
  412. .HasColumnType("nvarchar(max)");
  413. b.HasKey("Id");
  414. b.HasIndex("ApplicantId");
  415. b.HasIndex("SchedulerId");
  416. b.HasIndex("SelectionLevelId");
  417. b.ToTable("SelectionProcesses");
  418. });
  419. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Tag", b =>
  420. {
  421. b.Property<int>("Id")
  422. .ValueGeneratedOnAdd()
  423. .HasColumnType("int");
  424. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  425. b.Property<string>("Name")
  426. .IsRequired()
  427. .HasColumnType("nvarchar(max)");
  428. b.HasKey("Id");
  429. b.ToTable("Tags");
  430. });
  431. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  432. {
  433. b.Property<int>("TechnologyId")
  434. .ValueGeneratedOnAdd()
  435. .HasColumnType("int");
  436. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TechnologyId"), 1L, 1);
  437. b.Property<string>("Name")
  438. .IsRequired()
  439. .HasMaxLength(128)
  440. .HasColumnType("nvarchar(128)");
  441. b.Property<string>("TechnologyType")
  442. .IsRequired()
  443. .HasColumnType("nvarchar(max)");
  444. b.HasKey("TechnologyId");
  445. b.ToTable("Technologies");
  446. });
  447. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  448. {
  449. b.Property<int>("Id")
  450. .ValueGeneratedOnAdd()
  451. .HasColumnType("int");
  452. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  453. b.Property<int>("ApplicantId")
  454. .HasColumnType("int");
  455. b.Property<int>("TechnologyId")
  456. .HasColumnType("int");
  457. b.HasKey("Id");
  458. b.HasIndex("ApplicantId");
  459. b.HasIndex("TechnologyId");
  460. b.ToTable("ApplicantTechnologies");
  461. });
  462. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  463. {
  464. b.Property<int>("Id")
  465. .ValueGeneratedOnAdd()
  466. .HasColumnType("int");
  467. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  468. b.Property<int>("AccessFailedCount")
  469. .HasColumnType("int");
  470. b.Property<string>("ConcurrencyStamp")
  471. .IsConcurrencyToken()
  472. .HasColumnType("nvarchar(max)");
  473. b.Property<string>("Email")
  474. .HasMaxLength(256)
  475. .HasColumnType("nvarchar(256)");
  476. b.Property<bool>("EmailConfirmed")
  477. .HasColumnType("bit");
  478. b.Property<string>("FirstName")
  479. .IsRequired()
  480. .HasColumnType("nvarchar(max)");
  481. b.Property<bool?>("IsEnabled")
  482. .ValueGeneratedOnAdd()
  483. .HasColumnType("bit")
  484. .HasDefaultValue(true);
  485. b.Property<string>("LastName")
  486. .IsRequired()
  487. .HasColumnType("nvarchar(max)");
  488. b.Property<string>("LinkedIn")
  489. .HasColumnType("nvarchar(max)");
  490. b.Property<bool>("LockoutEnabled")
  491. .HasColumnType("bit");
  492. b.Property<DateTimeOffset?>("LockoutEnd")
  493. .HasColumnType("datetimeoffset");
  494. b.Property<string>("NormalizedEmail")
  495. .HasMaxLength(256)
  496. .HasColumnType("nvarchar(256)");
  497. b.Property<string>("NormalizedUserName")
  498. .HasMaxLength(256)
  499. .HasColumnType("nvarchar(256)");
  500. b.Property<string>("PasswordHash")
  501. .HasColumnType("nvarchar(max)");
  502. b.Property<string>("PhoneNumber")
  503. .HasColumnType("nvarchar(max)");
  504. b.Property<bool>("PhoneNumberConfirmed")
  505. .HasColumnType("bit");
  506. b.Property<string>("Position")
  507. .HasColumnType("nvarchar(max)");
  508. b.Property<string>("SecurityStamp")
  509. .HasColumnType("nvarchar(max)");
  510. b.Property<bool>("TwoFactorEnabled")
  511. .HasColumnType("bit");
  512. b.Property<string>("UserName")
  513. .HasMaxLength(256)
  514. .HasColumnType("nvarchar(256)");
  515. b.HasKey("Id");
  516. b.HasIndex("NormalizedEmail")
  517. .HasDatabaseName("EmailIndex");
  518. b.HasIndex("NormalizedUserName")
  519. .IsUnique()
  520. .HasDatabaseName("UserNameIndex")
  521. .HasFilter("[NormalizedUserName] IS NOT NULL");
  522. b.ToTable("AspNetUsers", (string)null);
  523. });
  524. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b =>
  525. {
  526. b.Property<long>("Id")
  527. .ValueGeneratedOnAdd()
  528. .HasColumnType("bigint");
  529. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  530. b.Property<DateTime>("CreatedAtUtc")
  531. .HasColumnType("datetime2");
  532. b.Property<DateTime?>("DeletedAtUtc")
  533. .HasColumnType("datetime2");
  534. b.Property<string>("Description")
  535. .IsRequired()
  536. .HasColumnType("nvarchar(max)");
  537. b.Property<string>("DisplayName")
  538. .IsRequired()
  539. .HasMaxLength(100)
  540. .HasColumnType("nvarchar(100)");
  541. b.Property<string>("Name")
  542. .IsRequired()
  543. .HasMaxLength(100)
  544. .HasColumnType("nvarchar(100)");
  545. b.Property<DateTime?>("UpdatedAtUtc")
  546. .HasColumnType("datetime2");
  547. b.HasKey("Id");
  548. b.ToTable("WebhookDefinitions");
  549. });
  550. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  551. {
  552. b.Property<long>("Id")
  553. .ValueGeneratedOnAdd()
  554. .HasColumnType("bigint");
  555. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  556. b.Property<DateTime>("CreatedAtUtc")
  557. .HasColumnType("datetime2");
  558. b.Property<DateTime?>("DeletedAtUtc")
  559. .HasColumnType("datetime2");
  560. b.Property<bool>("IsActive")
  561. .HasColumnType("bit");
  562. b.Property<DateTime?>("UpdatedAtUtc")
  563. .HasColumnType("datetime2");
  564. b.Property<long>("WebhookDefinitionId")
  565. .HasColumnType("bigint");
  566. b.Property<string>("WebhookURL")
  567. .IsRequired()
  568. .HasColumnType("nvarchar(max)");
  569. b.HasKey("Id");
  570. b.HasIndex("WebhookDefinitionId");
  571. b.ToTable("WebhookSubscriptions");
  572. });
  573. modelBuilder.Entity("FileEntityTag", b =>
  574. {
  575. b.Property<int>("FilesId")
  576. .HasColumnType("int");
  577. b.Property<int>("TagsId")
  578. .HasColumnType("int");
  579. b.HasKey("FilesId", "TagsId");
  580. b.HasIndex("TagsId");
  581. b.ToTable("FileEntityTag");
  582. });
  583. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  584. {
  585. b.Property<int>("Id")
  586. .ValueGeneratedOnAdd()
  587. .HasColumnType("int");
  588. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  589. b.Property<string>("ClaimType")
  590. .HasColumnType("nvarchar(max)");
  591. b.Property<string>("ClaimValue")
  592. .HasColumnType("nvarchar(max)");
  593. b.Property<int>("RoleId")
  594. .HasColumnType("int");
  595. b.HasKey("Id");
  596. b.HasIndex("RoleId");
  597. b.ToTable("AspNetRoleClaims", (string)null);
  598. });
  599. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  600. {
  601. b.Property<int>("Id")
  602. .ValueGeneratedOnAdd()
  603. .HasColumnType("int");
  604. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  605. b.Property<string>("ClaimType")
  606. .HasColumnType("nvarchar(max)");
  607. b.Property<string>("ClaimValue")
  608. .HasColumnType("nvarchar(max)");
  609. b.Property<int>("UserId")
  610. .HasColumnType("int");
  611. b.HasKey("Id");
  612. b.HasIndex("UserId");
  613. b.ToTable("AspNetUserClaims", (string)null);
  614. });
  615. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  616. {
  617. b.Property<string>("LoginProvider")
  618. .HasColumnType("nvarchar(450)");
  619. b.Property<string>("ProviderKey")
  620. .HasColumnType("nvarchar(450)");
  621. b.Property<string>("ProviderDisplayName")
  622. .HasColumnType("nvarchar(max)");
  623. b.Property<int>("UserId")
  624. .HasColumnType("int");
  625. b.HasKey("LoginProvider", "ProviderKey");
  626. b.HasIndex("UserId");
  627. b.ToTable("AspNetUserLogins", (string)null);
  628. });
  629. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  630. {
  631. b.Property<int>("UserId")
  632. .HasColumnType("int");
  633. b.Property<int>("RoleId")
  634. .HasColumnType("int");
  635. b.HasKey("UserId", "RoleId");
  636. b.HasIndex("RoleId");
  637. b.ToTable("AspNetUserRoles", (string)null);
  638. });
  639. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  640. {
  641. b.Property<int>("UserId")
  642. .HasColumnType("int");
  643. b.Property<string>("LoginProvider")
  644. .HasColumnType("nvarchar(450)");
  645. b.Property<string>("Name")
  646. .HasColumnType("nvarchar(450)");
  647. b.Property<string>("Value")
  648. .HasColumnType("nvarchar(max)");
  649. b.HasKey("UserId", "LoginProvider", "Name");
  650. b.ToTable("AspNetUserTokens", (string)null);
  651. });
  652. modelBuilder.Entity("AdApplicant", b =>
  653. {
  654. b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null)
  655. .WithMany()
  656. .HasForeignKey("AdsId")
  657. .OnDelete(DeleteBehavior.Cascade)
  658. .IsRequired();
  659. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", null)
  660. .WithMany()
  661. .HasForeignKey("ApplicantsApplicantId")
  662. .OnDelete(DeleteBehavior.Cascade)
  663. .IsRequired();
  664. });
  665. modelBuilder.Entity("AdTechnology", b =>
  666. {
  667. b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null)
  668. .WithMany()
  669. .HasForeignKey("AdsId")
  670. .OnDelete(DeleteBehavior.Cascade)
  671. .IsRequired();
  672. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", null)
  673. .WithMany()
  674. .HasForeignKey("TechnologiesTechnologyId")
  675. .OnDelete(DeleteBehavior.Cascade)
  676. .IsRequired();
  677. });
  678. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Comment", b =>
  679. {
  680. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  681. .WithMany("Comments")
  682. .HasForeignKey("ApplicantId")
  683. .OnDelete(DeleteBehavior.Cascade)
  684. .IsRequired();
  685. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  686. .WithMany("Comments")
  687. .HasForeignKey("UserId")
  688. .OnDelete(DeleteBehavior.Cascade)
  689. .IsRequired();
  690. b.Navigation("Applicant");
  691. b.Navigation("User");
  692. });
  693. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.FileEntity", b =>
  694. {
  695. b.HasOne("Diligent.WebAPI.Data.Entities.Category", "Category")
  696. .WithMany("Files")
  697. .HasForeignKey("CategoryId")
  698. .OnDelete(DeleteBehavior.Cascade)
  699. .IsRequired();
  700. b.Navigation("Category");
  701. });
  702. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  703. {
  704. b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer")
  705. .WithMany()
  706. .HasForeignKey("InsurerId")
  707. .OnDelete(DeleteBehavior.Cascade)
  708. .IsRequired();
  709. b.Navigation("Insurer");
  710. });
  711. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  712. {
  713. b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany")
  714. .WithMany()
  715. .HasForeignKey("InsuranceCompanyId")
  716. .OnDelete(DeleteBehavior.Cascade)
  717. .IsRequired();
  718. b.Navigation("InsuranceCompany");
  719. });
  720. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Pattern", b =>
  721. {
  722. b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel")
  723. .WithMany()
  724. .HasForeignKey("SelectionLevelId")
  725. .OnDelete(DeleteBehavior.Cascade)
  726. .IsRequired();
  727. b.Navigation("SelectionLevel");
  728. });
  729. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  730. {
  731. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  732. .WithMany()
  733. .HasForeignKey("UserId")
  734. .OnDelete(DeleteBehavior.Cascade)
  735. .IsRequired();
  736. b.Navigation("User");
  737. });
  738. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b =>
  739. {
  740. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  741. .WithMany("SelectionProcesses")
  742. .HasForeignKey("ApplicantId")
  743. .OnDelete(DeleteBehavior.Cascade)
  744. .IsRequired();
  745. b.HasOne("Diligent.WebAPI.Data.Entities.User", "Scheduler")
  746. .WithMany("Processes")
  747. .HasForeignKey("SchedulerId")
  748. .OnDelete(DeleteBehavior.SetNull);
  749. b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel")
  750. .WithMany("SelectionProcesses")
  751. .HasForeignKey("SelectionLevelId")
  752. .OnDelete(DeleteBehavior.Cascade)
  753. .IsRequired();
  754. b.Navigation("Applicant");
  755. b.Navigation("Scheduler");
  756. b.Navigation("SelectionLevel");
  757. });
  758. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  759. {
  760. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  761. .WithMany("TechnologyApplicants")
  762. .HasForeignKey("ApplicantId")
  763. .OnDelete(DeleteBehavior.Cascade)
  764. .IsRequired();
  765. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Technology")
  766. .WithMany("TechnologyApplicants")
  767. .HasForeignKey("TechnologyId")
  768. .OnDelete(DeleteBehavior.Cascade)
  769. .IsRequired();
  770. b.Navigation("Applicant");
  771. b.Navigation("Technology");
  772. });
  773. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  774. {
  775. b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition")
  776. .WithMany()
  777. .HasForeignKey("WebhookDefinitionId")
  778. .OnDelete(DeleteBehavior.Cascade)
  779. .IsRequired();
  780. b.Navigation("WebhookDefinition");
  781. });
  782. modelBuilder.Entity("FileEntityTag", b =>
  783. {
  784. b.HasOne("Diligent.WebAPI.Data.Entities.FileEntity", null)
  785. .WithMany()
  786. .HasForeignKey("FilesId")
  787. .OnDelete(DeleteBehavior.Cascade)
  788. .IsRequired();
  789. b.HasOne("Diligent.WebAPI.Data.Entities.Tag", null)
  790. .WithMany()
  791. .HasForeignKey("TagsId")
  792. .OnDelete(DeleteBehavior.Cascade)
  793. .IsRequired();
  794. });
  795. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  796. {
  797. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  798. .WithMany()
  799. .HasForeignKey("RoleId")
  800. .OnDelete(DeleteBehavior.Cascade)
  801. .IsRequired();
  802. });
  803. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  804. {
  805. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  806. .WithMany()
  807. .HasForeignKey("UserId")
  808. .OnDelete(DeleteBehavior.Cascade)
  809. .IsRequired();
  810. });
  811. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  812. {
  813. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  814. .WithMany()
  815. .HasForeignKey("UserId")
  816. .OnDelete(DeleteBehavior.Cascade)
  817. .IsRequired();
  818. });
  819. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  820. {
  821. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  822. .WithMany()
  823. .HasForeignKey("RoleId")
  824. .OnDelete(DeleteBehavior.Cascade)
  825. .IsRequired();
  826. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  827. .WithMany()
  828. .HasForeignKey("UserId")
  829. .OnDelete(DeleteBehavior.Cascade)
  830. .IsRequired();
  831. });
  832. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  833. {
  834. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  835. .WithMany()
  836. .HasForeignKey("UserId")
  837. .OnDelete(DeleteBehavior.Cascade)
  838. .IsRequired();
  839. });
  840. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b =>
  841. {
  842. b.Navigation("Comments");
  843. b.Navigation("SelectionProcesses");
  844. b.Navigation("TechnologyApplicants");
  845. });
  846. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Category", b =>
  847. {
  848. b.Navigation("Files");
  849. });
  850. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b =>
  851. {
  852. b.Navigation("SelectionProcesses");
  853. });
  854. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  855. {
  856. b.Navigation("TechnologyApplicants");
  857. });
  858. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  859. {
  860. b.Navigation("Comments");
  861. b.Navigation("Processes");
  862. });
  863. #pragma warning restore 612, 618
  864. }
  865. }
  866. }