แก้ api เพิ่มเติมการ upload image and document

This commit is contained in:
Suphonchai Phoonsawat 2023-05-02 22:59:01 +07:00
parent 86ec5de116
commit 6acd497afe
23 changed files with 4081 additions and 53 deletions

View file

@ -716,6 +716,70 @@ namespace BMA.EHR.Recruit.Service.Migrations
b.ToTable("RecruitImports");
});
modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportDocument", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<Guid>("DocumentId")
.HasColumnType("char(36)")
.HasComment("Id เอกสาร");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid>("RecruitImportId")
.HasColumnType("char(36)")
.HasComment("Id รอบสมัครสอบ");
b.HasKey("Id");
b.HasIndex("DocumentId");
b.HasIndex("RecruitImportId");
b.ToTable("RecruitImportDocuments");
});
modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportHistory", b =>
{
b.Property<Guid>("Id")
@ -779,6 +843,70 @@ namespace BMA.EHR.Recruit.Service.Migrations
b.ToTable("RecruitImportHistories");
});
modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportImage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
.HasComment("สร้างข้อมูลเมื่อ");
b.Property<string>("CreatedFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(104)
.HasComment("ชื่อ User ที่สร้างข้อมูล");
b.Property<string>("CreatedUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<Guid>("DocumentId")
.HasColumnType("char(36)")
.HasComment("Id ไฟล์รูป");
b.Property<string>("LastUpdateFullName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasColumnOrder(105)
.HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
b.Property<string>("LastUpdateUserId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnOrder(103)
.HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
b.Property<DateTime?>("LastUpdatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<Guid>("RecruitImportId")
.HasColumnType("char(36)")
.HasComment("Id รอบสมัครสอบ");
b.HasKey("Id");
b.HasIndex("DocumentId");
b.HasIndex("RecruitImportId");
b.ToTable("RecruitImportImages");
});
modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitOccupation", b =>
{
b.Property<Guid>("Id")
@ -1263,6 +1391,25 @@ namespace BMA.EHR.Recruit.Service.Migrations
b.Navigation("ImportFile");
});
modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportDocument", b =>
{
b.HasOne("BMA.EHR.Recruit.Service.Models.Documents.Document", "Document")
.WithMany()
.HasForeignKey("DocumentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", "RecruitImport")
.WithMany("RecruitDocuments")
.HasForeignKey("RecruitImportId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Document");
b.Navigation("RecruitImport");
});
modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportHistory", b =>
{
b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", "RecruitImport")
@ -1274,6 +1421,25 @@ namespace BMA.EHR.Recruit.Service.Migrations
b.Navigation("RecruitImport");
});
modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImportImage", b =>
{
b.HasOne("BMA.EHR.Recruit.Service.Models.Documents.Document", "Document")
.WithMany()
.HasForeignKey("DocumentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.RecruitImport", "RecruitImport")
.WithMany("RecruitImages")
.HasForeignKey("RecruitImportId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Document");
b.Navigation("RecruitImport");
});
modelBuilder.Entity("BMA.EHR.Recruit.Service.Models.Recruits.RecruitOccupation", b =>
{
b.HasOne("BMA.EHR.Recruit.Service.Models.Recruits.Recruit", "Recruit")
@ -1345,6 +1511,10 @@ namespace BMA.EHR.Recruit.Service.Migrations
{
b.Navigation("ImportHostories");
b.Navigation("RecruitDocuments");
b.Navigation("RecruitImages");
b.Navigation("Recruits");
b.Navigation("ScoreImport")