first commit

This commit is contained in:
Suphonchai Phoonsawat 2023-03-13 12:29:56 +07:00
commit f797ff3e50
228 changed files with 25555 additions and 0 deletions

25
.dockerignore Normal file
View file

@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,59 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>d45c95ce-6b9d-4aa7-aaaf-62fe8b792934</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;1591;0436;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;1591;0436;</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BMA.EHR.Core" Version="1.0.0" />
<PackageReference Include="BMA.EHR.Extensions" Version="1.0.1" />
<PackageReference Include="CoreAdmin" Version="2.7.0" />
<PackageReference Include="EPPlus" Version="6.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
<PackageReference Include="MongoDB.Driver" Version="2.19.0" />
<PackageReference Include="MongoDB.Driver.GridFS" Version="2.19.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
<PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="6.0.5.128" />
<PackageReference Include="Sentry.AspNetCore" Version="3.29.1" />
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" />
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0" />
<PackageReference Include="WatchDog.NET" Version="1.4.6" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugProfile>dotnet</ActiveDebugProfile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33424.131
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Recruit.Service", "BMA.EHR.Recruit.Service.csproj", "{3FBBE410-D10A-4FF6-9BEE-F663381CCA22}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3FBBE410-D10A-4FF6-9BEE-F663381CCA22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FBBE410-D10A-4FF6-9BEE-F663381CCA22}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FBBE410-D10A-4FF6-9BEE-F663381CCA22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FBBE410-D10A-4FF6-9BEE-F663381CCA22}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {90BA1E8F-06B9-4688-B5C7-42BC6DC500E9}
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,84 @@
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using System.Reflection;
namespace BMA.EHR.Recruit.Service
{
public class ConfigureSwaggerOptions : IConfigureNamedOptions<SwaggerGenOptions>
{
private readonly IApiVersionDescriptionProvider _provider;
public ConfigureSwaggerOptions(
IApiVersionDescriptionProvider provider)
{
_provider = provider;
}
public void Configure(SwaggerGenOptions options)
{
// add swagger document for every API version discovered
foreach (var description in _provider.ApiVersionDescriptions)
{
options.EnableAnnotations();
options.SwaggerDoc(
description.GroupName,
CreateVersionInfo(description));
}
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{
In = ParameterLocation.Header,
Description = "Please enter a valid token",
Name = "Authorization",
Type = SecuritySchemeType.Http,
BearerFormat = "JWT",
Scheme = "Bearer"
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id = "Bearer"
}
},
new string[]{}
}
});
// generate the XML docs that'll drive the swagger docs
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
options.IncludeXmlComments(xmlPath);
}
public void Configure(string name, SwaggerGenOptions options)
{
Configure(options);
}
private OpenApiInfo CreateVersionInfo(
ApiVersionDescription desc)
{
var info = new OpenApiInfo()
{
Title = "BMA EHR Recruit Service Document",
Version = desc.ApiVersion.ToString()
};
if (desc.IsDeprecated)
{
info.Description += " This API version has been deprecated. Please use one of the new APIs available from the explorer.";
}
return info;
}
}
}

8
Core/GlobalMessages.cs Normal file
View file

@ -0,0 +1,8 @@
namespace BMA.EHR.Recruit.Service.Core
{
public class GlobalMessages
{
public const string FileNotFoundOnServer = "ไม่พบไฟล์ในระบบ!!";
public const string CannotInsertToDatabase = "ไม่สามารถบันทึกลงฐานข้อมูลได้!!";
}
}

View file

@ -0,0 +1,47 @@
using BMA.EHR.Recruit.Service.Models.Documents;
using BMA.EHR.Recruit.Service.Models.Recruits;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Recruit.Service.Data
{
public class ApplicationDbContext : DbContext
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
// recruit relation setup
modelBuilder.Entity<RecruitImport>().HasMany(x => x.Recruits).WithOne(x => x.RecruitImport).OnDelete(DeleteBehavior.Cascade);
modelBuilder.Entity<Models.Recruits.Recruit>().HasMany(x => x.Educations).WithOne(x => x.Recruit).OnDelete(DeleteBehavior.Cascade);
modelBuilder.Entity<Models.Recruits.Recruit>().HasMany(x => x.Occupations).WithOne(x => x.Recruit).OnDelete(DeleteBehavior.Cascade);
modelBuilder.Entity<Models.Recruits.Recruit>().HasMany(x => x.Addresses).WithOne(x => x.Recruit).OnDelete(DeleteBehavior.Cascade);
modelBuilder.Entity<Models.Recruits.Recruit>().HasMany(x => x.Certificates).WithOne(x => x.Recruit).OnDelete(DeleteBehavior.Cascade);
modelBuilder.Entity<Models.Recruits.Recruit>().HasMany(x => x.Payments).WithOne(x => x.Recruit).OnDelete(DeleteBehavior.Cascade);
}
public DbSet<Document> Documents { get; set; }
public DbSet<RecruitImport> RecruitImports { get; set; }
public DbSet<Models.Recruits.Recruit> Recruits { get; set; }
public DbSet<RecruitAddress> RecruitAddresses { get; set; }
public DbSet<RecruitOccupation> RecruitOccupations { get; set; }
public DbSet<RecruitCertificate> RecruitCertificates { get; set; }
public DbSet<RecruitEducation> RecruitEducations { get; set; }
public DbSet<ScoreImport> ScoreImports { get; set; }
public DbSet<RecruitScore> RecruitScores { get; set; }
public DbSet<RecruitPayment> RecruitPayments { get; set; }
public DbSet<RecruitDocument> RecruitDocuments { get; set; }
}
}

