ApplicationDbContextModelSnapshot.cs 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. // <auto-generated />
  2. using System;
  3. using ConcursoProjetos.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 ConcursoProjetos.Migrations
  10. {
  11. [DbContext(typeof(ApplicationDbContext))]
  12. partial class ApplicationDbContextModelSnapshot : ModelSnapshot
  13. {
  14. protected override void BuildModel(ModelBuilder modelBuilder)
  15. {
  16. #pragma warning disable 612, 618
  17. modelBuilder
  18. .HasAnnotation("ProductVersion", "8.0.8")
  19. .HasAnnotation("Relational:MaxIdentifierLength", 128);
  20. SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
  21. modelBuilder.Entity("ConcursoProjetos.Data.ApplicationUser", b =>
  22. {
  23. b.Property<string>("Id")
  24. .HasColumnType("nvarchar(450)");
  25. b.Property<int>("AccessFailedCount")
  26. .HasColumnType("int");
  27. b.Property<string>("ConcurrencyStamp")
  28. .IsConcurrencyToken()
  29. .HasColumnType("nvarchar(max)");
  30. b.Property<string>("Email")
  31. .HasMaxLength(256)
  32. .HasColumnType("nvarchar(256)");
  33. b.Property<bool>("EmailConfirmed")
  34. .HasColumnType("bit");
  35. b.Property<bool>("LockoutEnabled")
  36. .HasColumnType("bit");
  37. b.Property<DateTimeOffset?>("LockoutEnd")
  38. .HasColumnType("datetimeoffset");
  39. b.Property<string>("NormalizedEmail")
  40. .HasMaxLength(256)
  41. .HasColumnType("nvarchar(256)");
  42. b.Property<string>("NormalizedUserName")
  43. .HasMaxLength(256)
  44. .HasColumnType("nvarchar(256)");
  45. b.Property<string>("PasswordHash")
  46. .HasColumnType("nvarchar(max)");
  47. b.Property<string>("PhoneNumber")
  48. .HasColumnType("nvarchar(max)");
  49. b.Property<bool>("PhoneNumberConfirmed")
  50. .HasColumnType("bit");
  51. b.Property<string>("SecurityStamp")
  52. .HasColumnType("nvarchar(max)");
  53. b.Property<bool>("TwoFactorEnabled")
  54. .HasColumnType("bit");
  55. b.Property<string>("UserName")
  56. .HasMaxLength(256)
  57. .HasColumnType("nvarchar(256)");
  58. b.HasKey("Id");
  59. b.HasIndex("NormalizedEmail")
  60. .HasDatabaseName("EmailIndex");
  61. b.HasIndex("NormalizedUserName")
  62. .IsUnique()
  63. .HasDatabaseName("UserNameIndex")
  64. .HasFilter("[NormalizedUserName] IS NOT NULL");
  65. b.ToTable("AspNetUsers", (string)null);
  66. });
  67. modelBuilder.Entity("ConcursoProjetos.Domain.Entities.Candidato", b =>
  68. {
  69. b.Property<long>("Id")
  70. .ValueGeneratedOnAdd()
  71. .HasColumnType("bigint");
  72. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  73. b.Property<string>("Cnpj")
  74. .IsRequired()
  75. .HasMaxLength(14)
  76. .HasColumnType("nvarchar");
  77. b.Property<string>("Cpf")
  78. .IsRequired()
  79. .HasMaxLength(11)
  80. .HasColumnType("nvarchar");
  81. b.Property<DateTime>("DateDelete")
  82. .HasColumnType("datetime2");
  83. b.Property<DateTime>("DateInclude")
  84. .HasColumnType("datetime2");
  85. b.Property<string>("Email")
  86. .IsRequired()
  87. .HasMaxLength(100)
  88. .HasColumnType("nvarchar");
  89. b.Property<string>("EmpresaEmail")
  90. .IsRequired()
  91. .HasMaxLength(100)
  92. .HasColumnType("nvarchar");
  93. b.Property<string>("EmpresaRazaoSocial")
  94. .IsRequired()
  95. .HasMaxLength(100)
  96. .HasColumnType("nvarchar");
  97. b.Property<string>("EmpresaTelefone")
  98. .IsRequired()
  99. .HasMaxLength(20)
  100. .HasColumnType("nvarchar");
  101. b.Property<bool>("IsDeleted")
  102. .HasColumnType("bit");
  103. b.Property<string>("NomeCompleto")
  104. .IsRequired()
  105. .HasMaxLength(100)
  106. .HasColumnType("nvarchar");
  107. b.Property<string>("Telefone")
  108. .IsRequired()
  109. .HasMaxLength(20)
  110. .HasColumnType("nvarchar");
  111. b.Property<bool>("TipoPessoa")
  112. .HasColumnType("bit");
  113. b.Property<string>("UserId")
  114. .IsRequired()
  115. .HasColumnType("nvarchar(450)");
  116. b.HasKey("Id");
  117. b.HasIndex("UserId");
  118. b.ToTable("Candidato", (string)null);
  119. });
  120. modelBuilder.Entity("ConcursoProjetos.Domain.Entities.Documento", b =>
  121. {
  122. b.Property<long>("Id")
  123. .ValueGeneratedOnAdd()
  124. .HasColumnType("bigint");
  125. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  126. b.Property<string>("ArquivoNomeOriginal")
  127. .IsRequired()
  128. .HasColumnType("nvarchar(max)");
  129. b.Property<long>("ArquivoTamanhoBytes")
  130. .HasColumnType("bigint");
  131. b.Property<DateTime>("DateDelete")
  132. .HasColumnType("datetime2");
  133. b.Property<DateTime>("DateInclude")
  134. .HasColumnType("datetime2");
  135. b.Property<string>("Descricao")
  136. .IsRequired()
  137. .HasColumnType("nvarchar");
  138. b.Property<bool>("IsDeleted")
  139. .HasColumnType("bit");
  140. b.Property<long>("ProjetoId")
  141. .HasColumnType("bigint");
  142. b.Property<long>("TipoDocumentoId")
  143. .HasColumnType("bigint");
  144. b.Property<bool>("UploadCompleto")
  145. .HasColumnType("bit");
  146. b.HasKey("Id");
  147. b.HasIndex("ProjetoId");
  148. b.HasIndex("TipoDocumentoId");
  149. b.ToTable("Documento", (string)null);
  150. });
  151. modelBuilder.Entity("ConcursoProjetos.Domain.Entities.Projeto", b =>
  152. {
  153. b.Property<long>("Id")
  154. .ValueGeneratedOnAdd()
  155. .HasColumnType("bigint");
  156. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  157. b.Property<long>("CandidatoId")
  158. .HasColumnType("bigint");
  159. b.Property<Guid>("Codigo")
  160. .HasColumnType("uniqueidentifier");
  161. b.Property<DateTime>("DateDelete")
  162. .HasColumnType("datetime2");
  163. b.Property<DateTime>("DateInclude")
  164. .HasColumnType("datetime2");
  165. b.Property<bool>("IsDeleted")
  166. .HasColumnType("bit");
  167. b.Property<string>("Nome")
  168. .IsRequired()
  169. .HasMaxLength(100)
  170. .HasColumnType("nvarchar");
  171. b.Property<int>("NumeroUnidades")
  172. .HasColumnType("int");
  173. b.Property<string>("ResponsavelTecnicoCpf")
  174. .IsRequired()
  175. .HasMaxLength(11)
  176. .HasColumnType("nvarchar");
  177. b.Property<string>("ResponsavelTecnicoEmail")
  178. .IsRequired()
  179. .HasMaxLength(100)
  180. .HasColumnType("nvarchar");
  181. b.Property<string>("ResponsavelTecnicoNomeCompleto")
  182. .IsRequired()
  183. .HasMaxLength(100)
  184. .HasColumnType("nvarchar");
  185. b.Property<string>("ResponsavelTecnicoTelefone")
  186. .IsRequired()
  187. .HasMaxLength(20)
  188. .HasColumnType("nvarchar");
  189. b.HasKey("Id");
  190. b.HasIndex("CandidatoId");
  191. b.ToTable("Projeto", (string)null);
  192. });
  193. modelBuilder.Entity("ConcursoProjetos.Domain.Entities.TipoDocumento", b =>
  194. {
  195. b.Property<long>("Id")
  196. .HasColumnType("bigint");
  197. b.Property<string>("Descricao")
  198. .IsRequired()
  199. .HasColumnType("nvarchar");
  200. b.Property<string>("Nome")
  201. .IsRequired()
  202. .HasMaxLength(100)
  203. .HasColumnType("nvarchar");
  204. b.HasKey("Id");
  205. b.ToTable("TipoDocumento", (string)null);
  206. });
  207. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
  208. {
  209. b.Property<string>("Id")
  210. .HasColumnType("nvarchar(450)");
  211. b.Property<string>("ConcurrencyStamp")
  212. .IsConcurrencyToken()
  213. .HasColumnType("nvarchar(max)");
  214. b.Property<string>("Name")
  215. .HasMaxLength(256)
  216. .HasColumnType("nvarchar(256)");
  217. b.Property<string>("NormalizedName")
  218. .HasMaxLength(256)
  219. .HasColumnType("nvarchar(256)");
  220. b.HasKey("Id");
  221. b.HasIndex("NormalizedName")
  222. .IsUnique()
  223. .HasDatabaseName("RoleNameIndex")
  224. .HasFilter("[NormalizedName] IS NOT NULL");
  225. b.ToTable("AspNetRoles", (string)null);
  226. });
  227. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  228. {
  229. b.Property<int>("Id")
  230. .ValueGeneratedOnAdd()
  231. .HasColumnType("int");
  232. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  233. b.Property<string>("ClaimType")
  234. .HasColumnType("nvarchar(max)");
  235. b.Property<string>("ClaimValue")
  236. .HasColumnType("nvarchar(max)");
  237. b.Property<string>("RoleId")
  238. .IsRequired()
  239. .HasColumnType("nvarchar(450)");
  240. b.HasKey("Id");
  241. b.HasIndex("RoleId");
  242. b.ToTable("AspNetRoleClaims", (string)null);
  243. });
  244. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  245. {
  246. b.Property<int>("Id")
  247. .ValueGeneratedOnAdd()
  248. .HasColumnType("int");
  249. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  250. b.Property<string>("ClaimType")
  251. .HasColumnType("nvarchar(max)");
  252. b.Property<string>("ClaimValue")
  253. .HasColumnType("nvarchar(max)");
  254. b.Property<string>("UserId")
  255. .IsRequired()
  256. .HasColumnType("nvarchar(450)");
  257. b.HasKey("Id");
  258. b.HasIndex("UserId");
  259. b.ToTable("AspNetUserClaims", (string)null);
  260. });
  261. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  262. {
  263. b.Property<string>("LoginProvider")
  264. .HasColumnType("nvarchar(450)");
  265. b.Property<string>("ProviderKey")
  266. .HasColumnType("nvarchar(450)");
  267. b.Property<string>("ProviderDisplayName")
  268. .HasColumnType("nvarchar(max)");
  269. b.Property<string>("UserId")
  270. .IsRequired()
  271. .HasColumnType("nvarchar(450)");
  272. b.HasKey("LoginProvider", "ProviderKey");
  273. b.HasIndex("UserId");
  274. b.ToTable("AspNetUserLogins", (string)null);
  275. });
  276. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  277. {
  278. b.Property<string>("UserId")
  279. .HasColumnType("nvarchar(450)");
  280. b.Property<string>("RoleId")
  281. .HasColumnType("nvarchar(450)");
  282. b.HasKey("UserId", "RoleId");
  283. b.HasIndex("RoleId");
  284. b.ToTable("AspNetUserRoles", (string)null);
  285. });
  286. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  287. {
  288. b.Property<string>("UserId")
  289. .HasColumnType("nvarchar(450)");
  290. b.Property<string>("LoginProvider")
  291. .HasColumnType("nvarchar(450)");
  292. b.Property<string>("Name")
  293. .HasColumnType("nvarchar(450)");
  294. b.Property<string>("Value")
  295. .HasColumnType("nvarchar(max)");
  296. b.HasKey("UserId", "LoginProvider", "Name");
  297. b.ToTable("AspNetUserTokens", (string)null);
  298. });
  299. modelBuilder.Entity("ConcursoProjetos.Domain.Entities.Candidato", b =>
  300. {
  301. b.HasOne("ConcursoProjetos.Data.ApplicationUser", "User")
  302. .WithMany()
  303. .HasForeignKey("UserId")
  304. .OnDelete(DeleteBehavior.Restrict)
  305. .IsRequired();
  306. b.Navigation("User");
  307. });
  308. modelBuilder.Entity("ConcursoProjetos.Domain.Entities.Documento", b =>
  309. {
  310. b.HasOne("ConcursoProjetos.Domain.Entities.Projeto", "Projeto")
  311. .WithMany("Documentos")
  312. .HasForeignKey("ProjetoId")
  313. .OnDelete(DeleteBehavior.Cascade)
  314. .IsRequired();
  315. b.HasOne("ConcursoProjetos.Domain.Entities.TipoDocumento", "TipoDocumento")
  316. .WithMany()
  317. .HasForeignKey("TipoDocumentoId")
  318. .OnDelete(DeleteBehavior.Restrict)
  319. .IsRequired();
  320. b.Navigation("Projeto");
  321. b.Navigation("TipoDocumento");
  322. });
  323. modelBuilder.Entity("ConcursoProjetos.Domain.Entities.Projeto", b =>
  324. {
  325. b.HasOne("ConcursoProjetos.Domain.Entities.Candidato", "Candidato")
  326. .WithMany()
  327. .HasForeignKey("CandidatoId")
  328. .OnDelete(DeleteBehavior.Restrict)
  329. .IsRequired();
  330. b.Navigation("Candidato");
  331. });
  332. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  333. {
  334. b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
  335. .WithMany()
  336. .HasForeignKey("RoleId")
  337. .OnDelete(DeleteBehavior.Cascade)
  338. .IsRequired();
  339. });
  340. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  341. {
  342. b.HasOne("ConcursoProjetos.Data.ApplicationUser", null)
  343. .WithMany()
  344. .HasForeignKey("UserId")
  345. .OnDelete(DeleteBehavior.Cascade)
  346. .IsRequired();
  347. });
  348. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  349. {
  350. b.HasOne("ConcursoProjetos.Data.ApplicationUser", null)
  351. .WithMany()
  352. .HasForeignKey("UserId")
  353. .OnDelete(DeleteBehavior.Cascade)
  354. .IsRequired();
  355. });
  356. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  357. {
  358. b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
  359. .WithMany()
  360. .HasForeignKey("RoleId")
  361. .OnDelete(DeleteBehavior.Cascade)
  362. .IsRequired();
  363. b.HasOne("ConcursoProjetos.Data.ApplicationUser", null)
  364. .WithMany()
  365. .HasForeignKey("UserId")
  366. .OnDelete(DeleteBehavior.Cascade)
  367. .IsRequired();
  368. });
  369. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  370. {
  371. b.HasOne("ConcursoProjetos.Data.ApplicationUser", null)
  372. .WithMany()
  373. .HasForeignKey("UserId")
  374. .OnDelete(DeleteBehavior.Cascade)
  375. .IsRequired();
  376. });
  377. modelBuilder.Entity("ConcursoProjetos.Domain.Entities.Projeto", b =>
  378. {
  379. b.Navigation("Documentos");
  380. });
  381. #pragma warning restore 612, 618
  382. }
  383. }
  384. }