Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

DatabaseContextModelSnapshot.cs 44KB

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