add Dna Id Field to Process TimeStamp
Some checks failed
release-dev / release-dev (push) Failing after 12s

This commit is contained in:
Suphonchai Phoonsawat 2025-06-18 13:43:46 +07:00
parent e790b50f58
commit ea55d21f51
5 changed files with 1640 additions and 0 deletions

View file

@ -104,5 +104,16 @@ namespace BMA.EHR.Domain.Models.Leave.TimeAttendants
public Guid? ProfileId { get; set; }
public string? ProfileType { get; set; }
public Guid? RootDnaId { get; set; }
public Guid? Child1DnaId { get; set; }
public Guid? Child2DnaId { get; set; }
public Guid? Child3DnaId { get; set; }
public Guid? Child4DnaId { get; set; }
}
}

View file

@ -0,0 +1,74 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class AddDnaIdtoProcessTimeStamp : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "Child1DnaId",
table: "ProcessUserTimeStamps",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child2DnaId",
table: "ProcessUserTimeStamps",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child3DnaId",
table: "ProcessUserTimeStamps",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child4DnaId",
table: "ProcessUserTimeStamps",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "RootDnaId",
table: "ProcessUserTimeStamps",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Child1DnaId",
table: "ProcessUserTimeStamps");
migrationBuilder.DropColumn(
name: "Child2DnaId",
table: "ProcessUserTimeStamps");
migrationBuilder.DropColumn(
name: "Child3DnaId",
table: "ProcessUserTimeStamps");
migrationBuilder.DropColumn(
name: "Child4DnaId",
table: "ProcessUserTimeStamps");
migrationBuilder.DropColumn(
name: "RootDnaId",
table: "ProcessUserTimeStamps");
}
}
}

View file

@ -999,24 +999,36 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
b.Property<string>("Child1")
.HasColumnType("longtext");
b.Property<Guid?>("Child1DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child1Id")
.HasColumnType("char(36)");
b.Property<string>("Child2")
.HasColumnType("longtext");
b.Property<Guid?>("Child2DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child2Id")
.HasColumnType("char(36)");
b.Property<string>("Child3")
.HasColumnType("longtext");
b.Property<Guid?>("Child3DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child3Id")
.HasColumnType("char(36)");
b.Property<string>("Child4")
.HasColumnType("longtext");
b.Property<Guid?>("Child4DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child4Id")
.HasColumnType("char(36)");
@ -1106,6 +1118,9 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
b.Property<string>("Root")
.HasColumnType("longtext");
b.Property<Guid?>("RootDnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("RootId")
.HasColumnType("char(36)");

View file

@ -902,6 +902,13 @@ namespace BMA.EHR.Leave.Service.Controllers
ProfileId = profile.Id,
ProfileType = profile.ProfileType,
RootDnaId = profile.RootId,
Child1DnaId = profile.Child1DnaId,
Child2DnaId = profile.Child2DnaId,
Child3DnaId = profile.Child3DnaId,
Child4DnaId = profile.Child4DnaId,
};
await _userTimeStampRepository.AddAsync(checkin);