แก้ฟิว placementeducation
This commit is contained in:
parent
55a5914967
commit
85bc0fd359
5 changed files with 10784 additions and 40 deletions
|
|
@ -9,23 +9,37 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
{
|
||||
[Required, Comment("Id ผู้สมัคร")]
|
||||
public virtual PlacementProfile? PlacementProfile { get; set; }
|
||||
|
||||
[Comment("Idวุฒิที่ได้รับ")]
|
||||
public virtual EducationLevel? EducationLevel { get; set; }
|
||||
|
||||
[Required, Comment("สาขาวิชา/วิชาเอก")]
|
||||
public string Major { get; set; } = string.Empty;
|
||||
|
||||
[Required, MaxLength(10), Comment("คะแนนเฉลี่ยตลอดหลักสูตร")]
|
||||
public float Scores { get; set; }
|
||||
|
||||
[Required, Comment("ชื่อสถานศึกษา")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("ระยะเวลาเริ่ม")]
|
||||
public DateTime DurationStart { get; set; } = DateTime.Now.Date;
|
||||
|
||||
[Required, Comment("ระยะเวลาสิ้นสุด")]
|
||||
public DateTime DurationEnd { get; set; } = DateTime.Now.Date;
|
||||
[MaxLength(1000), Comment("สถานศึกษา")]
|
||||
public string? Institute { get; set; }
|
||||
[MaxLength(200), Comment("วุฒิการศึกษา")]
|
||||
public string? Degree { get; set; }
|
||||
[MaxLength(200), Comment("สาขาวิชา/ทาง")]
|
||||
public string? Field { get; set; }
|
||||
[MaxLength(20), Comment("เกรดเฉลี่ย")]
|
||||
public string? Gpa { get; set; }
|
||||
[MaxLength(1000), Comment("ประเทศ")]
|
||||
public string? Country { get; set; }
|
||||
[MaxLength(1000), Comment("ระยะเวลา")]
|
||||
public string? Duration { get; set; }
|
||||
[MaxLength(1000), Comment("ข้อมูลการติดต่อ")]
|
||||
public string? Other { get; set; }
|
||||
[MaxLength(1000), Comment("ทุน")]
|
||||
public string? FundName { get; set; }
|
||||
[Comment("ระยะเวลาหลักสูตร")]
|
||||
public int DurationYear { get; set; }
|
||||
[Comment("วันที่สำเร็จการศึกษา")]
|
||||
public DateTime? FinishDate { get; set; }
|
||||
[Comment("ประเภทช่วงเวลาการศึกษา")]
|
||||
public bool? IsDate { get; set; }
|
||||
[Comment("ตั้งแต่")]
|
||||
public DateTime? StartDate { get; set; }
|
||||
[Comment("ถึง")]
|
||||
public DateTime? EndDate { get; set; }
|
||||
[Comment("Id เป็นวุฒิการศึกษาในตำแหน่ง")]
|
||||
public PositionPath? PositionPath { get; set; }
|
||||
[Comment("เป็นวุฒิศึกษาในตำแหน่ง")]
|
||||
public bool? IsEducation { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
10386
BMA.EHR.Infrastructure/Migrations/20230706023149_Update table placementEducation add Degree.Designer.cs
generated
Normal file
10386
BMA.EHR.Infrastructure/Migrations/20230706023149_Update table placementEducation add Degree.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,282 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class UpdatetableplacementEducationaddDegree : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DurationEnd",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DurationStart",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Major",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Name",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Scores",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Country",
|
||||
table: "PlacementEducations",
|
||||
type: "varchar(1000)",
|
||||
maxLength: 1000,
|
||||
nullable: true,
|
||||
comment: "ประเทศ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Degree",
|
||||
table: "PlacementEducations",
|
||||
type: "varchar(200)",
|
||||
maxLength: 200,
|
||||
nullable: true,
|
||||
comment: "วุฒิการศึกษา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Duration",
|
||||
table: "PlacementEducations",
|
||||
type: "varchar(1000)",
|
||||
maxLength: 1000,
|
||||
nullable: true,
|
||||
comment: "ระยะเวลา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "DurationYear",
|
||||
table: "PlacementEducations",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
comment: "ระยะเวลาหลักสูตร");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "EndDate",
|
||||
table: "PlacementEducations",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "ถึง");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Field",
|
||||
table: "PlacementEducations",
|
||||
type: "varchar(200)",
|
||||
maxLength: 200,
|
||||
nullable: true,
|
||||
comment: "สาขาวิชา/ทาง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "FinishDate",
|
||||
table: "PlacementEducations",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "วันที่สำเร็จการศึกษา");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FundName",
|
||||
table: "PlacementEducations",
|
||||
type: "varchar(1000)",
|
||||
maxLength: 1000,
|
||||
nullable: true,
|
||||
comment: "ทุน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Gpa",
|
||||
table: "PlacementEducations",
|
||||
type: "varchar(20)",
|
||||
maxLength: 20,
|
||||
nullable: true,
|
||||
comment: "เกรดเฉลี่ย")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Institute",
|
||||
table: "PlacementEducations",
|
||||
type: "varchar(1000)",
|
||||
maxLength: 1000,
|
||||
nullable: true,
|
||||
comment: "สถานศึกษา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsDate",
|
||||
table: "PlacementEducations",
|
||||
type: "tinyint(1)",
|
||||
nullable: true,
|
||||
comment: "ประเภทช่วงเวลาการศึกษา");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsEducation",
|
||||
table: "PlacementEducations",
|
||||
type: "tinyint(1)",
|
||||
nullable: true,
|
||||
comment: "เป็นวุฒิศึกษาในตำแหน่ง");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Other",
|
||||
table: "PlacementEducations",
|
||||
type: "varchar(1000)",
|
||||
maxLength: 1000,
|
||||
nullable: true,
|
||||
comment: "ข้อมูลการติดต่อ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionPathId",
|
||||
table: "PlacementEducations",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "StartDate",
|
||||
table: "PlacementEducations",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "ตั้งแต่");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementEducations_PositionPathId",
|
||||
table: "PlacementEducations",
|
||||
column: "PositionPathId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementEducations_PositionPaths_PositionPathId",
|
||||
table: "PlacementEducations",
|
||||
column: "PositionPathId",
|
||||
principalTable: "PositionPaths",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementEducations_PositionPaths_PositionPathId",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementEducations_PositionPathId",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Country",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Degree",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Duration",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DurationYear",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EndDate",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Field",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FinishDate",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FundName",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Gpa",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Institute",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsDate",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsEducation",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Other",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionPathId",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "StartDate",
|
||||
table: "PlacementEducations");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DurationEnd",
|
||||
table: "PlacementEducations",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
comment: "ระยะเวลาสิ้นสุด");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DurationStart",
|
||||
table: "PlacementEducations",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
comment: "ระยะเวลาเริ่ม");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Major",
|
||||
table: "PlacementEducations",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "สาขาวิชา/วิชาเอก")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Name",
|
||||
table: "PlacementEducations",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "ชื่อสถานศึกษา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "Scores",
|
||||
table: "PlacementEducations",
|
||||
type: "float",
|
||||
maxLength: 10,
|
||||
nullable: false,
|
||||
defaultValue: 0f,
|
||||
comment: "คะแนนเฉลี่ยตลอดหลักสูตร");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -8618,6 +8618,11 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("varchar(1000)")
|
||||
.HasComment("ประเทศ");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
|
|
@ -8637,17 +8642,59 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<DateTime>("DurationEnd")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ระยะเวลาสิ้นสุด");
|
||||
b.Property<string>("Degree")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasComment("วุฒิการศึกษา");
|
||||
|
||||
b.Property<DateTime>("DurationStart")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ระยะเวลาเริ่ม");
|
||||
b.Property<string>("Duration")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("varchar(1000)")
|
||||
.HasComment("ระยะเวลา");
|
||||
|
||||
b.Property<int>("DurationYear")
|
||||
.HasColumnType("int")
|
||||
.HasComment("ระยะเวลาหลักสูตร");
|
||||
|
||||
b.Property<Guid?>("EducationLevelId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime?>("EndDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ถึง");
|
||||
|
||||
b.Property<string>("Field")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)")
|
||||
.HasComment("สาขาวิชา/ทาง");
|
||||
|
||||
b.Property<DateTime?>("FinishDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่สำเร็จการศึกษา");
|
||||
|
||||
b.Property<string>("FundName")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("varchar(1000)")
|
||||
.HasComment("ทุน");
|
||||
|
||||
b.Property<string>("Gpa")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("varchar(20)")
|
||||
.HasComment("เกรดเฉลี่ย");
|
||||
|
||||
b.Property<string>("Institute")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("varchar(1000)")
|
||||
.HasComment("สถานศึกษา");
|
||||
|
||||
b.Property<bool?>("IsDate")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ประเภทช่วงเวลาการศึกษา");
|
||||
|
||||
b.Property<bool?>("IsEducation")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("เป็นวุฒิศึกษาในตำแหน่ง");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
|
|
@ -8667,23 +8714,20 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<string>("Major")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สาขาวิชา/วิชาเอก");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อสถานศึกษา");
|
||||
b.Property<string>("Other")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("varchar(1000)")
|
||||
.HasComment("ข้อมูลการติดต่อ");
|
||||
|
||||
b.Property<Guid>("PlacementProfileId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<float>("Scores")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("float")
|
||||
.HasComment("คะแนนเฉลี่ยตลอดหลักสูตร");
|
||||
b.Property<Guid?>("PositionPathId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime?>("StartDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ตั้งแต่");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
|
|
@ -8691,6 +8735,8 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasIndex("PlacementProfileId");
|
||||
|
||||
b.HasIndex("PositionPathId");
|
||||
|
||||
b.ToTable("PlacementEducations");
|
||||
});
|
||||
|
||||
|
|
@ -9989,9 +10035,15 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionPathId");
|
||||
|
||||
b.Navigation("EducationLevel");
|
||||
|
||||
b.Navigation("PlacementProfile");
|
||||
|
||||
b.Navigation("PositionPath");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b =>
|
||||
|
|
|
|||
|
|
@ -163,11 +163,21 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
{
|
||||
Id = p.Id,
|
||||
EducationLevel = p.EducationLevel == null ? null : p.EducationLevel.Name,
|
||||
Major = p.Major,
|
||||
Scores = p.Scores,
|
||||
Name = p.Name,
|
||||
DurationStart = p.DurationStart,
|
||||
DurationEnd = p.DurationEnd,
|
||||
Institute = p.Institute,
|
||||
Degree = p.Degree,
|
||||
Field = p.Field,
|
||||
Gpa = p.Gpa,
|
||||
Country = p.Country,
|
||||
Duration = p.Duration,
|
||||
Other = p.Other,
|
||||
FundName = p.FundName,
|
||||
DurationYear = p.DurationYear,
|
||||
FinishDate = p.FinishDate,
|
||||
IsDate = p.IsDate,
|
||||
StartDate = p.StartDate,
|
||||
EndDate = p.EndDate,
|
||||
PositionPath = p.PositionPath == null ? null : p.PositionPath.Name,
|
||||
IsEducation = p.IsEducation,
|
||||
}),
|
||||
RegistSubDistrict = x.RegistSubDistrict == null ? null : x.RegistSubDistrict.Name,
|
||||
RegistSubDistrictId = x.RegistSubDistrict == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.RegistSubDistrict.Id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue