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.

20230203064003_AddedFileEntity.Designer.cs 42KB

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