22
Dockerfile Normal file
View file

@ -0,0 +1,22 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["BMA.EHR.Recruit.Service/BMA.EHR.Recruit.Service.csproj", "BMA.EHR.Recruit.Service/"]
RUN dotnet restore "BMA.EHR.Recruit.Service/BMA.EHR.Recruit.Service.csproj"
COPY . .
WORKDIR "/src/BMA.EHR.Recruit.Service"
RUN dotnet build "BMA.EHR.Recruit.Service.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "BMA.EHR.Recruit.Service.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "BMA.EHR.Recruit.Service.dll"]

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,589 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Recruit.Service.Migrations
{
/// <inheritdoc />
public partial class InitialProject : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Documents",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
FileName = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FileSize = table.Column<int>(type: "int", nullable: false),
FileType = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Detail = table.Column<string>(type: "text", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ObjectRefId = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Documents", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RecruitImports",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Year = table.Column<int>(type: "int", nullable: false, comment: "ปีที่จัดการสอบ"),
Name = table.Column<string>(type: "varchar(250)", maxLength: 250, nullable: false, comment: "ชื่อการสอบ")
.Annotation("MySql:CharSet", "utf8mb4"),
Order = table.Column<int>(type: "int", nullable: false, comment: "ครั้งที่"),
Description = table.Column<string>(type: "text", nullable: false, comment: "รายละเอียดของการสอบ")
.Annotation("MySql:CharSet", "utf8mb4"),
OrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "รหัสหน่วยงานที่จัดสอบ", collation: "ascii_general_ci"),
OrganizationName = table.Column<string>(type: "varchar(250)", maxLength: 250, nullable: false, comment: "หน่วยงานที่ทำการจัดสอบ")
.Annotation("MySql:CharSet", "utf8mb4"),
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"),
ImportFileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_RecruitImports", x => x.Id);
table.ForeignKey(
name: "FK_RecruitImports_Documents_ImportFileId",
column: x => x.ImportFileId,
principalTable: "Documents",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ScoreImports",
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"),
Year = table.Column<int>(type: "int", nullable: false),
ImportFileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_ScoreImports", x => x.Id);
table.ForeignKey(
name: "FK_ScoreImports_Documents_ImportFileId",
column: x => x.ImportFileId,
principalTable: "Documents",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Recruits",
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"),
CitizenId = table.Column<string>(type: "varchar(13)", maxLength: 13, nullable: false, comment: "เลขประจำตัวประชาชน")
.Annotation("MySql:CharSet", "utf8mb4"),
ExamId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Prefix = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FirstName = table.Column<string>(type: "varchar(150)", maxLength: 150, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
LastName = table.Column<string>(type: "varchar(150)", maxLength: 150, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Gendor = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
National = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Race = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Religion = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
DateOfBirth = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Marry = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Isspecial = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
RefNo = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CitizenCardIssuer = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CitizenCardExpireDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Remark = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Qualified = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
RecruitImportId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_Recruits", x => x.Id);
table.ForeignKey(
name: "FK_Recruits_RecruitImports_RecruitImportId",
column: x => x.RecruitImportId,
principalTable: "RecruitImports",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RecruitScores",
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"),
ExamId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
SumA = table.Column<int>(type: "int", nullable: false),
FullA = table.Column<int>(type: "int", nullable: false),
PercentageA = table.Column<double>(type: "double", nullable: false),
SumB = table.Column<int>(type: "int", nullable: false),
FullB = table.Column<int>(type: "int", nullable: false),
PercentageB = table.Column<double>(type: "double", nullable: false),
SumAB = table.Column<int>(type: "int", nullable: false),
ABStatus = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
SumC = table.Column<int>(type: "int", nullable: false),
FullC = table.Column<int>(type: "int", nullable: false),
PercentageC = table.Column<double>(type: "double", nullable: false),
ExamStatus = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Major = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ScoreImportId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_RecruitScores", x => x.Id);
table.ForeignKey(
name: "FK_RecruitScores_ScoreImports_ScoreImportId",
column: x => x.ScoreImportId,
principalTable: "ScoreImports",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RecruitAddresses",
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"),
Address = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Moo = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Soi = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Road = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
District = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Amphur = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Province = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ZipCode = table.Column<string>(type: "varchar(5)", maxLength: 5, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Telephone = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Mobile = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Address1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Moo1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Soi1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Road1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
District1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Amphur1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Province1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ZipCode1 = table.Column<string>(type: "varchar(5)", maxLength: 5, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
RecruitId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_RecruitAddresses", x => x.Id);
table.ForeignKey(
name: "FK_RecruitAddresses_Recruits_RecruitId",
column: x => x.RecruitId,
principalTable: "Recruits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RecruitCertificates",
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"),
CertificateNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
IssueDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
ExpiredDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
RecruitId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_RecruitCertificates", x => x.Id);
table.ForeignKey(
name: "FK_RecruitCertificates_Recruits_RecruitId",
column: x => x.RecruitId,
principalTable: "Recruits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RecruitDocuments",
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"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
DocumentFileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
RecruitId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_RecruitDocuments", x => x.Id);
table.ForeignKey(
name: "FK_RecruitDocuments_Documents_DocumentFileId",
column: x => x.DocumentFileId,
principalTable: "Documents",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RecruitDocuments_Recruits_RecruitId",
column: x => x.RecruitId,
principalTable: "Recruits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RecruitEducations",
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"),
Degree = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Major = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
MajorGroupId = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
MajorGroupName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
University = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
GPA = table.Column<double>(type: "double", nullable: false),
Specialist = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
HighDegree = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
BachelorDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
RecruitId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_RecruitEducations", x => x.Id);
table.ForeignKey(
name: "FK_RecruitEducations_Recruits_RecruitId",
column: x => x.RecruitId,
principalTable: "Recruits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RecruitOccupations",
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"),
Occupation = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
WorkAge = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Position = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Workplace = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Telephone = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
RecruitId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_RecruitOccupations", x => x.Id);
table.ForeignKey(
name: "FK_RecruitOccupations_Recruits_RecruitId",
column: x => x.RecruitId,
principalTable: "Recruits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "RecruitPayments",
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"),
PaymentId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CompanyCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TextFile = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
BankCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
AccountNumber = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TransDate = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TransTime = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CustomerName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
RefNo1 = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TermBranch = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TellerId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreditDebit = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PaymentType = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ChequeNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Amount = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
ChqueBankCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
RecruitId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_RecruitPayments", x => x.Id);
table.ForeignKey(
name: "FK_RecruitPayments_Recruits_RecruitId",
column: x => x.RecruitId,
principalTable: "Recruits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_RecruitAddresses_RecruitId",
table: "RecruitAddresses",
column: "RecruitId");
migrationBuilder.CreateIndex(
name: "IX_RecruitCertificates_RecruitId",
table: "RecruitCertificates",
column: "RecruitId");
migrationBuilder.CreateIndex(
name: "IX_RecruitDocuments_DocumentFileId",
table: "RecruitDocuments",
column: "DocumentFileId");
migrationBuilder.CreateIndex(
name: "IX_RecruitDocuments_RecruitId",
table: "RecruitDocuments",
column: "RecruitId");
migrationBuilder.CreateIndex(
name: "IX_RecruitEducations_RecruitId",
table: "RecruitEducations",
column: "RecruitId");
migrationBuilder.CreateIndex(
name: "IX_RecruitImports_ImportFileId",
table: "RecruitImports",
column: "ImportFileId");
migrationBuilder.CreateIndex(
name: "IX_RecruitOccupations_RecruitId",
table: "RecruitOccupations",
column: "RecruitId");
migrationBuilder.CreateIndex(
name: "IX_RecruitPayments_RecruitId",
table: "RecruitPayments",
column: "RecruitId");
migrationBuilder.CreateIndex(
name: "IX_Recruits_RecruitImportId",
table: "Recruits",
column: "RecruitImportId");
migrationBuilder.CreateIndex(
name: "IX_RecruitScores_ScoreImportId",
table: "RecruitScores",
column: "ScoreImportId");
migrationBuilder.CreateIndex(
name: "IX_ScoreImports_ImportFileId",
table: "ScoreImports",
column: "ImportFileId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RecruitAddresses");
migrationBuilder.DropTable(
name: "RecruitCertificates");
migrationBuilder.DropTable(
name: "RecruitDocuments");
migrationBuilder.DropTable(
name: "RecruitEducations");
migrationBuilder.DropTable(
name: "RecruitOccupations");
migrationBuilder.DropTable(
name: "RecruitPayments");
migrationBuilder.DropTable(
name: "RecruitScores");
migrationBuilder.DropTable(
name: "Recruits");
migrationBuilder.DropTable(
name: "ScoreImports");
migrationBuilder.DropTable(
name: "RecruitImports");
migrationBuilder.DropTable(
name: "Documents");
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Recruit.Service.Models.Documents
{
public class Document
{
[Key]
public Guid Id { get; set; }
[Required, MaxLength(255)]
public string FileName { get; set; } = string.Empty;
public int FileSize { get; set; } = 0;
[MaxLength(128)]
public string FileType { get; set; } = string.Empty;
[Column(TypeName = "text")]
public string Detail { get; set; } = string.Empty;
[MaxLength(64)]
public string ObjectRefId { get; set; } = string.Empty;
public DateTime CreatedDate { get; set; } = DateTime.Now;
}
}

32
Models/EntityBase.cs Normal file
View file

@ -0,0 +1,32 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace BMA.EHR.Recruit.Service.Models
{
public class EntityBase
{
[Key, Column(Order = 0), Comment("PrimaryKey")]
[JsonPropertyName("id")]
public Guid Id { get; set; }
[Required, Column(Order = 100), Comment("สร้างข้อมูลเมื่อ")]
public DateTime CreatedAt { get; set; } = DateTime.Now;
[Column(Order = 101), Comment("User Id ที่สร้างข้อมูล"), MaxLength(40)]
public string CreatedUserId { get; set; } = string.Empty;
[Column(Order = 102), Comment("แก้ไขข้อมูลล่าสุดเมื่อ")]
public DateTime? LastUpdatedAt { get; set; }
[Column(Order = 103), Comment("User Id ที่แก้ไขข้อมูลล่าสุด"), MaxLength(40)]
public string LastUpdateUserId { get; set; } = string.Empty;
[Column(Order = 104), Comment("ชื่อ User ที่สร้างข้อมูล"), MaxLength(200)]
public string CreatedFullName { get; set; } = string.Empty;
[Column(Order = 105), Comment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), MaxLength(200)]
public string LastUpdateFullName { get; set; } = string.Empty;
}
}

View file

@ -0,0 +1,73 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class Recruit : EntityBase
{
[Required, MaxLength(13), Comment("เลขประจำตัวประชาชน")]
public string CitizenId { get; set; } = string.Empty;
[Required, MaxLength(50)]
public string ExamId { get; set; } = string.Empty;
[Required, MaxLength(50)]
public string Prefix { get; set; } = string.Empty;
[Required, MaxLength(150)]
public string FirstName { get; set; } = string.Empty;
[Required, MaxLength(150)]
public string LastName { get; set; } = string.Empty;
[MaxLength(20)]
public string Gendor { get; set; } = string.Empty;
[MaxLength(200)]
public string National { get; set; } = string.Empty;
[MaxLength(200)]
public string Race { get; set; } = string.Empty;
[MaxLength(200)]
public string Religion { get; set; } = string.Empty;
[Required]
public DateTime DateOfBirth { get; set; }
[MaxLength(20)]
public string Marry { get; set; } = string.Empty;
[MaxLength(1)]
public string Isspecial { get; set; } = "N";
[MaxLength(20)]
public string RefNo { get; set; } = string.Empty;
[MaxLength(200)]
public string CitizenCardIssuer { get; set; } = string.Empty;
public DateTime CitizenCardExpireDate { get; set; }
[MaxLength(200)]
public string Remark { get; set; } = string.Empty;
[MaxLength(1)]
public string Qualified { get; set; } = "Y";
public RecruitImport? RecruitImport { get; set; }
public virtual List<RecruitAddress> Addresses { get; set; } = new List<RecruitAddress>();
public virtual List<RecruitOccupation> Occupations { get; set; } = new List<RecruitOccupation>();
public virtual List<RecruitCertificate> Certificates { get; set; } = new List<RecruitCertificate>();
public virtual List<RecruitEducation> Educations { get; set; } = new List<RecruitEducation>();
public virtual List<RecruitPayment> Payments { get; set; } = new List<RecruitPayment>();
public virtual List<RecruitDocument> Documents { get; set; } = new List<RecruitDocument>();
}
}

View file

@ -0,0 +1,63 @@
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class RecruitAddress : EntityBase
{
[MaxLength(200)]
public string Address { get; set; }
[MaxLength(200)]
public string Moo { get; set; }
[MaxLength(200)]
public string Soi { get; set; }
[MaxLength(200)]
public string Road { get; set; }
[MaxLength(200)]
public string District { get; set; }
[MaxLength(200)]
public string Amphur { get; set; }
[MaxLength(200)]
public string Province { get; set; }
[MaxLength(5)]
public string ZipCode { get; set; }
[MaxLength(200)]
public string Telephone { get; set; }
[MaxLength(200)]
public string Mobile { get; set; }
[MaxLength(200)]
public string Address1 { get; set; }
[MaxLength(200)]
public string Moo1 { get; set; }
[MaxLength(200)]
public string Soi1 { get; set; }
[MaxLength(200)]
public string Road1 { get; set; }
[MaxLength(200)]
public string District1 { get; set; }
[MaxLength(200)]
public string Amphur1 { get; set; }
[MaxLength(200)]
public string Province1 { get; set; }
[MaxLength(5)]
public string ZipCode1 { get; set; }
public Recruit Recruit { get; set; }
}
}

View file

@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class RecruitCertificate : EntityBase
{
[MaxLength(50)]
public string CertificateNo { get; set; }
[MaxLength(200)]
public string Description { get; set; }
public DateTime IssueDate { get; set; }
public DateTime ExpiredDate { get; set; }
public Recruit Recruit { get; set; }
}
}

View file

@ -0,0 +1,13 @@
using BMA.EHR.Recruit.Service.Models.Documents;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class RecruitDocument : EntityBase
{
public DateTime CreatedDate { get; set; }
public Document DocumentFile { get; set; }
public Recruit Recruit { get; set; }
}
}

View file

@ -0,0 +1,33 @@
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class RecruitEducation : EntityBase
{
[MaxLength(200)]
public string Degree { get; set; }
[MaxLength(200)]
public string Major { get; set; }
[MaxLength(20)]
public string MajorGroupId { get; set; }
[MaxLength(200)]
public string MajorGroupName { get; set; }
[MaxLength(200)]
public string University { get; set; }
public double GPA { get; set; } = 0.0;
[MaxLength(1000)]
public string Specialist { get; set; }
[MaxLength(200)]
public string HighDegree { get; set; }
public DateTime BachelorDate { get; set; }
public Recruit Recruit { get; set; }
}
}

View file

@ -0,0 +1,32 @@
using BMA.EHR.Recruit.Service.Models.Documents;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class RecruitImport : EntityBase
{
[Required, Comment("ปีที่จัดการสอบ"), Column(Order = 1)]
public int Year { get; set; }
[Required, MaxLength(250), Comment("ชื่อการสอบ"), Column(Order = 2)]
public string Name { get; set; } = string.Empty;
[Required, Comment("ครั้งที่"), Column(Order = 3)]
public int Order { get; set; } = 1;
[Column(TypeName = "text", Order = 4), Comment("รายละเอียดของการสอบ")]
public string Description { get; set; } = String.Empty;
[Comment("รหัสหน่วยงานที่จัดสอบ"), Column(Order = 5)]
public Guid OrganizationId { get; set; }
[MaxLength(250), Comment("หน่วยงานที่ทำการจัดสอบ"), Column(Order = 6)]
public string OrganizationName { get; set; } = string.Empty;
public Document ImportFile { get; set; } = new Document();
public List<Recruit> Recruits { get; set; } = new List<Recruit>();
}
}

View file

@ -0,0 +1,24 @@
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class RecruitOccupation : EntityBase
{
[MaxLength(200)]
public string Occupation { get; set; }
[MaxLength(200)]
public string WorkAge { get; set; }
[MaxLength(200)]
public string Position { get; set; }
[MaxLength(200)]
public string Workplace { get; set; }
[MaxLength(200)]
public string Telephone { get; set; }
public Recruit Recruit { get; set; }
}
}

View file

@ -0,0 +1,56 @@
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class RecruitPayment : EntityBase
{
[MaxLength(50)]
public string PaymentId { get; set; }
[MaxLength(50)]
public string CompanyCode { get; set; }
[MaxLength(50)]
public string TextFile { get; set; }
[MaxLength(50)]
public string BankCode { get; set; }
[MaxLength(50)]
public string AccountNumber { get; set; }
[MaxLength(50)]
public string TransDate { get; set; }
[MaxLength(50)]
public string TransTime { get; set; }
[MaxLength(200)]
public string CustomerName { get; set; }
[MaxLength(50)]
public string RefNo1 { get; set; }
[MaxLength(50)]
public string TermBranch { get; set; }
[MaxLength(50)]
public string TellerId { get; set; }
[MaxLength(50)]
public string CreditDebit { get; set; }
[MaxLength(50)]
public string PaymentType { get; set; }
[MaxLength(50)]
public string ChequeNo { get; set; }
public decimal Amount { get; set; }
[MaxLength(50)]
public string ChqueBankCode { get; set; }
public Recruit Recruit { get; set; }
}
}

View file

@ -0,0 +1,41 @@
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class RecruitScore : EntityBase
{
[Required, MaxLength(50)]
public string ExamId { get; set; }
public int SumA { get; set; }
public int FullA { get; set; }
public double PercentageA { get; set; }
public int SumB { get; set; }
public int FullB { get; set; }
public double PercentageB { get; set; }
public int SumAB { get; set; }
[Required, MaxLength(50)]
public string ABStatus { get; set; }
public int SumC { get; set; }
public int FullC { get; set; }
public double PercentageC { get; set; }
[Required, MaxLength(50)]
public string ExamStatus { get; set; }
[MaxLength(200)]
public string Major { get; set; }
public ScoreImport ScoreImport { get; set; }
}
}

View file

@ -0,0 +1,13 @@
using BMA.EHR.Recruit.Service.Models.Documents;
namespace BMA.EHR.Recruit.Service.Models.Recruits
{
public class ScoreImport : EntityBase
{
public int Year { get; set; }
public Document ImportFile { get; set; } = new Document();
public virtual List<RecruitScore> Scores { get; set; } = new List<RecruitScore>();
}
}

165
Program.cs Normal file
View file

@ -0,0 +1,165 @@
using Microsoft.AspNetCore.Mvc.Versioning;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Logging;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
using System.Text;
using Serilog.Sinks.Elasticsearch;
using Serilog;
using System.Reflection;
using Serilog.Exceptions;
using Microsoft.EntityFrameworkCore;
using MongoDB.Bson.Serialization.Serializers;
using MongoDB.Bson.Serialization;
using MongoDB.Bson;
using BMA.EHR.Recruit.Service.Data;
using BMA.EHR.Recruit.Service;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using BMA.EHR.Recruit.Service.Services;
var builder = WebApplication.CreateBuilder(args);
var issuer = builder.Configuration["Jwt:Issuer"];
var key = builder.Configuration["Jwt:Key"];
IdentityModelEventSource.ShowPII = true;
builder.Services.AddHttpContextAccessor();
builder.Services.AddApiVersioning(opt =>
{
opt.DefaultApiVersion = new ApiVersion(1, 0);
opt.AssumeDefaultVersionWhenUnspecified = true;
opt.ReportApiVersions = true;
opt.ApiVersionReader = ApiVersionReader.Combine(new UrlSegmentApiVersionReader(),
new HeaderApiVersionReader("x-api-version"),
new MediaTypeApiVersionReader("x-api-version"));
});
builder.Services.AddVersionedApiExplorer(setup =>
{
setup.GroupNameFormat = "'v'VVV";
setup.SubstituteApiVersionInUrl = true;
});
builder.Services.AddEndpointsApiExplorer();
// Authorization
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddJwtBearer(opt =>
{
opt.RequireHttpsMetadata = false; //false for dev
opt.Authority = issuer;
opt.TokenValidationParameters = new()
{
ValidateIssuer = true,
ValidateAudience = false,
ValidateLifetime = true,
ValidateIssuerSigningKey = true,
ValidIssuer = issuer,
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(key))
};
});
builder.Services.AddAuthorization();
// use serilog
ConfigureLogs();
builder.Host.UseSerilog();
BsonSerializer.RegisterSerializer(new GuidSerializer(BsonType.String));
BsonSerializer.RegisterSerializer(new DateTimeSerializer(BsonType.String));
// Register DbContext
var defaultConnection = builder.Configuration.GetConnectionString("DefaultConnection");
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseMySql(defaultConnection, ServerVersion.AutoDetect(defaultConnection)));
// Add config CORS
builder.Services.AddCors(options => options.AddDefaultPolicy(builder =>
{
builder
.AllowAnyOrigin()
//.WithOrigins("http://localhost:8000")
.AllowAnyMethod()
.AllowAnyHeader()
.SetIsOriginAllowedToAllowWildcardSubdomains();
}));
// Add services to the container.
builder.Services.AddControllers(options =>
{
options.SuppressAsyncSuffixInActionNames = false;
})
.AddNewtonsoftJson(x => x.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore);
builder.Services.AddSwaggerGen();
builder.Services.ConfigureOptions<ConfigureSwaggerOptions>();
builder.Services.AddHealthChecks();
// Register Service
builder.Services.AddTransient<DocumentService>();
var app = builder.Build();
var apiVersionDescriptionProvider = app.Services.GetRequiredService<IApiVersionDescriptionProvider>();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI(options =>
{
foreach (var description in apiVersionDescriptionProvider.ApiVersionDescriptions)
{
options.SwaggerEndpoint($"/swagger/{description.GroupName}/swagger.json",
description.GroupName.ToUpperInvariant());
}
});
}
app.MapHealthChecks("/health");
app.UseHttpsRedirection();
app.UseCors();
app.UseAuthentication();
app.UseAuthorization();
app.UseDefaultFiles();
app.UseStaticFiles();
app.MapControllers();
// apply migrations
await using var scope = app.Services.CreateAsyncScope();
await using var db = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
await db.Database.MigrateAsync();
// seed default data
app.Run();
void ConfigureLogs()
{
var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile(
$"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")}.json",
optional: true)
.Build();
Log.Logger = new LoggerConfiguration()
.Enrich.FromLogContext()
// .WriteTo.Debug()
.MinimumLevel.Error()
.WriteTo.Console()
.Enrich.WithExceptionDetails()
// .Enrich.WithEnvironmentUserName()
.WriteTo.Elasticsearch(ConfigureElasticSink(configuration, environment ?? ""))
.Enrich.WithProperty("Environment", environment)
.ReadFrom.Configuration(configuration)
.CreateLogger();
}
ElasticsearchSinkOptions ConfigureElasticSink(IConfigurationRoot configuration, string environment)
{
return new ElasticsearchSinkOptions(new Uri(configuration["ElasticConfiguration:Uri"] ?? ""))
{
AutoRegisterTemplate = true,
IndexFormat = $"{Assembly.GetExecutingAssembly()?.GetName()?.Name?.ToLower().Replace(".", "-")}-{environment?.ToLower().Replace(".", "-")}"
};
}

