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

20230222102708_addedNoteOnFileEntity.Designer.cs 44KB

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