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

20230224083501_SetFileEntityCategoryToBeNullable.Designer.cs 44KB

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