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.

20230217144058_UserCategoryManyToMany.Designer.cs 43KB

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