View file

@ -0,0 +1,58 @@
{
"profiles": {
"dotnet": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7188;http://localhost:5090"
},
"http": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5090"
},
"https": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7188;http://localhost:5090"
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"publishAllPorts": true,
"useSSL": true
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:19646",
"sslPort": 44381
}
}
}

View file

@ -0,0 +1,11 @@
namespace BMA.EHR.Recruit.Service.Responses.Document
{
public class FileDownloadResponse
{
public string FileName { get; set; } = string.Empty;
public string FileType { get; set; } = string.Empty;
public byte[] FileContent { get; set; }
}
}

165
Services/DocumentService.cs Normal file
View file

@ -0,0 +1,165 @@
using BMA.EHR.Recruit.Service.Core;
using BMA.EHR.Recruit.Service.Data;
using Microsoft.EntityFrameworkCore;
using MongoDB.Driver.GridFS;
using MongoDB.Driver;
using BMA.EHR.Recruit.Service.Models.Documents;
using System.Net.Http.Headers;
using BMA.EHR.Recruit.Service.Responses.Document;
using MongoDB.Bson;
namespace BMA.EHR.Recruit.Service.Services
{
public class DocumentService
{
private readonly ApplicationDbContext _context;
private readonly IConfiguration _configuration;
private readonly IWebHostEnvironment _webHostEnvironment;
private const string MONGO_DATABASE = "bma-recruit";
public DocumentService(ApplicationDbContext context,
IConfiguration configuration,
IWebHostEnvironment webHostEnvironment)
{
_context = context;
_configuration = configuration;
_webHostEnvironment = webHostEnvironment;
}
public string MongoConnectionString
{
get => _configuration.GetConnectionString("MongoConnection");
}
public async Task<Document> UploadFile(IFormFile file, string newFileName = "")
{
var fileName = "";
var fileExt = Path.GetExtension(file.FileName);
if (newFileName != "")
fileName = $"{newFileName}";
else
fileName = ContentDispositionHeaderValue.Parse(file.ContentDisposition).FileName.Trim('"');
var tmpDir = Path.Combine(_webHostEnvironment.ContentRootPath, "tmp");
if (!Directory.Exists(tmpDir))
Directory.CreateDirectory(tmpDir);
var tmpFile = Path.Combine(tmpDir, $"tmp_{DateTime.Now.ToString("ddMMyyyyHHmmss")}{fileExt}");
try
{
// upload to tmp
using (var stream = new FileStream(tmpFile, FileMode.Create))
{
file.CopyTo(stream);
}
var mongo = new MongoClient(MongoConnectionString);
var bucket = new GridFSBucket(mongo.GetDatabase(MONGO_DATABASE));
using (var fs = new FileStream(tmpFile, FileMode.Open, FileAccess.Read))
{
var fileId = bucket.UploadFromStream(fileName, fs);
var info = new FileInfo(tmpFile);
try
{
var doc = new Document()
{
FileName = fileName,
FileType = file.ContentType,
FileSize = Convert.ToInt32(file.Length),
ObjectRefId = fileId.ToString(),
CreatedDate = DateTime.Now
};
await _context.Documents.AddAsync(doc);
await _context.SaveChangesAsync();
return doc;
}
catch
{
bucket.Delete(fileId);
throw new Exception(GlobalMessages.CannotInsertToDatabase);
}
}
}
catch
{
throw;
}
finally
{
System.IO.File.Delete(tmpFile);
}
}
public async Task DeleteFile(Guid fileId)
{
try
{
var doc = await _context.Documents.AsQueryable()
.FirstOrDefaultAsync(x => x.Id == fileId);
if (doc == null)
throw new Exception(GlobalMessages.FileNotFoundOnServer);
var mongo = new MongoClient(MongoConnectionString);
var bucket = new GridFSBucket(mongo.GetDatabase(MONGO_DATABASE));
bucket.Delete(ObjectId.Parse(doc.ObjectRefId));
_context.Documents.Remove(doc);
await _context.SaveChangesAsync();
}
catch
{
throw;
}
}
public async Task<FileDownloadResponse> DownloadFile(Guid fileId)
{
var tmpDir = Path.Combine(_webHostEnvironment.ContentRootPath, "tmp");
if (!Directory.Exists(tmpDir))
Directory.CreateDirectory(tmpDir);
var tmpFile = Path.Combine(tmpDir, $"tmp_{DateTime.Now.ToString("ddMMyyyyHHmmss")}");
try
{
var doc = await _context.Documents.AsQueryable()
.FirstOrDefaultAsync(x => x.Id == fileId);
if (doc == null)
throw new Exception(GlobalMessages.FileNotFoundOnServer);
var fileExt = Path.GetExtension(doc.FileName);
tmpFile = tmpFile + fileExt;
var mongo = new MongoClient(MongoConnectionString);
var bucket = new GridFSBucket(mongo.GetDatabase(MONGO_DATABASE));
var f = bucket.DownloadAsBytes(ObjectId.Parse(doc.ObjectRefId));
return new FileDownloadResponse
{
FileName = doc.FileName,
FileType = doc.FileType,
FileContent = f
};
}
catch
{
throw;
}
finally
{
File.Delete(tmpFile);
}
}
}
}

