Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

DatabaseContextModelSnapshot.cs 44KB

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