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

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