View file

@ -0,0 +1,28 @@
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Information",
"System": "Warning"
}
}
},
"ElasticConfiguration": {
"Uri": "http://localhost:9200"
},
"AllowedHosts": "*",
"ConnectionStrings": {
"MongoConnection": "mongodb://127.0.0.1:27017",
"DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
},
"Jwt": {
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
"Issuer": "https://identity.frappet.com/realms/bma-ehr"
},
"EPPlus": {
"ExcelPackage": {
"LicenseContext": "NonCommercial"
}
}
}

28
appsettings.json Normal file
View file

@ -0,0 +1,28 @@
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Information",
"System": "Warning"
}
}
},
"ElasticConfiguration": {
"Uri": "http://localhost:9200"
},
"AllowedHosts": "*",
"ConnectionStrings": {
"MongoConnection": "mongodb://admin:adminVM123@127.0.0.1:27017",
"DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
},
"Jwt": {
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
"Issuer": "https://identity.frappet.com/realms/bma-ehr"
},
"EPPlus": {
"ExcelPackage": {
"LicenseContext": "NonCommercial"
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,20 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "7.0.0"
}
],
"configProperties": {
"System.GC.Server": true,
"System.Reflection.NullabilityInfoContext.IsSupported": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>BMA.EHR.Recruit.Service</name>
</assembly>
<members>
<member name="T:BMA.EHR.Recruit.Service.Migrations.InitialProject">
<inheritdoc />
</member>
<member name="M:BMA.EHR.Recruit.Service.Migrations.InitialProject.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:BMA.EHR.Recruit.Service.Migrations.InitialProject.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:BMA.EHR.Recruit.Service.Migrations.InitialProject.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
<inheritdoc />
</member>
</members>
</doc>

Binary file not shown.

BIN
bin/Debug/net7.0/Dapper.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/Debug/net7.0/EPPlus.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/Debug/net7.0/LiteDB.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more