initial commit

This commit is contained in:
2026-07-21 14:08:10 +07:00
commit f7cf118326
533 changed files with 41762 additions and 0 deletions
@@ -0,0 +1,36 @@
using Indotalent.Data.Entities;
using Indotalent.Shared.Consts;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Indotalent.Infrastructure.Database.MsSQL.Configuration;
public class PayrollDetailConfiguration : IEntityTypeConfiguration<PayrollDetail>
{
public void Configure(EntityTypeBuilder<PayrollDetail> builder)
{
builder.Property(e => e.PayrollProcessId)
.HasMaxLength(GlobalConsts.StringLengthId);
builder.Property(e => e.EmployeeId)
.HasMaxLength(GlobalConsts.StringLengthId);
builder.Property(e => e.EmployeeCode)
.HasMaxLength(GlobalConsts.StringLengthShort);
builder.Property(e => e.EmployeeName)
.HasMaxLength(GlobalConsts.StringLengthShort);
builder.HasOne(e => e.PayrollProcess)
.WithMany()
.HasForeignKey(e => e.PayrollProcessId)
.OnDelete(DeleteBehavior.NoAction);
builder.HasOne(e => e.Employee)
.WithMany()
.HasForeignKey(e => e.EmployeeId)
.OnDelete(DeleteBehavior.NoAction);
builder.HasIndex(e => e.EmployeeCode);
}
}