Add Migration for Discipline Service
This commit is contained in:
parent
ff711c38df
commit
5bb6cfbee8
26 changed files with 7386 additions and 170 deletions
|
|
@ -15,6 +15,7 @@
|
|||
<PackageReference Include="Hangfire" Version="1.8.5" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.5" />
|
||||
<PackageReference Include="Hangfire.MySqlStorage" Version="2.0.3" />
|
||||
<PackageReference Include="Hangfire.Oracle.Core" Version="1.2.17" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
|
||||
|
|
|
|||
|
|
@ -18,9 +18,10 @@ using Serilog.Exceptions;
|
|||
using Serilog.Sinks.Elasticsearch;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Transactions;
|
||||
using System.Data;
|
||||
using BMA.EHR.Discipline.Service.Filters;
|
||||
using BMA.EHR.Application.Repositories;
|
||||
using Hangfire.Oracle.Core;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
{
|
||||
|
|
@ -101,17 +102,18 @@ var builder = WebApplication.CreateBuilder(args);
|
|||
// Register DbContext
|
||||
var defaultConnection = builder.Configuration.GetConnectionString("DefaultConnection");
|
||||
builder.Services.AddDbContext<DisciplineDbContext>(options =>
|
||||
options.UseMySql(defaultConnection, ServerVersion.AutoDetect(defaultConnection)));
|
||||
options.UseOracle(defaultConnection, o => o.MigrationsHistoryTable("__DisciplineMigrationsHistory")));
|
||||
builder.Services.AddHealthChecks();
|
||||
|
||||
// Add Hangfire services.
|
||||
builder.Services.AddHangfire(configuration => configuration
|
||||
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
|
||||
.UseSimpleAssemblyNameTypeSerializer()
|
||||
.UseRecommendedSerializerSettings()
|
||||
.UseStorage(
|
||||
new MySqlStorage(
|
||||
new OracleStorage(
|
||||
defaultConnection,
|
||||
new MySqlStorageOptions
|
||||
new OracleStorageOptions
|
||||
{
|
||||
TransactionIsolationLevel = IsolationLevel.ReadCommitted,
|
||||
QueuePollInterval = TimeSpan.FromSeconds(15),
|
||||
|
|
@ -121,7 +123,7 @@ var builder = WebApplication.CreateBuilder(args);
|
|||
DashboardJobListLimit = 50000,
|
||||
TransactionTimeout = TimeSpan.FromMinutes(1),
|
||||
InvisibilityTimeout = TimeSpan.FromHours(3),
|
||||
TablesPrefix = "Hangfire"
|
||||
SchemaName = "HANGFIRE"
|
||||
})));
|
||||
builder.Services.AddHangfireServer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,10 +14,15 @@
|
|||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
//"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB",
|
||||
"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
||||
"ExamConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_exam_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
||||
"LeaveConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_leave_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
||||
"DisciplineConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_discipline_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
//"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
||||
//"ExamConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_exam_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
||||
//"LeaveConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_leave_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
|
||||
//"DisciplineConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_discipline_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
|
||||
"DefaultConnection": "User Id=sys;Password=FPTadmin2357;DBA Privilege=SYSDBA;Data Source=192.168.1.80:1521/FREE",
|
||||
"ExamConnection": "User Id=sys;Password=FPTadmin2357;DBA Privilege=SYSDBA;Data Source=192.168.1.80:1521/FREE",
|
||||
"LeaveConnection": "User Id=sys;Password=FPTadmin2357;DBA Privilege=SYSDBA;Data Source=192.168.1.80:1521/FREE",
|
||||
"DisciplineConnection": "User Id=sys;Password=FPTadmin2357;DBA Privilege=SYSDBA;Data Source=192.168.1.80:1521/FREE"
|
||||
},
|
||||
"Jwt": {
|
||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ namespace BMA.EHR.Domain.Models.Commands.Core
|
|||
[MaxLength(100), Required, Comment("นามสกุล")]
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
|
||||
[Column(TypeName = "text"), Comment("หมายเหตุ")]
|
||||
[Column(TypeName = "NCLOB"), Comment("หมายเหตุ")]
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
|
||||
[Column(TypeName = "text"), Comment("หมายเหตุแนวนอน")]
|
||||
[Column(TypeName = "NCLOB"), Comment("หมายเหตุแนวนอน")]
|
||||
public string Comment2 { get; set; } = string.Empty;
|
||||
|
||||
[Comment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ")]
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
|
||||
public string RespondentType { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")]
|
||||
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "text")]
|
||||
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
|
||||
[Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
[Required, Comment("สถานะอุทธรณ์/ร้องทุกข์")]
|
||||
public string Status { get; set; } = string.Empty;
|
||||
|
||||
[Comment("เรื่องที่อุทธรณ์/ร้องทุกข์"), Column(TypeName = "text")]
|
||||
[Comment("เรื่องที่อุทธรณ์/ร้องทุกข์"), Column(TypeName = "NCLOB")]
|
||||
public string? Title { get; set; } = string.Empty;
|
||||
|
||||
[Comment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์"), Column(TypeName = "text")]
|
||||
[Comment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์"), Column(TypeName = "NCLOB")]
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("ประเภทอุทธรณ์หรือร้องทุกข์")]
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
|
||||
public string RespondentType { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")]
|
||||
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "text")]
|
||||
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
|
||||
[Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
|
||||
public string RespondentType { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")]
|
||||
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "text")]
|
||||
[Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
|
||||
[Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
[Comment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน")]
|
||||
public DateTime? EndDateSuspend { get; set; }
|
||||
|
||||
[Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")]
|
||||
[Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "NCLOB")]
|
||||
public string? Title { get; set; } = string.Empty;
|
||||
[Comment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)")]
|
||||
public string? OffenseDetails { get; set; } = string.Empty;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
[Required, MaxLength(128)]
|
||||
public string FileType { get; set; } = string.Empty;
|
||||
|
||||
[Column(TypeName = "text")]
|
||||
[Column(TypeName = "NCLOB")]
|
||||
public string Detail { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace BMA.EHR.Domain.Models.HR
|
|||
// public int Order { get; set; }
|
||||
[Comment("ระดับความผิด")]
|
||||
public string? Level { get; set; }
|
||||
[Column(TypeName = "text")]
|
||||
[Column(TypeName = "NCLOB")]
|
||||
[Comment("รายละเอียด")]
|
||||
public string? Detail { get; set; }
|
||||
[Comment("เอกสารอ้างอิง (เลขที่คำสั่ง)")]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BMA.EHR.Domain.Models.HR
|
|||
{
|
||||
[Comment("ระดับความผิด")]
|
||||
public string? Level { get; set; }
|
||||
[Column(TypeName = "text")]
|
||||
[Column(TypeName = "NCLOB")]
|
||||
[Comment("รายละเอียด")]
|
||||
public string? Detail { get; set; }
|
||||
[Comment("เอกสารอ้างอิง (เลขที่คำสั่ง)")]
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace BMA.EHR.Domain.Models.Insignias
|
|||
[Required, MaxLength(50)]
|
||||
public string RequestStatus { get; set; }
|
||||
|
||||
[Column(TypeName = "text")]
|
||||
[Column(TypeName = "NCLOB")]
|
||||
public string RequestNote { get; set; }
|
||||
|
||||
public InsigniaPeriod Period { get; set; }
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ namespace BMA.EHR.Domain.Models.Insignias
|
|||
// [MaxLength(50)]
|
||||
// public string? DocumentStatus { get; set; }
|
||||
|
||||
// [Column(TypeName = "text")]
|
||||
// [Column(TypeName = "NCLOB")]
|
||||
// public string? Note { get; set; }
|
||||
|
||||
// [MaxLength(50)]
|
||||
// public string? Special { get; set; }
|
||||
|
||||
[Column(TypeName = "text"), Comment("รายละเอียดเครื่องราชฯที่ขอ")]
|
||||
[Column(TypeName = "NCLOB"), Comment("รายละเอียดเครื่องราชฯที่ขอ")]
|
||||
public string? MatchingConditions { get; set; }
|
||||
|
||||
[Comment("สถานะตำแหน่งที่ยื่นขอ")]
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ namespace BMA.EHR.Domain.Models.Notifications
|
|||
[Required, MaxLength(200), Comment("หัวเรื่อง")]
|
||||
public string Subject { get; set; }
|
||||
|
||||
[Required, Column(TypeName = "text"), Comment("รายละเอียดข้อความ")]
|
||||
[Required, Column(TypeName = "NCLOB"), Comment("รายละเอียดข้อความ")]
|
||||
public string Body { get; set; }
|
||||
|
||||
[Required, Comment("รหัสผู้รับข้อความ")]
|
||||
public Guid ReceiverUserId { get; set; }
|
||||
|
||||
[Column(TypeName = "text"), Comment("สิงที่แนบมาด้วย")]
|
||||
[Column(TypeName = "NCLOB"), Comment("สิงที่แนบมาด้วย")]
|
||||
public string Payload { get; set; }
|
||||
|
||||
[Comment("เปิดอ่านแล้วหรือยัง")]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace BMA.EHR.Domain.Models.Notifications
|
|||
{
|
||||
public class Notification : EntityBase
|
||||
{
|
||||
[Required, Column(TypeName = "text"), Comment("รายละเอียดข้อความ")]
|
||||
[Required, Column(TypeName = "NCLOB"), Comment("รายละเอียดข้อความ")]
|
||||
public string Body { get; set; }
|
||||
|
||||
[Required, Comment("รหัสผู้รับข้อความ")]
|
||||
|
|
@ -16,7 +16,7 @@ namespace BMA.EHR.Domain.Models.Notifications
|
|||
[Required, Comment("ประเภทการแจ้งเตือน")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[Column(TypeName = "text"), Comment("สิงที่แนบมาด้วย")]
|
||||
[Column(TypeName = "NCLOB"), Comment("สิงที่แนบมาด้วย")]
|
||||
public string Payload { get; set; }
|
||||
|
||||
[Comment("เปิดอ่านแล้วหรือยัง")]
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@ namespace BMA.EHR.Domain.Models.Probation
|
|||
[Required, MaxLength(200), Comment("หัวเรื่อง")]
|
||||
public string Subject { get; set; }
|
||||
|
||||
[Required, Column(TypeName = "text"), Comment("รายละเอียดข้อความ")]
|
||||
[Required, Column(TypeName = "NCLOB"), Comment("รายละเอียดข้อความ")]
|
||||
public string Body { get; set; }
|
||||
|
||||
[Required, Comment("รหัสผู้รับข้อความ")]
|
||||
public Guid ReceiverUserId { get; set; }
|
||||
|
||||
[Column(TypeName = "text"), Comment("สิงที่แนบมาด้วย")]
|
||||
[Column(TypeName = "NCLOB"), Comment("สิงที่แนบมาด้วย")]
|
||||
public string Payload { get; set; } = "";
|
||||
|
||||
[Required, Comment("ส่งอีเมล์หรือไม่?")]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ using Oracle.EntityFrameworkCore.Metadata;
|
|||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
[DbContext(typeof(LeaveDbContext))]
|
||||
[Migration("20240503063836_Init Oracle Project")]
|
||||
[Migration("20240503070436_Init Oracle Project")]
|
||||
partial class InitOracleProject
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -12,7 +12,7 @@ using Oracle.EntityFrameworkCore.Metadata;
|
|||
namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
||||
{
|
||||
[DbContext(typeof(ApplicationDBContext))]
|
||||
[Migration("20240503065717_Init Oracle Project")]
|
||||
[Migration("20240503070505_Init Oracle Project")]
|
||||
partial class InitOracleProject
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -526,12 +526,12 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("หมายเหตุ");
|
||||
|
||||
b.Property<string>("Comment2")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("หมายเหตุแนวนอน");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
|
|
@ -2684,7 +2684,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
.HasComment("วัน เดือน ปี");
|
||||
|
||||
b.Property<string>("Detail")
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียด");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
|
|
@ -2764,7 +2764,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
.HasComment("วัน เดือน ปี");
|
||||
|
||||
b.Property<string>("Detail")
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียด");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
|
|
@ -6465,7 +6465,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("RequestNote")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("NCLOB");
|
||||
|
||||
b.Property<string>("RequestStatus")
|
||||
.IsRequired()
|
||||
|
|
@ -6546,7 +6546,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
.HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)");
|
||||
|
||||
b.Property<string>("MatchingConditions")
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียดเครื่องราชฯที่ขอ");
|
||||
|
||||
b.Property<Guid>("ProfileId")
|
||||
|
|
@ -9534,7 +9534,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Body")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียดข้อความ");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
|
|
@ -9589,7 +9589,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Payload")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("สิงที่แนบมาด้วย");
|
||||
|
||||
b.Property<DateTime>("ReceiveDate")
|
||||
|
|
@ -9722,7 +9722,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Body")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียดข้อความ");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
|
|
@ -9777,7 +9777,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Payload")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("สิงที่แนบมาด้วย");
|
||||
|
||||
b.Property<DateTime>("ReceiveDate")
|
||||
|
|
@ -13943,7 +13943,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Body")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียดข้อความ");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
|
|
@ -13998,7 +13998,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Payload")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("สิงที่แนบมาด้วย");
|
||||
|
||||
b.Property<DateTime>("ReceiveDate")
|
||||
|
|
@ -62,9 +62,9 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
CreatedFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
|
||||
LastUpdateFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"),
|
||||
Subject = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "หัวเรื่อง"),
|
||||
Body = table.Column<string>(type: "text(2000)", nullable: false, comment: "รายละเอียดข้อความ"),
|
||||
Body = table.Column<string>(type: "NCLOB", nullable: false, comment: "รายละเอียดข้อความ"),
|
||||
ReceiverUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "รหัสผู้รับข้อความ"),
|
||||
Payload = table.Column<string>(type: "text(2000)", nullable: false, comment: "สิงที่แนบมาด้วย"),
|
||||
Payload = table.Column<string>(type: "NCLOB", nullable: false, comment: "สิงที่แนบมาด้วย"),
|
||||
IsSendMail = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "ส่งอีเมล์หรือไม่?"),
|
||||
IsSendInbox = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "ส่งกล่องข้อความหรือไม่?"),
|
||||
IsSendNoti = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "ส่งการแจ้งเตือนหรือยัง"),
|
||||
|
|
@ -106,9 +106,9 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
CreatedFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
|
||||
LastUpdateFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"),
|
||||
Subject = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "หัวเรื่อง"),
|
||||
Body = table.Column<string>(type: "text(2000)", nullable: false, comment: "รายละเอียดข้อความ"),
|
||||
Body = table.Column<string>(type: "NCLOB", nullable: false, comment: "รายละเอียดข้อความ"),
|
||||
ReceiverUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "รหัสผู้รับข้อความ"),
|
||||
Payload = table.Column<string>(type: "text(2000)", nullable: false, comment: "สิงที่แนบมาด้วย"),
|
||||
Payload = table.Column<string>(type: "NCLOB", nullable: false, comment: "สิงที่แนบมาด้วย"),
|
||||
IsOpen = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "เปิดอ่านแล้วหรือยัง"),
|
||||
ReceiveDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "วันที่ได้รับ"),
|
||||
OpenDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่เปิดอ่าน"),
|
||||
|
|
@ -234,10 +234,10 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
LastUpdateUserId = table.Column<string>(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"),
|
||||
CreatedFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
|
||||
LastUpdateFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"),
|
||||
Body = table.Column<string>(type: "text(2000)", nullable: false, comment: "รายละเอียดข้อความ"),
|
||||
Body = table.Column<string>(type: "NCLOB", nullable: false, comment: "รายละเอียดข้อความ"),
|
||||
ReceiverUserId = table.Column<Guid>(type: "RAW(16)", nullable: false, comment: "รหัสผู้รับข้อความ"),
|
||||
Type = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "ประเภทการแจ้งเตือน"),
|
||||
Payload = table.Column<string>(type: "text(2000)", nullable: false, comment: "สิงที่แนบมาด้วย"),
|
||||
Payload = table.Column<string>(type: "NCLOB", nullable: false, comment: "สิงที่แนบมาด้วย"),
|
||||
IsOpen = table.Column<bool>(type: "NUMBER(1)", nullable: false, comment: "เปิดอ่านแล้วหรือยัง"),
|
||||
ReceiveDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false, comment: "วันที่ได้รับ"),
|
||||
OpenDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่เปิดอ่าน"),
|
||||
|
|
@ -1344,7 +1344,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
CreatedFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"),
|
||||
LastUpdateFullName = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"),
|
||||
RequestStatus = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: false),
|
||||
RequestNote = table.Column<string>(type: "text(2000)", nullable: false),
|
||||
RequestNote = table.Column<string>(type: "NCLOB", nullable: false),
|
||||
PeriodId = table.Column<Guid>(type: "RAW(16)", nullable: false),
|
||||
OrganizationId = table.Column<Guid>(type: "RAW(16)", nullable: false),
|
||||
DocumentId = table.Column<Guid>(type: "RAW(16)", nullable: true)
|
||||
|
|
@ -1820,7 +1820,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
RequestDate = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
|
||||
Salary = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
|
||||
IsApprove = table.Column<bool>(type: "NUMBER(1)", nullable: false),
|
||||
MatchingConditions = table.Column<string>(type: "text(2000)", nullable: true, comment: "รายละเอียดเครื่องราชฯที่ขอ"),
|
||||
MatchingConditions = table.Column<string>(type: "NCLOB", nullable: true, comment: "รายละเอียดเครื่องราชฯที่ขอ"),
|
||||
Status = table.Column<string>(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะตำแหน่งที่ยื่นขอ"),
|
||||
ReasonReject = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลไม่ยื่นขอ"),
|
||||
Reason = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลการได้รับเครื่องราชฯ"),
|
||||
|
|
@ -2301,8 +2301,8 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
Prefix = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: false, comment: "คำนำหน้านาม"),
|
||||
FirstName = table.Column<string>(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "ชื่อ"),
|
||||
LastName = table.Column<string>(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "นามสกุล"),
|
||||
Comment = table.Column<string>(type: "text(2000)", nullable: false, comment: "หมายเหตุ"),
|
||||
Comment2 = table.Column<string>(type: "text(2000)", nullable: false, comment: "หมายเหตุแนวนอน"),
|
||||
Comment = table.Column<string>(type: "NCLOB", nullable: false, comment: "หมายเหตุ"),
|
||||
Comment2 = table.Column<string>(type: "NCLOB", nullable: false, comment: "หมายเหตุแนวนอน"),
|
||||
RefPlacementProfileId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"),
|
||||
RefDisciplineId = table.Column<Guid>(type: "RAW(16)", nullable: true, comment: "รหัสอ้างอิงไปยังข้อมูลวินัย"),
|
||||
Amount = table.Column<double>(type: "BINARY_DOUBLE", nullable: true, comment: "เงินเดือน"),
|
||||
|
|
@ -523,12 +523,12 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("หมายเหตุ");
|
||||
|
||||
b.Property<string>("Comment2")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("หมายเหตุแนวนอน");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
|
|
@ -2681,7 +2681,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
.HasComment("วัน เดือน ปี");
|
||||
|
||||
b.Property<string>("Detail")
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียด");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
|
|
@ -2761,7 +2761,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
.HasComment("วัน เดือน ปี");
|
||||
|
||||
b.Property<string>("Detail")
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียด");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
|
|
@ -6462,7 +6462,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("RequestNote")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("NCLOB");
|
||||
|
||||
b.Property<string>("RequestStatus")
|
||||
.IsRequired()
|
||||
|
|
@ -6543,7 +6543,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
.HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)");
|
||||
|
||||
b.Property<string>("MatchingConditions")
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียดเครื่องราชฯที่ขอ");
|
||||
|
||||
b.Property<Guid>("ProfileId")
|
||||
|
|
@ -9531,7 +9531,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Body")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียดข้อความ");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
|
|
@ -9586,7 +9586,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Payload")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("สิงที่แนบมาด้วย");
|
||||
|
||||
b.Property<DateTime>("ReceiveDate")
|
||||
|
|
@ -9719,7 +9719,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Body")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียดข้อความ");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
|
|
@ -9774,7 +9774,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Payload")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("สิงที่แนบมาด้วย");
|
||||
|
||||
b.Property<DateTime>("ReceiveDate")
|
||||
|
|
@ -13940,7 +13940,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Body")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("รายละเอียดข้อความ");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
|
|
@ -13995,7 +13995,7 @@ namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB
|
|||
|
||||
b.Property<string>("Payload")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnType("NCLOB")
|
||||
.HasComment("สิงที่แนบมาด้วย");
|
||||
|
||||
b.Property<DateTime>("ReceiveDate")
|
||||
|
|
|
|||
3016
BMA.EHR.Infrastructure/Migrations/DisciplineDb/20240503071644_Init Oracle Project.Designer.cs
generated
Normal file
3016
BMA.EHR.Infrastructure/Migrations/DisciplineDb/20240503071644_Init Oracle Project.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -45,112 +45,18 @@ namespace BMA.EHR.Infrastructure.Persistence
|
|||
|
||||
#endregion
|
||||
|
||||
// #region " Meta Data "
|
||||
|
||||
// public DbSet<Prefix> Prefixes { get; set; }
|
||||
|
||||
// public DbSet<BloodGroup> BloodGroups { get; set; }
|
||||
|
||||
// public DbSet<Gender> Genders { get; set; }
|
||||
|
||||
// public DbSet<PhysicalStatus> PhysicalStatuses { get; set; }
|
||||
|
||||
// public DbSet<Religion> Religions { get; set; }
|
||||
|
||||
// public DbSet<EducationLevel> EducationLevels { get; set; }
|
||||
|
||||
// public DbSet<PositionPath> PositionPaths { get; set; }
|
||||
|
||||
// public DbSet<PositionType> PositionTypes { get; set; }
|
||||
|
||||
// public DbSet<PositionEmployeePosition> PositionEmployeePositions { get; set; }
|
||||
|
||||
// public DbSet<PositionEmployeePositionSide> PositionEmployeePositionSides { get; set; }
|
||||
|
||||
// public DbSet<PositionEmployeeGroup> PositionEmployeeGroups { get; set; }
|
||||
|
||||
// public DbSet<PositionEmployeeLine> PositionEmployeeLines { get; set; }
|
||||
|
||||
// public DbSet<PositionEmployeeLevel> PositionEmployeeLevels { get; set; }
|
||||
|
||||
// public DbSet<PositionEmployeeStatus> PositionEmployeeStatuses { get; set; }
|
||||
|
||||
// public DbSet<PositionLine> PositionLines { get; set; }
|
||||
|
||||
// public DbSet<PositionExecutive> PositionExecutives { get; set; }
|
||||
|
||||
// public DbSet<PositionStatus> PositionStatuss { get; set; }
|
||||
|
||||
// public DbSet<PositionLevel> PositionLevels { get; set; }
|
||||
|
||||
// public DbSet<Relationship> Relationships { get; set; }
|
||||
|
||||
// public DbSet<Position> Positions { get; set; }
|
||||
|
||||
// public DbSet<PositionPathSide> PositionPathSides { get; set; }
|
||||
|
||||
// public DbSet<PositionExecutiveSide> PositionExecutiveSides { get; set; }
|
||||
|
||||
// public DbSet<InsigniaType> InsigniaTypes { get; set; }
|
||||
|
||||
// public DbSet<Insignia> Insignias { get; set; }
|
||||
|
||||
// public DbSet<Province> Provinces { get; set; }
|
||||
|
||||
// public DbSet<District> Districts { get; set; }
|
||||
|
||||
// public DbSet<SubDistrict> SubDistricts { get; set; }
|
||||
|
||||
// public DbSet<Holiday> Holidays { get; set; }
|
||||
|
||||
// public DbSet<OrganizationType> OrganizationTypes { get; set; }
|
||||
|
||||
// public DbSet<OrganizationLevel> OrganizationLevels { get; set; }
|
||||
|
||||
// public DbSet<OrganizationOrganization> OrganizationOrganizations { get; set; }
|
||||
|
||||
// public DbSet<OrganizationShortName> OrganizationShortNames { get; set; }
|
||||
|
||||
// public DbSet<OrganizationStatus> OrganizationStatuses { get; set; }
|
||||
|
||||
// public DbSet<OrganizationAgency> OrganizationAgencys { get; set; }
|
||||
|
||||
// public DbSet<OrganizationGovernmentAgency> OrganizationGovernmentAgencys { get; set; }
|
||||
|
||||
// public DbSet<OrganizationTelExternal> OrganizationTelExternals { get; set; }
|
||||
|
||||
// public DbSet<OrganizationTelInternal> OrganizationTelInternals { get; set; }
|
||||
|
||||
// public DbSet<OrganizationFax> OrganizationFaxs { get; set; }
|
||||
|
||||
// public DbSet<RoyalHierarchy> RoyalHierarchys { get; set; }
|
||||
|
||||
// public DbSet<RoyalType> RoyalTypes { get; set; }
|
||||
|
||||
// public DbSet<Royal> Royals { get; set; }
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region " Organizations "
|
||||
|
||||
// public DbSet<AvailablePositionLevelEntity> AvailablePositionLevels { get; set; }
|
||||
|
||||
// public DbSet<PositionMasterEntity> PositionMasters { get; set; }
|
||||
|
||||
// public DbSet<OrganizationEntity> Organizations { get; set; }
|
||||
|
||||
// public DbSet<PositionNumberEntity> PositionNumbers { get; set; }
|
||||
|
||||
// public DbSet<OrganizationPositionEntity> OrganizationPositions { get; set; }
|
||||
|
||||
// public DbSet<ProfilePosition> ProfilePositions { get; set; }
|
||||
|
||||
// #endregion
|
||||
|
||||
public DisciplineDbContext(DbContextOptions<DisciplineDbContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
// Document
|
||||
modelBuilder.Entity<Document>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||
}
|
||||
|
||||
public Task<int> SaveChangesAsync()
|
||||
{
|
||||
return base.SaveChangesAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue