noti probation

This commit is contained in:
Kittapath 2023-09-08 15:23:41 +07:00
parent ffac27ef76
commit 3a334387bd
20 changed files with 33093 additions and 91 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,186 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class addtablecronjobprobation : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "Year",
table: "InsigniaPeriods",
type: "int",
nullable: false,
comment: "ปี",
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<string>(
name: "Type",
table: "InsigniaPeriods",
type: "varchar(10)",
maxLength: 10,
nullable: true,
comment: "ประเภทการขอ",
oldClrType: typeof(string),
oldType: "varchar(10)",
oldMaxLength: 10,
oldNullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<DateTime>(
name: "StartDate",
table: "InsigniaPeriods",
type: "datetime(6)",
nullable: false,
comment: "วันที่เริ่ม",
oldClrType: typeof(DateTime),
oldType: "datetime(6)");
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "InsigniaPeriods",
type: "varchar(200)",
maxLength: 200,
nullable: true,
comment: "ชื่อรอบเสนอขอเครื่องราชฯ",
oldClrType: typeof(string),
oldType: "varchar(200)",
oldMaxLength: 200,
oldNullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<DateTime>(
name: "EndDate",
table: "InsigniaPeriods",
type: "datetime(6)",
nullable: false,
comment: "วันที่สิ้นสุด",
oldClrType: typeof(DateTime),
oldType: "datetime(6)");
migrationBuilder.AlterColumn<int>(
name: "Amount",
table: "InsigniaPeriods",
type: "int",
maxLength: 50,
nullable: false,
comment: "จำนวนวันแจ้งเตือนล่วงหน้า",
oldClrType: typeof(int),
oldType: "int",
oldMaxLength: 50);
migrationBuilder.CreateTable(
name: "CronjobNotiProbations",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
Subject = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "หัวเรื่อง")
.Annotation("MySql:CharSet", "utf8mb4"),
Body = table.Column<string>(type: "text", nullable: false, comment: "รายละเอียดข้อความ")
.Annotation("MySql:CharSet", "utf8mb4"),
ReceiverUserId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสผู้รับข้อความ", collation: "ascii_general_ci"),
Payload = table.Column<string>(type: "text", nullable: false, comment: "สิงที่แนบมาด้วย")
.Annotation("MySql:CharSet", "utf8mb4"),
IsSendMail = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ส่งอีเมล์หรือไม่?"),
IsSendInbox = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "ส่งกล่องข้อความหรือไม่?"),
ReceiveDate = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "วันที่ได้รับ")
},
constraints: table =>
{
table.PrimaryKey("PK_CronjobNotiProbations", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CronjobNotiProbations");
migrationBuilder.AlterColumn<int>(
name: "Year",
table: "InsigniaPeriods",
type: "int",
nullable: false,
oldClrType: typeof(int),
oldType: "int",
oldComment: "ปี");
migrationBuilder.AlterColumn<string>(
name: "Type",
table: "InsigniaPeriods",
type: "varchar(10)",
maxLength: 10,
nullable: true,
oldClrType: typeof(string),
oldType: "varchar(10)",
oldMaxLength: 10,
oldNullable: true,
oldComment: "ประเภทการขอ")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<DateTime>(
name: "StartDate",
table: "InsigniaPeriods",
type: "datetime(6)",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime(6)",
oldComment: "วันที่เริ่ม");
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "InsigniaPeriods",
type: "varchar(200)",
maxLength: 200,
nullable: true,
oldClrType: typeof(string),
oldType: "varchar(200)",
oldMaxLength: 200,
oldNullable: true,
oldComment: "ชื่อรอบเสนอขอเครื่องราชฯ")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<DateTime>(
name: "EndDate",
table: "InsigniaPeriods",
type: "datetime(6)",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime(6)",
oldComment: "วันที่สิ้นสุด");
migrationBuilder.AlterColumn<int>(
name: "Amount",
table: "InsigniaPeriods",
type: "int",
maxLength: 50,
nullable: false,
oldClrType: typeof(int),
oldType: "int",
oldMaxLength: 50,
oldComment: "จำนวนวันแจ้งเตือนล่วงหน้า");
}
}
}

View file

@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetablecronjobprobationaddissendnoti : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsSendNoti",
table: "CronjobNotiProbations",
type: "tinyint(1)",
nullable: false,
defaultValue: false,
comment: "ส่งการแจ้งเตือนหรือยัง");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsSendNoti",
table: "CronjobNotiProbations");
}
}
}

View file

@ -5765,7 +5765,8 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<int>("Amount")
.HasMaxLength(50)
.HasColumnType("int");
.HasColumnType("int")
.HasComment("จำนวนวันแจ้งเตือนล่วงหน้า");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
@ -5787,7 +5788,8 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime>("EndDate")
.HasColumnType("datetime(6)");
.HasColumnType("datetime(6)")
.HasComment("วันที่สิ้นสุด");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
@ -5818,7 +5820,8 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<string>("Name")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
.HasColumnType("varchar(200)")
.HasComment("ชื่อรอบเสนอขอเครื่องราชฯ");
b.Property<Guid?>("ReliefDocId")
.HasColumnType("char(36)");
@ -5828,14 +5831,17 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasComment("ราบการยื่นขอ");
b.Property<DateTime>("StartDate")
.HasColumnType("datetime(6)");
.HasColumnType("datetime(6)")
.HasComment("วันที่เริ่ม");
b.Property<string>("Type")
.HasMaxLength(10)
.HasColumnType("varchar(10)");
.HasColumnType("varchar(10)")
.HasComment("ประเภทการขอ");
b.Property<int>("Year")
.HasColumnType("int");
.HasColumnType("int")
.HasComment("ปี");
b.HasKey("Id");
@ -12591,6 +12597,94 @@ namespace BMA.EHR.Infrastructure.Migrations
b.ToTable("PlacementTypes");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnOrder(0)
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<string>("Body")
.IsRequired()
.HasColumnType("text")
.HasComment("รายละเอียดข้อความ");
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<bool>("IsSendInbox")
.HasColumnType("tinyint(1)")
.HasComment("ส่งกล่องข้อความหรือไม่?");
b.Property<bool>("IsSendMail")
.HasColumnType("tinyint(1)")
.HasComment("ส่งอีเมล์หรือไม่?");
b.Property<bool>("IsSendNoti")
.HasColumnType("tinyint(1)")
.HasComment("ส่งการแจ้งเตือนหรือยัง");
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<string>("Payload")
.IsRequired()
.HasColumnType("text")
.HasComment("สิงที่แนบมาด้วย");
b.Property<DateTime>("ReceiveDate")
.HasColumnType("datetime(6)")
.HasComment("วันที่ได้รับ");
b.Property<Guid>("ReceiverUserId")
.HasColumnType("char(36)")
.HasComment("รหัสผู้รับข้อความ");
b.Property<string>("Subject")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)")
.HasComment("หัวเรื่อง");
b.HasKey("Id");
b.ToTable("CronjobNotiProbations");
});
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b =>
{
b.Property<Guid>("Id")