2024-07-12 16:37:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
// T4模板类:基础Map类
|
|
|
|
|
|
// 此代码由T4模板自动生成
|
|
|
|
|
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
using APT.Infrastructure.EF.Map;
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
namespace APT.MS.Data.Mapping
|
|
|
|
|
|
{
|
|
|
|
|
|
using APT.MS.Domain.Entities.BS;
|
|
|
|
|
|
using APT.MS.Domain.Entities.FO;
|
|
|
|
|
|
using APT.MS.Domain.Entities.HM;
|
|
|
|
|
|
using APT.MS.Domain.Entities.BI;
|
|
|
|
|
|
using APT.MS.Domain.Entities.SC.BI;
|
|
|
|
|
|
using APT.MS.Domain.Entities.CM;
|
|
|
|
|
|
using APT.MS.Domain.Entities.SC;
|
|
|
|
|
|
using APT.MS.Domain.Entities.OG;
|
|
|
|
|
|
using APT.MS.Domain.Entities.SC.PT;
|
|
|
|
|
|
using APT.MS.Domain.Entities.SC.SC;
|
|
|
|
|
|
using APT.MS.Domain.Entities.SE;
|
|
|
|
|
|
using APT.BaseData.Domain.Entities.BD;
|
|
|
|
|
|
using APT.BaseData.Domain.Entities.FM;
|
|
|
|
|
|
using APT.BaseData.Domain.Entities;
|
|
|
|
|
|
using APT.BaseData.Domain.Entities.LG;
|
|
|
|
|
|
using APT.BaseData.Domain.Entities.NW;
|
|
|
|
|
|
using APT.BaseData.Domain.Entities.OP;
|
|
|
|
|
|
using APT.MS.Domain.Entities.PF;
|
|
|
|
|
|
using APT.BaseData.Domain.Entities.PF;
|
|
|
|
|
|
using APT.BaseData.Domain.Entities.T4;
|
|
|
|
|
|
#region CheckContent
|
|
|
|
|
|
public partial class BSCheckContentMap :APTEntityBaseMap<T_BS_CHECK_CONTENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_CONTENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.PROOF).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProject).WithMany().HasForeignKey(t => t.CHECK_PROJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckContents
|
|
|
|
|
|
public partial class BSCheckContentsMap :APTEntityBaseMap<T_BS_CHECK_CONTENTS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_CONTENTS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Ignore(t => t.StrCheckObject);
|
|
|
|
|
|
builder.Property(t => t.CHECKCONTENT).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckContentCheckType
|
|
|
|
|
|
public partial class BSCheckContentCheckTypeMap :APTEntityBaseMap<T_BS_CHECK_CONTENT_CHECK_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_CONTENT_CHECK_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Content).WithMany(t=>t.Nav_ListContentCheckTypes).HasForeignKey(t => t.CHECK_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckType).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckContentCheckTypeLevel
|
|
|
|
|
|
public partial class BSCheckContentCheckTypeLevelMap :APTEntityBaseMap<T_BS_CHECK_CONTENT_CHECK_TYPE_LEVEL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_CONTENT_CHECK_TYPE_LEVEL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckContentCheckType).WithMany(t=>t.Nav_ListContentCheckTypeLevels).HasForeignKey(t => t.CHECK_CONTENT_CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckTypeLevel).WithMany().HasForeignKey(t => t.T_BS_CHECK_TYPE_LEVEL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckContentHmRiskArea
|
|
|
|
|
|
public partial class BSCheckContentHmRiskAreaMap :APTEntityBaseMap<T_BS_CHECK_CONTENT_HM_RISK_AREA>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_CONTENT_HM_RISK_AREA> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Content).WithMany(t=>t.Nav_ListContentAreas).HasForeignKey(t => t.CHECK_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.HM_RISK_AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckMain
|
|
|
|
|
|
public partial class BSCheckMainMap :APTEntityBaseMap<T_BS_CHECK_MAIN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_MAIN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Ignore(t => t.CHECKOBJECT_DESCRIPTION);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProject).WithMany().HasForeignKey(t => t.CHECK_PROJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProjectProjectCategory).WithMany().HasForeignKey(t => t.CHECK_PROJECT_PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProjectCategory).WithMany().HasForeignKey(t => t.CHECK_PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckQuestion).WithMany().HasForeignKey(t => t.CHECK_QUESTION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CHECKCONTENT).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CHECKPROOF).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.QUESTION_LEVE_DESCRIPTION);
|
|
|
|
|
|
builder.Ignore(t => t.SERIOUS_RISK_DESCRIPTION);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckType).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckTypeLevel).WithMany().HasForeignKey(t => t.CHECK_TYPE_LEVEL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.CheckLevelDescription);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskArea).WithMany().HasForeignKey(t => t.RISK_AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Contents).WithMany().HasForeignKey(t => t.CHECK_CONTENTS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckContentMainDepartment
|
|
|
|
|
|
public partial class BSCheckContentMainDepartmentMap :APTEntityBaseMap<T_BS_CHECK_CONTENT_MAIN_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_CONTENT_MAIN_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Main).WithMany(t=>t.Nav_ListMainDep).HasForeignKey(t => t.MAIN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckContentQuestion
|
|
|
|
|
|
public partial class BSCheckContentQuestionMap :APTEntityBaseMap<T_BS_CHECK_CONTENT_QUESTION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_CONTENT_QUESTION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Content).WithMany(t=>t.Nav_ListContentQuestions).HasForeignKey(t => t.CHECK_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Question).WithMany().HasForeignKey(t => t.CHECK_QUESTION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckMainLaw
|
|
|
|
|
|
public partial class BSCheckMainLawMap :APTEntityBaseMap<T_BS_CHECK_MAIN_LAW>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_MAIN_LAW> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Main).WithMany(t=>t.Nav_ListLaw).HasForeignKey(t => t.CHECK_MAIN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Standard).WithMany().HasForeignKey(t => t.STANDARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckProject
|
|
|
|
|
|
public partial class BSCheckProjectMap :APTEntityBaseMap<T_BS_CHECK_PROJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_PROJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckProjectCategory
|
|
|
|
|
|
public partial class BSCheckProjectCategoryMap :APTEntityBaseMap<T_BS_CHECK_PROJECT_CATEGORY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_PROJECT_CATEGORY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckProjectCategoryChecktype
|
|
|
|
|
|
public partial class BSCheckProjectCategoryChecktypeMap :APTEntityBaseMap<T_BS_CHECK_PROJECT_CATEGORY_CHECKTYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_PROJECT_CATEGORY_CHECKTYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ProjectCategory).WithMany(t=>t.Nav_ListCategoryType).HasForeignKey(t => t.PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckType).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckProjectCategoryObject
|
|
|
|
|
|
public partial class BSCheckProjectCategoryObjectMap :APTEntityBaseMap<T_BS_CHECK_PROJECT_CATEGORY_OBJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_PROJECT_CATEGORY_OBJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ProjectCategory).WithMany(t=>t.Nav_ListOBJECT).HasForeignKey(t => t.PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckProjectProjectCategory
|
|
|
|
|
|
public partial class BSCheckProjectProjectCategoryMap :APTEntityBaseMap<T_BS_CHECK_PROJECT_PROJECT_CATEGORY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_PROJECT_PROJECT_CATEGORY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProject).WithMany(t=>t.Nav_ListCheckProjectProjectCategory).HasForeignKey(t => t.CHECK_PROJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProjectCategory).WithMany().HasForeignKey(t => t.CHECK_PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckQuestion
|
|
|
|
|
|
public partial class BSCheckQuestionMap :APTEntityBaseMap<T_BS_CHECK_QUESTION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_QUESTION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Contents).WithMany(t=>t.Nav_ListCheckQuestion).HasForeignKey(t => t.CHECK_CONTENTS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DESCREPTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEMAND).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.QUESTION_LEVEL_SHOW);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_Main);
|
|
|
|
|
|
builder.Ignore(t => t.SERIOUS_RISK);
|
|
|
|
|
|
builder.Ignore(t => t.LastDateSystem);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckType
|
|
|
|
|
|
public partial class BSCheckTypeMap :TreeEntityBaseMap<T_BS_CHECK_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckTypeLevel
|
|
|
|
|
|
public partial class BSCheckTypeLevelMap :APTEntityBaseMap<T_BS_CHECK_TYPE_LEVEL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_TYPE_LEVEL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckType).WithMany(t=>t.Nav_ListCheckTypeLevel).HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Enums).WithMany().HasForeignKey(t => t.CheckLevel_ENUMS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CheckTypeMinetype
|
|
|
|
|
|
public partial class BSCheckTypeMinetypeMap :APTEntityBaseMap<T_BS_CHECK_TYPE_MINETYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_CHECK_TYPE_MINETYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckType).WithMany(t=>t.Nav_ListMineType).HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Enums).WithMany().HasForeignKey(t => t.MINETYPE_ENUMS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentAreaobject
|
|
|
|
|
|
public partial class BSDepartmentAreaobjectMap :APTEntityBaseMap<T_BS_DEPARTMENT_AREAOBJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_DEPARTMENT_AREAOBJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Ignore(t => t.ISDOWNSAME);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENTID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperateLog
|
|
|
|
|
|
public partial class BSOperateLogMap :APTEntityBaseMap<T_BS_OPERATE_LOG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_OPERATE_LOG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.USRTNAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PlanSet
|
|
|
|
|
|
public partial class BSPlanSetMap :APTEntityBaseMap<T_BS_PLAN_SET>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_PLAN_SET> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckType).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckTypeLevel).WithMany().HasForeignKey(t => t.CHECK_TYPE_LEVEL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.RUNDATA).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PlanSetDepObject
|
|
|
|
|
|
public partial class BSPlanSetDepObjectMap :APTEntityBaseMap<T_BS_PLAN_SET_DEP_OBJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_PLAN_SET_DEP_OBJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PlanSet).WithMany(t=>t.Nav_ListSetDepObject).HasForeignKey(t => t.PLANSET_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PlanSetObject
|
|
|
|
|
|
public partial class BSPlanSetObjectMap :APTEntityBaseMap<T_BS_PLAN_SET_OBJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_PLAN_SET_OBJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PlanSet).WithMany(t=>t.Nav_ListSetObject).HasForeignKey(t => t.PLANSET_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskCategory
|
|
|
|
|
|
public partial class BSRiskCategoryMap :APTEntityBaseMap<T_BS_RISK_CATEGORY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_CATEGORY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskLevelDelayDays
|
|
|
|
|
|
public partial class BSRiskLevelDelayDaysMap :APTEntityBaseMap<T_BS_RISK_LEVEL_DELAY_DAYS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_LEVEL_DELAY_DAYS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskReason
|
|
|
|
|
|
public partial class BSRiskReasonMap :APTEntityBaseMap<T_BS_RISK_REASON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_REASON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmit
|
|
|
|
|
|
public partial class BSRiskSubmitMap :APTEntityBaseMap<T_BS_RISK_SUBMIT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckType).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckTypeLevel).WithMany().HasForeignKey(t => t.CHECK_TYPE_LEVEL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Check).WithMany().HasForeignKey(t => t.CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveCheckAudit).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.FORM_CODE);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CREATE_NAME);
|
2024-08-05 16:12:41 +08:00
|
|
|
|
builder.Property(t => t.REMARK_CANCEL).HasMaxLength(500);
|
2024-07-12 16:37:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContent
|
|
|
|
|
|
public partial class BSRiskSubmitContentMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Submit).WithMany(t=>t.Nav_ListRiskSubmitContent).HasForeignKey(t => t.RISK_SUBMIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitNotice).WithMany(t=>t.Nav_ListRiskSubmitContent).HasForeignKey(t => t.RISK_SUBMIT_NOTICE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitNoticePerson).WithMany(t=>t.Nav_ListRiskSubmitContent).HasForeignKey(t => t.RISK_SUBMIT_NOTICE_PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckMain).WithMany().HasForeignKey(t => t.CHECK_MAIN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Question).WithMany().HasForeignKey(t => t.CHECK_QUESTION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DESCREPTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEMAND).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.PROOF).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.QUESTION_LEVEL_SHOW);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentDeal).WithMany().HasForeignKey(t => t.DEAL_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserDeal).WithMany().HasForeignKey(t => t.DEAL_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserActualDeal).WithMany().HasForeignKey(t => t.ACTUAL_DEAL_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserCheck).WithMany().HasForeignKey(t => t.CHECK_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CHECK_USER_REFUSED_REASON).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.DEAL_USER_REFUSED_REASON).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveCheckAudit).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.FORM_CODE);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany().HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheckDetail).WithMany().HasForeignKey(t => t.SAFE_CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskArea).WithMany().HasForeignKey(t => t.RISK_AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProject).WithMany().HasForeignKey(t => t.CHECK_PROJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProjectProjectCategory).WithMany().HasForeignKey(t => t.CHECK_PROJECT_PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProjectCategory).WithMany().HasForeignKey(t => t.CHECK_PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CHECKCONTENT).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Contents).WithMany().HasForeignKey(t => t.CHECK_CONTENTS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DESCRIBE).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.CHECK_TYPE_ID);
|
|
|
|
|
|
builder.Ignore(t => t.CHECK_TYPE_LEVEL_ID);
|
|
|
|
|
|
builder.Ignore(t => t.SUBMIT_STATUS);
|
|
|
|
|
|
builder.Ignore(t => t.CHECKOBJECT);
|
|
|
|
|
|
builder.Ignore(t => t.CREATE_NAME);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContentBack
|
|
|
|
|
|
public partial class BSRiskSubmitContentBackMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT_BACK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT_BACK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitContent).WithMany().HasForeignKey(t => t.RISK_SUBMIT_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Submit).WithMany().HasForeignKey(t => t.RISK_SUBMIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitNoticePerson).WithMany().HasForeignKey(t => t.RISK_SUBMIT_NOTICE_PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckMain).WithMany().HasForeignKey(t => t.CHECK_MAIN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Question).WithMany().HasForeignKey(t => t.CHECK_QUESTION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DEMAND).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentDeal).WithMany().HasForeignKey(t => t.DEAL_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserDeal).WithMany().HasForeignKey(t => t.DEAL_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserActualDeal).WithMany().HasForeignKey(t => t.ACTUAL_DEAL_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserCheck).WithMany().HasForeignKey(t => t.CHECK_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveCheckAudit).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.FORM_CODE);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany().HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheckDetail).WithMany().HasForeignKey(t => t.SAFE_CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContentDeal
|
|
|
|
|
|
public partial class BSRiskSubmitContentDealMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT_DEAL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT_DEAL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Submit).WithMany().HasForeignKey(t => t.RISK_SUBMIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitNotice).WithMany().HasForeignKey(t => t.RISK_SUBMIT_NOTICE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitNoticePerson).WithMany().HasForeignKey(t => t.RISK_SUBMIT_NOTICE_PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitContent).WithMany().HasForeignKey(t => t.RISK_SUBMIT_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Ignore(t => t.DEALSITUATION_SHOW);
|
|
|
|
|
|
builder.Property(t => t.DEALDESCRIBE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEALOPINION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CHECKOPINION).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserDeal).WithMany().HasForeignKey(t => t.DEAL_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserActualDeal).WithMany().HasForeignKey(t => t.ACTUAL_DEAL_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserCheck).WithMany().HasForeignKey(t => t.CHECK_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveCheckAudit).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.FORM_CODE);
|
|
|
|
|
|
builder.Ignore(t => t.OPERARTETYPE);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApplyDetail);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.DEPARTMENT_ID);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContentDealAfterFile
|
|
|
|
|
|
public partial class BSRiskSubmitContentDealAfterFileMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT_DEAL_AFTER_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT_DEAL_AFTER_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskSubmitContentDeal).WithMany(t=>t.Nav_FilesAfter).HasForeignKey(t => t.RISK_SUBMIT_CONTENT_DEAL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContentDealFile
|
|
|
|
|
|
public partial class BSRiskSubmitContentDealFileMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT_DEAL_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT_DEAL_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskSubmitContentDeal).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.RISK_SUBMIT_CONTENT_DEAL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContentDealUserchecksign
|
|
|
|
|
|
public partial class BSRiskSubmitContentDealUserchecksignMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT_DEAL_USERCHECKSIGN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT_DEAL_USERCHECKSIGN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ContentDeal).WithMany(t=>t.Nav_ListCheckUserSign).HasForeignKey(t => t.SUBMIT_CONTENT_DEAL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.SUSER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContentDealUsersign
|
|
|
|
|
|
public partial class BSRiskSubmitContentDealUsersignMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT_DEAL_USERSIGN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT_DEAL_USERSIGN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ContentDeal).WithMany(t=>t.Nav_ListUserSign).HasForeignKey(t => t.SUBMIT_CONTENT_DEAL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.SUSER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContentFile
|
|
|
|
|
|
public partial class BSRiskSubmitContentFileMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskSubmit).WithMany().HasForeignKey(t => t.RISK_SUBMIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskSubmitContent).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.RISK_SUBMIT_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContentReason
|
|
|
|
|
|
public partial class BSRiskSubmitContentReasonMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT_REASON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT_REASON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskSubmitContent).WithMany(t=>t.Nav_ListRiskQuestionReason).HasForeignKey(t => t.RISK_SUBMIT_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskReason).WithMany().HasForeignKey(t => t.RISK_REASON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitContentTemp
|
|
|
|
|
|
public partial class BSRiskSubmitContentTempMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_CONTENT_TEMP>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_CONTENT_TEMP> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProject).WithMany().HasForeignKey(t => t.CHECK_PROJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckQuestion).WithMany().HasForeignKey(t => t.CHECK_QUESTION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DESCREPTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEMAND).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CHECKCONTENT).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CHECKPROOF).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckType).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckTypeLevel).WithMany().HasForeignKey(t => t.CHECK_TYPE_LEVEL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskArea).WithMany().HasForeignKey(t => t.RISK_AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany().HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheckDetail).WithMany().HasForeignKey(t => t.SAFE_CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Submit).WithMany().HasForeignKey(t => t.RISK_SUBMIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitContent).WithMany().HasForeignKey(t => t.RISK_SUBMIT_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID_EDIT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserAudit).WithMany().HasForeignKey(t => t.USER_ID_AUDIT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveCheckAudit).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitDelayApply
|
|
|
|
|
|
public partial class BSRiskSubmitDelayApplyMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_DELAY_APPLY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_DELAY_APPLY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Submit).WithMany().HasForeignKey(t => t.RISK_SUBMIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitContent).WithMany().HasForeignKey(t => t.RISK_SUBMIT_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitNoticePerson).WithMany().HasForeignKey(t => t.RISK_SUBMIT_NOTICE_PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.USER_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentApply).WithMany().HasForeignKey(t => t.APPLY_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.QUESTION_LEVEL_SHOW);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitDelayApplyDetail
|
|
|
|
|
|
public partial class BSRiskSubmitDelayApplyDetailMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Apply).WithMany(t=>t.Nav_ListApplyDetail).HasForeignKey(t => t.RISK_SUBMIT_DELAY_APPLY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitContent).WithMany().HasForeignKey(t => t.RISK_SUBMIT_CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitNoticePerson).WithMany().HasForeignKey(t => t.RISK_SUBMIT_NOTICE_PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Question).WithMany().HasForeignKey(t => t.CHECK_QUESTION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TEMPDEMAND).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.REASON).HasMaxLength(1000);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitFile
|
|
|
|
|
|
public partial class BSRiskSubmitFileMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskSubmit).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.RISK_SUBMIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitNotice
|
|
|
|
|
|
public partial class BSRiskSubmitNoticeMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_NOTICE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_NOTICE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Submit).WithMany().HasForeignKey(t => t.RISK_SUBMIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.NOTICETIME);
|
|
|
|
|
|
builder.Ignore(t => t.FORM_CODE);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskSubmitNoticePerson
|
|
|
|
|
|
public partial class BSRiskSubmitNoticePersonMap :APTEntityBaseMap<T_BS_RISK_SUBMIT_NOTICE_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_RISK_SUBMIT_NOTICE_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Submit).WithMany().HasForeignKey(t => t.RISK_SUBMIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SubmitNotice).WithMany().HasForeignKey(t => t.RISK_SUBMIT_NOTICE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.QUESTION_LEVEL_SHOW);
|
|
|
|
|
|
builder.Ignore(t => t.OPERATETYPE_SHOW);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_Files);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheck
|
|
|
|
|
|
public partial class BSSafeCheckMap :APTEntityBaseMap<T_BS_SAFE_CHECK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PlanSet).WithMany().HasForeignKey(t => t.PLAN_SET_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckType).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.CHECKOBJECT_DESCRIPTION);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckTypeLevel).WithMany().HasForeignKey(t => t.CHECK_TYPE_LEVEL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CheckUsers).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApproveDetails);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveTemp).WithMany().HasForeignKey(t => t.APPROVE_TEMP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveCheckAudit).WithMany().HasForeignKey(t => t.APPROVE_CHECKAUDIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApproveCheckAuditDetails);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USERID_DOPLAN).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENTID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.FORM_CODE);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
2024-08-05 16:12:41 +08:00
|
|
|
|
builder.Property(t => t.REMARK_CANCEL).HasMaxLength(500);
|
2024-07-12 16:37:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckDetail
|
|
|
|
|
|
public partial class BSSafeCheckDetailMap :APTEntityBaseMap<T_BS_SAFE_CHECK_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany(t=>t.Nav_ListSafeCheckDetail).HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckMain).WithMany().HasForeignKey(t => t.CHECK_MAIN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.CHECKRESULT_DESCRIPTION);
|
|
|
|
|
|
builder.Property(t => t.REMARK_RESULT).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.QUESTION_LEVEL_DESCRIPTION);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckArea).WithMany().HasForeignKey(t => t.RISK_AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProject).WithMany().HasForeignKey(t => t.CHECK_PROJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProjectProjectCategory).WithMany().HasForeignKey(t => t.CHECK_PROJECT_PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProjectCategory).WithMany().HasForeignKey(t => t.CHECK_PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckQuestion).WithMany().HasForeignKey(t => t.CHECK_QUESTION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CHECKCONTENT).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CHECKPROOF).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.ISAUTOLOAD);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Contents).WithMany().HasForeignKey(t => t.CHECK_CONTENTS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(100);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_Reject);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckDetailFile
|
|
|
|
|
|
public partial class BSSafeCheckDetailFileMap :APTEntityBaseMap<T_BS_SAFE_CHECK_DETAIL_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_DETAIL_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckDetail).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.SAFE_CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany().HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckDetailLaw
|
|
|
|
|
|
public partial class BSSafeCheckDetailLawMap :APTEntityBaseMap<T_BS_SAFE_CHECK_DETAIL_LAW>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_DETAIL_LAW> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckDetail).WithMany(t=>t.Nav_ListLaw).HasForeignKey(t => t.CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Standard).WithMany().HasForeignKey(t => t.STANDARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckDetailQuestion
|
|
|
|
|
|
public partial class BSSafeCheckDetailQuestionMap :APTEntityBaseMap<T_BS_SAFE_CHECK_DETAIL_QUESTION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_DETAIL_QUESTION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany().HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheckDetail).WithMany(t=>t.Nav_ListCheckDetailQuestion).HasForeignKey(t => t.SAFE_CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Question).WithMany().HasForeignKey(t => t.SAFE_CHECK_QUESTION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckDetailReason
|
|
|
|
|
|
public partial class BSSafeCheckDetailReasonMap :APTEntityBaseMap<T_BS_SAFE_CHECK_DETAIL_REASON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_DETAIL_REASON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckDetail).WithMany(t=>t.Nav_ListCheckDetailReason).HasForeignKey(t => t.CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskReason).WithMany().HasForeignKey(t => t.RISK_REASON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckDetailReject
|
|
|
|
|
|
public partial class BSSafeCheckDetailRejectMap :APTEntityBaseMap<T_BS_SAFE_CHECK_DETAIL_REJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_DETAIL_REJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Check).WithMany().HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckDetail).WithMany().HasForeignKey(t => t.SAFE_CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.REASON).HasMaxLength(200);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_User);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckDetailRejectFile
|
|
|
|
|
|
public partial class BSSafeCheckDetailRejectFileMap :APTEntityBaseMap<T_BS_SAFE_CHECK_DETAIL_REJECT_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_DETAIL_REJECT_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Reject).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.REJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckDetailUser
|
|
|
|
|
|
public partial class BSSafeCheckDetailUserMap :APTEntityBaseMap<T_BS_SAFE_CHECK_DETAIL_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_DETAIL_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany().HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheckDetail).WithMany(t=>t.Nav_ListCheckDetailUser).HasForeignKey(t => t.SAFE_CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckFile
|
|
|
|
|
|
public partial class BSSafeCheckFileMap :APTEntityBaseMap<T_BS_SAFE_CHECK_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckProject
|
|
|
|
|
|
public partial class BSSafeCheckProjectMap :APTEntityBaseMap<T_BS_SAFE_CHECK_PROJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_PROJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany(t=>t.Nav_ListCheckProject).HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProject).WithMany().HasForeignKey(t => t.CHECK_PROJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckProjectCategory
|
|
|
|
|
|
public partial class BSSafeCheckProjectCategoryMap :APTEntityBaseMap<T_BS_SAFE_CHECK_PROJECT_CATEGORY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_PROJECT_CATEGORY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany(t=>t.Nav_ListCheckProjectCategory).HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckProjectCategory).WithMany().HasForeignKey(t => t.CHECK_PROJECT_CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckRecord
|
|
|
|
|
|
public partial class BSSafeCheckRecordMap :APTEntityBaseMap<T_BS_SAFE_CHECK_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany().HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckRecordDetail
|
|
|
|
|
|
public partial class BSSafeCheckRecordDetailMap :APTEntityBaseMap<T_BS_SAFE_CHECK_RECORD_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_RECORD_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CheckRecord).WithMany(t=>t.Nav_ListRecordDetail).HasForeignKey(t => t.SAFE_CHECK_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheckDetail).WithMany().HasForeignKey(t => t.SAFE_CHECK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckRiskArea
|
|
|
|
|
|
public partial class BSSafeCheckRiskAreaMap :APTEntityBaseMap<T_BS_SAFE_CHECK_RISK_AREA>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_RISK_AREA> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany(t=>t.Nav_ListCheckRiskArea).HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskArea).WithMany().HasForeignKey(t => t.RISK_AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeCheckUsersign
|
|
|
|
|
|
public partial class BSSafeCheckUsersignMap :APTEntityBaseMap<T_BS_SAFE_CHECK_USERSIGN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BS_SAFE_CHECK_USERSIGN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SafeCheck).WithMany(t=>t.Nav_ListCheckUserSign).HasForeignKey(t => t.SAFE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.SUSER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ChangeShiftRecord
|
|
|
|
|
|
public partial class FOChangeShiftRecordMap :APTEntityBaseMap<T_FO_CHANGE_SHIFT_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CHANGE_SHIFT_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Editor).WithMany().HasForeignKey(t => t.EDITOR_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEVICE_STORAGE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CURRENT_CLASS_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CURRENT_CLASS_MEASURE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEVICE_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEVICE_MEASURE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.ENVIRONMENT_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.ENVIRONMENT_MEASURE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SUPPLIES_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SUPPLIES_MEASURE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.LAST_CLASS_RECORD_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.LAST_CLASS_FINISH_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Class).WithMany().HasForeignKey(t => t.CLASS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentPost).WithMany().HasForeignKey(t => t.DEPARTMENT_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Team).WithMany().HasForeignKey(t => t.TEAM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ChangeShiftRecordAfterUser
|
|
|
|
|
|
public partial class FOChangeShiftRecordAfterUserMap :APTEntityBaseMap<T_FO_CHANGE_SHIFT_RECORD_AFTER_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CHANGE_SHIFT_RECORD_AFTER_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ChangeShiftRecord).WithMany(t=>t.Nav_AfterUsers).HasForeignKey(t => t.CHANGE_SHIFT_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ChangeShiftRecordFile
|
|
|
|
|
|
public partial class FOChangeShiftRecordFileMap :APTEntityBaseMap<T_FO_CHANGE_SHIFT_RECORD_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CHANGE_SHIFT_RECORD_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ChangeShiftRecord).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.CHANGE_SHIFT_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ChangeShiftRecordPreUser
|
|
|
|
|
|
public partial class FOChangeShiftRecordPreUserMap :APTEntityBaseMap<T_FO_CHANGE_SHIFT_RECORD_PRE_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CHANGE_SHIFT_RECORD_PRE_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ChangeShiftRecord).WithMany(t=>t.Nav_PreUsers).HasForeignKey(t => t.CHANGE_SHIFT_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicenseDealMeasure
|
|
|
|
|
|
public partial class FOCrucialLicenseDealMeasureMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_DEAL_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_DEAL_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialLicenseJob).WithMany(t=>t.Nav_DealMeasures).HasForeignKey(t => t.CRUCIAL_LICENSE_JOB_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicenseJob
|
|
|
|
|
|
public partial class FOCrucialLicenseJobMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_JOB>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_JOB> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JOB_LOCATION).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApplyUser).WithMany().HasForeignKey(t => t.APPLY_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MonitorUser).WithMany().HasForeignKey(t => t.MONITOR_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JobCause).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SafeMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobScheme).WithMany().HasForeignKey(t => t.JOB_SCHEME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_PreOperSchFile);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApproveDetails);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.CALLBACK_INTERFACE);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany().HasForeignKey(t => t.SHIFT_MEETING_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CONTEXT);
|
|
|
|
|
|
builder.Property(t => t.PARENT_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Related).WithMany().HasForeignKey(t => t.RELATED_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicenseJobOutsource
|
|
|
|
|
|
public partial class FOCrucialLicenseJobOutsourceMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JOB_LOCATION).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApplyUser).WithMany().HasForeignKey(t => t.APPLY_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MonitorUser).WithMany().HasForeignKey(t => t.MONITOR_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JobCause).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SafeMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobScheme).WithMany().HasForeignKey(t => t.JOB_SCHEME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_PreOperSchFile);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApproveDetails);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.CALLBACK_INTERFACE);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany().HasForeignKey(t => t.SHIFT_MEETING_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CONTEXT);
|
|
|
|
|
|
builder.Property(t => t.PARENT_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Related).WithMany().HasForeignKey(t => t.RELATED_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicenseOutsourceDealMeasure
|
|
|
|
|
|
public partial class FOCrucialLicenseOutsourceDealMeasureMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_OUTSOURCE_DEAL_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_OUTSOURCE_DEAL_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialLicenseJob).WithMany(t=>t.Nav_DealMeasures).HasForeignKey(t => t.CRUCIAL_LICENSE_JOB_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicenseOutsourcePerson
|
|
|
|
|
|
public partial class FOCrucialLicenseOutsourcePersonMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_OUTSOURCE_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_OUTSOURCE_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialLicenseJob).WithMany(t=>t.Nav_CrucialLicensePerson).HasForeignKey(t => t.CRUCIAL_LICENSE_JOB_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.USER_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CERTIFICATE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CERTIFICATE_CODE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicenseOutsourceSafeConfirm
|
|
|
|
|
|
public partial class FOCrucialLicenseOutsourceSafeConfirmMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_CONFIRM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_CONFIRM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialLicenseJob).WithMany(t=>t.Nav_SafeConfirms).HasForeignKey(t => t.CRUCIAL_LICENSE_JOB_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicenseOutsourceSafeMeasure
|
|
|
|
|
|
public partial class FOCrucialLicenseOutsourceSafeMeasureMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_OUTSOURCE_SAFE_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialLicenseJob).WithMany(t=>t.Nav_SafeMeasures).HasForeignKey(t => t.CRUCIAL_LICENSE_JOB_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicensePerson
|
|
|
|
|
|
public partial class FOCrucialLicensePersonMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialLicenseJob).WithMany(t=>t.Nav_CrucialLicensePerson).HasForeignKey(t => t.CRUCIAL_LICENSE_JOB_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JOB_DOCUMENT).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Train).WithMany().HasForeignKey(t => t.TRAIN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OUTSOURCE);
|
|
|
|
|
|
builder.Ignore(t => t.RELATED_ID);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicenseSafeConfirm
|
|
|
|
|
|
public partial class FOCrucialLicenseSafeConfirmMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_SAFE_CONFIRM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_SAFE_CONFIRM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialLicenseJob).WithMany(t=>t.Nav_SafeConfirms).HasForeignKey(t => t.CRUCIAL_LICENSE_JOB_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialLicenseSafeMeasure
|
|
|
|
|
|
public partial class FOCrucialLicenseSafeMeasureMap :APTEntityBaseMap<T_FO_CRUCIAL_LICENSE_SAFE_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CRUCIAL_LICENSE_SAFE_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialLicenseJob).WithMany(t=>t.Nav_SafeMeasures).HasForeignKey(t => t.CRUCIAL_LICENSE_JOB_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CurrentClassRecord
|
|
|
|
|
|
public partial class FOCurrentClassRecordMap :APTEntityBaseMap<T_FO_CURRENT_CLASS_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CURRENT_CLASS_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Editor).WithMany().HasForeignKey(t => t.EDITOR_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DEVICE_STORAGE).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Class).WithMany().HasForeignKey(t => t.CLASS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentPost).WithMany().HasForeignKey(t => t.DEPARTMENT_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CURRENT_CLASS_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CURRENT_CLASS_MEASURE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEVICE_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEVICE_MEASURE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.ENVIRONMENT_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.ENVIRONMENT_MEASURE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SUPPLIES_QUESTION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SUPPLIES_MEASURE).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ChargeUser).WithMany().HasForeignKey(t => t.CHARGE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.AUDIT_OPINION).HasMaxLength(2000);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Team).WithMany().HasForeignKey(t => t.CLASS_TEAM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CurrentClassRecordFile
|
|
|
|
|
|
public partial class FOCurrentClassRecordFileMap :APTEntityBaseMap<T_FO_CURRENT_CLASS_RECORD_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CURRENT_CLASS_RECORD_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CurrentClassRecord).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.CURRENT_CLASS_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CurrentClassRecordLabourSupply
|
|
|
|
|
|
public partial class FOCurrentClassRecordLabourSupplyMap :APTEntityBaseMap<T_FO_CURRENT_CLASS_RECORD_LABOUR_SUPPLY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CURRENT_CLASS_RECORD_LABOUR_SUPPLY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CurrentClassRecord).WithMany(t=>t.Nav_LabourSupplies).HasForeignKey(t => t.CURRENT_CLASS_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CurrentClassRecordUser
|
|
|
|
|
|
public partial class FOCurrentClassRecordUserMap :APTEntityBaseMap<T_FO_CURRENT_CLASS_RECORD_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_CURRENT_CLASS_RECORD_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CurrentClassRecord).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.CURRENT_CLASS_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobActivityDetail
|
|
|
|
|
|
public partial class FOJobActivityDetailMap :APTEntityBaseMap<T_FO_JOB_ACTIVITY_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_ACTIVITY_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobActivityRecord).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.JOB_ACTIVITY_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SafeConfirmsStr).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobActivityFile
|
|
|
|
|
|
public partial class FOJobActivityFileMap :APTEntityBaseMap<T_FO_JOB_ACTIVITY_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_ACTIVITY_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Details).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.T_FO_JOB_ACTIVITY_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobActivityFlow
|
|
|
|
|
|
public partial class FOJobActivityFlowMap :APTEntityBaseMap<T_FO_JOB_ACTIVITY_FLOW>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_ACTIVITY_FLOW> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobActivityRecord).WithMany(t=>t.Nav_Flow).HasForeignKey(t => t.JOB_ACTIVITY_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SafeMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobActivityFlowFile
|
|
|
|
|
|
public partial class FOJobActivityFlowFileMap :APTEntityBaseMap<T_FO_JOB_ACTIVITY_FLOW_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_ACTIVITY_FLOW_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Flow).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.T_FO_JOB_ACTIVITY_FLOW_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobActivityMeasure
|
|
|
|
|
|
public partial class FOJobActivityMeasureMap :APTEntityBaseMap<T_FO_JOB_ACTIVITY_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_ACTIVITY_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobActivityRecord).WithMany(t=>t.Nav_Measure).HasForeignKey(t => t.JOB_ACTIVITY_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DealMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobActivityMeasureFile
|
|
|
|
|
|
public partial class FOJobActivityMeasureFileMap :APTEntityBaseMap<T_FO_JOB_ACTIVITY_MEASURE_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_ACTIVITY_MEASURE_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Measure).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.T_FO_JOB_ACTIVITY_MEASURE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobActivityPerson
|
|
|
|
|
|
public partial class FOJobActivityPersonMap :APTEntityBaseMap<T_FO_JOB_ACTIVITY_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_ACTIVITY_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobActivityRecord).WithMany(t=>t.Nav_JobActivityPerson).HasForeignKey(t => t.JOB_ACTIVITY_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JOB_DOCUMENT).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RelatedUser).WithMany().HasForeignKey(t => t.RELATED_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobActivityRecord
|
|
|
|
|
|
public partial class FOJobActivityRecordMap :APTEntityBaseMap<T_FO_JOB_ACTIVITY_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_ACTIVITY_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TechDisclosure).WithMany().HasForeignKey(t => t.TECH_DISCLOSURE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobName).WithMany().HasForeignKey(t => t.JOB_NAME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobNameOut).WithMany().HasForeignKey(t => t.JOB_NAME_OUTSOURCE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JOB_LOCATION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.EFFECTIVE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.EXIST).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SUITABLE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NEED).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.REQUIRES).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Property(t => t.PARENT_NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobEventDetail
|
|
|
|
|
|
public partial class FOJobEventDetailMap :APTEntityBaseMap<T_FO_JOB_EVENT_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_EVENT_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobEventRecord).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.JOB_EVENT_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SafeConfirmsStr).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobEventFile
|
|
|
|
|
|
public partial class FOJobEventFileMap :APTEntityBaseMap<T_FO_JOB_EVENT_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_EVENT_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Details).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.T_FO_JOB_EVENT_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobEventFlow
|
|
|
|
|
|
public partial class FOJobEventFlowMap :APTEntityBaseMap<T_FO_JOB_EVENT_FLOW>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_EVENT_FLOW> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobEventRecord).WithMany(t=>t.Nav_Flow).HasForeignKey(t => t.JOB_EVENT_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SafeMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobEventFlowFile
|
|
|
|
|
|
public partial class FOJobEventFlowFileMap :APTEntityBaseMap<T_FO_JOB_EVENT_FLOW_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_EVENT_FLOW_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Flow).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.T_FO_JOB_EVENT_FLOW_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobEventMeasure
|
|
|
|
|
|
public partial class FOJobEventMeasureMap :APTEntityBaseMap<T_FO_JOB_EVENT_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_EVENT_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobEventRecord).WithMany(t=>t.Nav_Measure).HasForeignKey(t => t.JOB_EVENT_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DealMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobEventMeasureFile
|
|
|
|
|
|
public partial class FOJobEventMeasureFileMap :APTEntityBaseMap<T_FO_JOB_EVENT_MEASURE_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_EVENT_MEASURE_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Measure).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.T_FO_JOB_EVENT_MEASURE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobEventPerson
|
|
|
|
|
|
public partial class FOJobEventPersonMap :APTEntityBaseMap<T_FO_JOB_EVENT_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_EVENT_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobEventRecord).WithMany(t=>t.Nav_JobEventPerson).HasForeignKey(t => t.JOB_EVENT_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobEventRecord
|
|
|
|
|
|
public partial class FOJobEventRecordMap :APTEntityBaseMap<T_FO_JOB_EVENT_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_JOB_EVENT_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany().HasForeignKey(t => t.SHIFT_MEETING_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JOB_DATE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.JOB_LOCATION).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CONTEXT);
|
|
|
|
|
|
builder.Property(t => t.PARENT_NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region LabourSupply
|
|
|
|
|
|
public partial class FOLabourSupplyMap :APTEntityBaseMap<T_FO_LABOUR_SUPPLY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_LABOUR_SUPPLY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PreOperSch
|
|
|
|
|
|
public partial class FOPreOperSchMap :APTEntityBaseMap<T_FO_PRE_OPER_SCH>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_PRE_OPER_SCH> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.FILE_NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.LANUNCH_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CONTENT).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PreOperSchFile
|
|
|
|
|
|
public partial class FOPreOperSchFileMap :APTEntityBaseMap<T_FO_PRE_OPER_SCH_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_PRE_OPER_SCH_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PreOperSch).WithMany(t=>t.Nav_PreOperSchFile).HasForeignKey(t => t.PRE_OPER_SCH_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PreOperSchUser
|
|
|
|
|
|
public partial class FOPreOperSchUserMap :APTEntityBaseMap<T_FO_PRE_OPER_SCH_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_PRE_OPER_SCH_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PreOperSch).WithMany(t=>t.Nav_PreOperSchUser).HasForeignKey(t => t.PRE_OPER_SCH_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RealDepartmentPost).WithMany().HasForeignKey(t => t.REAL_DEPARTMENT_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PreShiftMeetingRecord
|
|
|
|
|
|
public partial class FOPreShiftMeetingRecordMap :APTEntityBaseMap<T_FO_PRE_SHIFT_MEETING_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_PRE_SHIFT_MEETING_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.JOB_CONTENT).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.PROTECT_MEASURE).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.OTHER_CONTENT).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.RATE).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Class).WithMany().HasForeignKey(t => t.CLASS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Team).WithMany().HasForeignKey(t => t.TEAM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PreShiftMeetingRecordFile
|
|
|
|
|
|
public partial class FOPreShiftMeetingRecordFileMap :APTEntityBaseMap<T_FO_PRE_SHIFT_MEETING_RECORD_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_PRE_SHIFT_MEETING_RECORD_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PreShiftMeetingRecord).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.PRE_SHIFT_MEETING_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PreShiftMeetingRecordUser
|
|
|
|
|
|
public partial class FOPreShiftMeetingRecordUserMap :APTEntityBaseMap<T_FO_PRE_SHIFT_MEETING_RECORD_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_PRE_SHIFT_MEETING_RECORD_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PreShiftMeetingRecord).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.PRE_SHIFT_MEETING_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RealDepartmentPost).WithMany().HasForeignKey(t => t.REAL_DEPARTMENT_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TeamActivity
|
|
|
|
|
|
public partial class FOTeamActivityMap :APTEntityBaseMap<T_FO_TEAM_ACTIVITY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_TEAM_ACTIVITY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.TITLE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.DURATION).HasMaxLength(20);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.NOTE_AKER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Taem).WithMany().HasForeignKey(t => t.TEAM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.ACTIVITY_CONTENT).HasMaxLength(1000);
|
|
|
|
|
|
builder.Ignore(t => t.OpType);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.DEPARTMENT_ID);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TeamActivityFile
|
|
|
|
|
|
public partial class FOTeamActivityFileMap :APTEntityBaseMap<T_FO_TEAM_ACTIVITY_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_TEAM_ACTIVITY_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TeamActivity).WithMany(t=>t.Nav_TeamActivityFile).HasForeignKey(t => t.TEAM_ACTIVITY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TeamActivityUser
|
|
|
|
|
|
public partial class FOTeamActivityUserMap :APTEntityBaseMap<T_FO_TEAM_ACTIVITY_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_TEAM_ACTIVITY_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TeamActivity).WithMany(t=>t.Nav_TeamActivityUser).HasForeignKey(t => t.TEAM_ACTIVITY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TechDisclosureFrom
|
|
|
|
|
|
public partial class FOTechDisclosureFromMap :APTEntityBaseMap<T_FO_TECH_DISCLOSURE_FROM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_TECH_DISCLOSURE_FROM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobName).WithMany().HasForeignKey(t => t.JOB_NAME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobNameOut).WithMany().HasForeignKey(t => t.JOB_NAME_OUTSOURCE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JOB_LOCATION).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DisclosurePerson).WithMany().HasForeignKey(t => t.DISCLOSURE_PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DisclosuredPerson).WithMany().HasForeignKey(t => t.DISCLOSURED_PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DisclosureContent).HasMaxLength(2000);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TechDisclosurePerson
|
|
|
|
|
|
public partial class FOTechDisclosurePersonMap :APTEntityBaseMap<T_FO_TECH_DISCLOSURE_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FO_TECH_DISCLOSURE_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TechDisclosure).WithMany(t=>t.Nav_Person).HasForeignKey(t => t.TECH_DISCLOSURE_FROM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RelatedUser).WithMany().HasForeignKey(t => t.RELATED_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluationPlan
|
|
|
|
|
|
public partial class HMEvaluationPlanMap :APTEntityBaseMap<T_HM_EVALUATION_PLAN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATION_PLAN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DOCUMENT_NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_InitiatingDepartment).WithMany().HasForeignKey(t => t.INITIATING_DEPARTMENT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_GroupLeader).WithMany().HasForeignKey(t => t.GROUP_LEADER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DeputyGroupLeader).WithMany().HasForeignKey(t => t.DEPUTY_GROUP_LEADER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.EVALUATION_CONTENT).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ReleaseUser).WithMany().HasForeignKey(t => t.RELEASE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Property(t => t.APPROVECODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.AUDIT_OPINION).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluationFile
|
|
|
|
|
|
public partial class HMEvaluationFileMap :APTEntityBaseMap<T_HM_EVALUATION_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATION_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationPlan).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.EVALUATION_PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluationDetail
|
|
|
|
|
|
public partial class HMEvaluationDetailMap :APTEntityBaseMap<T_HM_EVALUATION_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATION_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationPlan).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.LEVEL).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ChargeUser).WithMany().HasForeignKey(t => t.CHARGE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluationDetailArea
|
|
|
|
|
|
public partial class HMEvaluationDetailAreaMap :APTEntityBaseMap<T_HM_EVALUATION_DETAIL_AREA>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATION_DETAIL_AREA> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Detail).WithMany(t=>t.Nav_Areas).HasForeignKey(t => t.DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluationDetailIdentifying
|
|
|
|
|
|
public partial class HMEvaluationDetailIdentifyingMap :APTEntityBaseMap<T_HM_EVALUATION_DETAIL_IDENTIFYING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATION_DETAIL_IDENTIFYING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Detail).WithMany(t=>t.Nav_Identifyings).HasForeignKey(t => t.DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region NoticeRelease
|
|
|
|
|
|
public partial class HMNoticeReleaseMap :APTEntityBaseMap<T_HM_NOTICE_RELEASE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_NOTICE_RELEASE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NOTICE_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.DOCUMENT_CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.DOCUMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.DOCUMENT_VERSION).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TaskAnalyze).WithMany().HasForeignKey(t => t.TASK_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ReleaseUser).WithMany().HasForeignKey(t => t.RELEASE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ReleasDepartment).WithMany().HasForeignKey(t => t.RELEAS_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Plan).WithMany().HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region NoticeReleaseDepartment
|
|
|
|
|
|
public partial class HMNoticeReleaseDepartmentMap :APTEntityBaseMap<T_HM_NOTICE_RELEASE_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_NOTICE_RELEASE_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_NoticeRelease).WithMany(t=>t.Nav_ReleaseRange).HasForeignKey(t => t.NOTICE_RELEASE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskTask
|
|
|
|
|
|
public partial class HMRiskTaskMap :APTEntityBaseMap<T_HM_RISK_TASK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_TASK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.LEVEL).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_InitiatingDepartment).WithMany().HasForeignKey(t => t.INITIATING_DEPARTMENT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Request).WithMany().HasForeignKey(t => t.REQUEST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Property(t => t.APPROVECODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LiableUser).WithMany().HasForeignKey(t => t.LIABLE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Plan).WithMany().HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskTaskArea
|
|
|
|
|
|
public partial class HMRiskTaskAreaMap :APTEntityBaseMap<T_HM_RISK_TASK_AREA>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_TASK_AREA> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task).WithMany(t=>t.Nav_Areas).HasForeignKey(t => t.TASK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskTaskDetail
|
|
|
|
|
|
public partial class HMRiskTaskDetailMap :APTEntityBaseMap<T_HM_RISK_TASK_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_TASK_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task).WithMany(t=>t.Nav_Detail).HasForeignKey(t => t.TASK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.RECORD_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskTaskFile
|
|
|
|
|
|
public partial class HMRiskTaskFileMap :APTEntityBaseMap<T_HM_RISK_TASK_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_TASK_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.TASK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskArea
|
|
|
|
|
|
public partial class HMRiskAreaMap :APTEntityBaseMap<T_HM_RISK_AREA>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_AREA> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskTaskIdentifying
|
|
|
|
|
|
public partial class HMRiskTaskIdentifyingMap :APTEntityBaseMap<T_HM_RISK_TASK_IDENTIFYING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_TASK_IDENTIFYING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task).WithMany(t=>t.Nav_Identifyings).HasForeignKey(t => t.TASK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskTaskUser
|
|
|
|
|
|
public partial class HMRiskTaskUserMap :APTEntityBaseMap<T_HM_RISK_TASK_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_TASK_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task_Detail).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.TASK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskRecord
|
|
|
|
|
|
public partial class HMRiskRecordMap :APTEntityBaseMap<T_HM_RISK_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Request).WithMany().HasForeignKey(t => t.REQUEST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task).WithMany().HasForeignKey(t => t.TASK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_NoteTaker).WithMany().HasForeignKey(t => t.NOTE_TAKER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_InitiatingDepartment).WithMany().HasForeignKey(t => t.INITIATING_DEPARTMENT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Property(t => t.APPROVECODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LiableUser).WithMany().HasForeignKey(t => t.LIABLE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Plan).WithMany().HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskRecordDetail
|
|
|
|
|
|
public partial class HMRiskRecordDetailMap :APTEntityBaseMap<T_HM_RISK_RECORD_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_RECORD_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateRisk).WithMany().HasForeignKey(t => t.EVALUATE_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.RISK_NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.RISK_PLACE).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Type).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentLiable).WithMany().HasForeignKey(t => t.DEPARTMENT_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PostLiable).WithMany().HasForeignKey(t => t.POST_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LiableUser).WithMany().HasForeignKey(t => t.LIABLE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskRecordDetailEquipment
|
|
|
|
|
|
public partial class HMRiskRecordDetailEquipmentMap :APTEntityBaseMap<T_HM_RISK_RECORD_DETAIL_EQUIPMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_RECORD_DETAIL_EQUIPMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskRecordDetail).WithMany(t=>t.Nav_EvaluateRiskRecordEquipment).HasForeignKey(t => t.RISK_RECORD_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Equipment).WithMany().HasForeignKey(t => t.EQUIPMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskRecordDetailFacilities
|
|
|
|
|
|
public partial class HMRiskRecordDetailFacilitiesMap :APTEntityBaseMap<T_HM_RISK_RECORD_DETAIL_FACILITIES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_RECORD_DETAIL_FACILITIES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskRecordDetail).WithMany(t=>t.Nav_EvaluateRiskRecordFacilities).HasForeignKey(t => t.RISK_RECORD_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Facilities).WithMany().HasForeignKey(t => t.FACILITIES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskRecordDetailWorkduty
|
|
|
|
|
|
public partial class HMRiskRecordDetailWorkdutyMap :APTEntityBaseMap<T_HM_RISK_RECORD_DETAIL_WORKDUTY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_RECORD_DETAIL_WORKDUTY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskRecordDetail).WithMany(t=>t.Nav_EvaluateRiskRecordWorkduty).HasForeignKey(t => t.RISK_RECORD_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Workduty).WithMany().HasForeignKey(t => t.WORKDUTY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskRecordFile
|
|
|
|
|
|
public partial class HMRiskRecordFileMap :APTEntityBaseMap<T_HM_RISK_RECORD_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_RECORD_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskRecordIdentifying
|
|
|
|
|
|
public partial class HMRiskRecordIdentifyingMap :APTEntityBaseMap<T_HM_RISK_RECORD_IDENTIFYING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_RECORD_IDENTIFYING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Identifyings).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskRecordUser
|
|
|
|
|
|
public partial class HMRiskRecordUserMap :APTEntityBaseMap<T_HM_RISK_RECORD_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_RECORD_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluationSchedule
|
|
|
|
|
|
public partial class HMEvaluationScheduleMap :APTEntityBaseMap<T_HM_EVALUATION_SCHEDULE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATION_SCHEDULE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.FORM_NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveRole).WithMany().HasForeignKey(t => t.APPROVE_ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region AnalysisPerson
|
|
|
|
|
|
public partial class HMAnalysisPersonMap :APTEntityBaseMap<T_HM_ANALYSIS_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_ANALYSIS_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LicenseAnalysis).WithMany(t=>t.Nav_AnalysisPerson).HasForeignKey(t => t.LICENSE_ANALYSIS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialAnalysisFile
|
|
|
|
|
|
public partial class HMCrucialAnalysisFileMap :APTEntityBaseMap<T_HM_CRUCIAL_ANALYSIS_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_CRUCIAL_ANALYSIS_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Details).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.CRUCIAL_TASK_ANALYSIS_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialAnalysisPerson
|
|
|
|
|
|
public partial class HMCrucialAnalysisPersonMap :APTEntityBaseMap<T_HM_CRUCIAL_ANALYSIS_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_CRUCIAL_ANALYSIS_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialTaskAnalysis).WithMany(t=>t.Nav_CrucialAnalysisPerson).HasForeignKey(t => t.CRUCIAL_TASK_ANALYSIS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialTaskAnalysis
|
|
|
|
|
|
public partial class HMCrucialTaskAnalysisMap :APTEntityBaseMap<T_HM_CRUCIAL_TASK_ANALYSIS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_CRUCIAL_TASK_ANALYSIS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationAnalyze).WithMany().HasForeignKey(t => t.OPERATION_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.CALLBACK_INTERFACE);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApproveDetails);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CONTEXT);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialTaskDetail
|
|
|
|
|
|
public partial class HMCrucialTaskDetailMap :APTEntityBaseMap<T_HM_CRUCIAL_TASK_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_CRUCIAL_TASK_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialTaskAnalysis).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.CRUCIAL_TASK_ANALYSIS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SafeConfirmsStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SafeMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DealMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CrucialTaskDetailRisk
|
|
|
|
|
|
public partial class HMCrucialTaskDetailRiskMap :APTEntityBaseMap<T_HM_CRUCIAL_TASK_DETAIL_RISK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_CRUCIAL_TASK_DETAIL_RISK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Details).WithMany(t=>t.Nav_DetailRisk).HasForeignKey(t => t.CRUCIAL_TASK_ANALYSIS_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateRisk).WithMany().HasForeignKey(t => t.EVALUATE_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EducationMeasures
|
|
|
|
|
|
public partial class HMEducationMeasuresMap :APTEntityBaseMap<T_HM_EDUCATION_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EDUCATION_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EmergencyMeasures
|
|
|
|
|
|
public partial class HMEmergencyMeasuresMap :APTEntityBaseMap<T_HM_EMERGENCY_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EMERGENCY_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EngineeringMeasures
|
|
|
|
|
|
public partial class HMEngineeringMeasuresMap :APTEntityBaseMap<T_HM_ENGINEERING_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_ENGINEERING_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Equipment
|
|
|
|
|
|
public partial class HMEquipmentMap :APTEntityBaseMap<T_HM_EQUIPMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EQUIPMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateHazard
|
|
|
|
|
|
public partial class HMEvaluateHazardMap :APTEntityBaseMap<T_HM_EVALUATE_HAZARD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_HAZARD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.HAZARD_POSITION).HasMaxLength(300);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.EXPOSURE_LIMIT_VALUE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OccupationalRisk).WithMany().HasForeignKey(t => t.OCCUPATIONALRISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MonitorMeasures).WithMany().HasForeignKey(t => t.MONITOR_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentLiable).WithMany().HasForeignKey(t => t.DEPARTMENT_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PostLiable).WithMany().HasForeignKey(t => t.POST_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.IndividualMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.EngineeringMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.ManagementMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.EducationTrainingMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.EmergencyDisposalMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateHazardDepartment
|
|
|
|
|
|
public partial class HMEvaluateHazardDepartmentMap :APTEntityBaseMap<T_HM_EVALUATE_HAZARD_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_HAZARD_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateHazard).WithMany(t=>t.Nav_EvaluateHazardDepartment).HasForeignKey(t => t.EVALUATE_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateHazardEducationMeasures
|
|
|
|
|
|
public partial class HMEvaluateHazardEducationMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_HAZARD_EDUCATION_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_HAZARD_EDUCATION_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateHazard).WithMany(t=>t.Nav_EvaluateHazardEducationMeasures).HasForeignKey(t => t.EVALUATE_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EducationMeasures).WithMany().HasForeignKey(t => t.EDUCATION_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateHazardEmergencyMeasures
|
|
|
|
|
|
public partial class HMEvaluateHazardEmergencyMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_HAZARD_EMERGENCY_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_HAZARD_EMERGENCY_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateHazard).WithMany(t=>t.Nav_EvaluateHazardEmergencyMeasures).HasForeignKey(t => t.EVALUATE_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EmergencyMeasures).WithMany().HasForeignKey(t => t.EMERGENCY_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateHazardEngineeringMeasures
|
|
|
|
|
|
public partial class HMEvaluateHazardEngineeringMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_HAZARD_ENGINEERING_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_HAZARD_ENGINEERING_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateHazard).WithMany(t=>t.Nav_EvaluateHazardEngineeringMeasures).HasForeignKey(t => t.EVALUATE_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EngineeringMeasures).WithMany().HasForeignKey(t => t.ENGINEERING_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateHazardIndividualMeasures
|
|
|
|
|
|
public partial class HMEvaluateHazardIndividualMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_HAZARD_INDIVIDUAL_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_HAZARD_INDIVIDUAL_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateHazard).WithMany(t=>t.Nav_EvaluateHazardIndividualMeasures).HasForeignKey(t => t.EVALUATE_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_IndividualMeasures).WithMany().HasForeignKey(t => t.INDIVIDUAL_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateHazardManagementMeasures
|
|
|
|
|
|
public partial class HMEvaluateHazardManagementMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_HAZARD_MANAGEMENT_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_HAZARD_MANAGEMENT_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateHazard).WithMany(t=>t.Nav_EvaluateHazardManagementMeasures).HasForeignKey(t => t.EVALUATE_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ManagementMeasures).WithMany().HasForeignKey(t => t.MANAGEMENT_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRequirement
|
|
|
|
|
|
public partial class HMEvaluateRequirementMap :APTEntityBaseMap<T_HM_EVALUATE_REQUIREMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_REQUIREMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResult
|
|
|
|
|
|
public partial class HMEvaluateResultMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Requirement).WithMany().HasForeignKey(t => t.REQUIREMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_NoteTaker).WithMany().HasForeignKey(t => t.NOTE_TAKER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_InitiatingDepartment).WithMany().HasForeignKey(t => t.INITIATING_DEPARTMENT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Property(t => t.APPROVECODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Plan).WithMany().HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultFile
|
|
|
|
|
|
public partial class HMEvaluateResultFileMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateResult).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.EVALUATE_RESULT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultHazard
|
|
|
|
|
|
public partial class HMEvaluateResultHazardMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_HAZARD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_HAZARD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateResult).WithMany(t=>t.Nav_Hazards).HasForeignKey(t => t.EVALUATE_RESULT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.HAZARD_POSITION).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.EXPOSURE_LIMIT_VALUE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OccupationalRisk).WithMany().HasForeignKey(t => t.OCCUPATIONALRISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateHazard).WithMany().HasForeignKey(t => t.EVALUATE_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MonitorMeasures).WithMany().HasForeignKey(t => t.MONITOR_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentLiable).WithMany().HasForeignKey(t => t.DEPARTMENT_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PostLiable).WithMany().HasForeignKey(t => t.POST_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LiableUser).WithMany().HasForeignKey(t => t.LIABLE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultHazardEducationMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultHazardEducationMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_HAZARD_EDUCATION_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_HAZARD_EDUCATION_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultHazard).WithMany(t=>t.Nav_EvaluateHazardEducationMeasures).HasForeignKey(t => t.EVALUATE_RESULT_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EducationMeasures).WithMany().HasForeignKey(t => t.EDUCATION_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultHazardEmergencyMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultHazardEmergencyMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_HAZARD_EMERGENCY_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_HAZARD_EMERGENCY_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultHazard).WithMany(t=>t.Nav_EvaluateHazardEmergencyMeasures).HasForeignKey(t => t.EVALUATE_RESULT_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EmergencyMeasures).WithMany().HasForeignKey(t => t.EMERGENCY_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultHazardEngineeringMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultHazardEngineeringMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_HAZARD_ENGINEERING_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_HAZARD_ENGINEERING_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultHazard).WithMany(t=>t.Nav_EvaluateHazardEngineeringMeasures).HasForeignKey(t => t.EVALUATE_RESULT_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EngineeringMeasures).WithMany().HasForeignKey(t => t.ENGINEERING_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultHazardIndividualMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultHazardIndividualMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_HAZARD_INDIVIDUAL_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_HAZARD_INDIVIDUAL_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultHazard).WithMany(t=>t.Nav_EvaluateHazardIndividualMeasures).HasForeignKey(t => t.EVALUATE_RESULT_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_IndividualMeasures).WithMany().HasForeignKey(t => t.INDIVIDUAL_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultHazardManagementMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultHazardManagementMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_HAZARD_MANAGEMENT_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_HAZARD_MANAGEMENT_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultHazard).WithMany(t=>t.Nav_EvaluateHazardManagementMeasures).HasForeignKey(t => t.EVALUATE_RESULT_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ManagementMeasures).WithMany().HasForeignKey(t => t.MANAGEMENT_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultRisk
|
|
|
|
|
|
public partial class HMEvaluateResultRiskMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_RISK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_RISK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateResult).WithMany(t=>t.Nav_Risks).HasForeignKey(t => t.EVALUATE_RESULT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.RISK_PLACE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Type).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateRisk).WithMany().HasForeignKey(t => t.EVALUATE_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentLiable).WithMany().HasForeignKey(t => t.DEPARTMENT_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PostLiable).WithMany().HasForeignKey(t => t.POST_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LiableUser).WithMany().HasForeignKey(t => t.LIABLE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultRiskEducationMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultRiskEducationMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_RISK_EDUCATION_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_RISK_EDUCATION_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultRisk).WithMany(t=>t.Nav_EvaluateRiskEducationMeasures).HasForeignKey(t => t.EVALUATION_RESULT_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EducationMeasures).WithMany().HasForeignKey(t => t.EDUCATION_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultRiskEmergencyMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultRiskEmergencyMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_RISK_EMERGENCY_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_RISK_EMERGENCY_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultRisk).WithMany(t=>t.Nav_EvaluateRiskEmergencyMeasures).HasForeignKey(t => t.EVALUATION_RESULT_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EmergencyMeasures).WithMany().HasForeignKey(t => t.EMERGENCY_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultRiskEngineeringMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultRiskEngineeringMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_RISK_ENGINEERING_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_RISK_ENGINEERING_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultRisk).WithMany(t=>t.Nav_EvaluateRiskEngineeringMeasures).HasForeignKey(t => t.EVALUATION_RESULT_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EngineeringMeasures).WithMany().HasForeignKey(t => t.ENGINEERING_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultRiskEquipment
|
|
|
|
|
|
public partial class HMEvaluateResultRiskEquipmentMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_RISK_EQUIPMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_RISK_EQUIPMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultRisk).WithMany(t=>t.Nav_EvaluateRiskEquipment).HasForeignKey(t => t.EVALUATION_RESULT_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Equipment).WithMany().HasForeignKey(t => t.EQUIPMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultRiskFacilities
|
|
|
|
|
|
public partial class HMEvaluateResultRiskFacilitiesMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_RISK_FACILITIES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_RISK_FACILITIES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultRisk).WithMany(t=>t.Nav_EvaluateRiskFacilities).HasForeignKey(t => t.EVALUATION_RESULT_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Facilities).WithMany().HasForeignKey(t => t.FACILITIES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultRiskIndividualMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultRiskIndividualMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_RISK_INDIVIDUAL_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_RISK_INDIVIDUAL_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultRisk).WithMany(t=>t.Nav_EvaluateRiskIndividualMeasures).HasForeignKey(t => t.EVALUATION_RESULT_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_IndividualMeasures).WithMany().HasForeignKey(t => t.INDIVIDUAL_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultRiskManagementMeasures
|
|
|
|
|
|
public partial class HMEvaluateResultRiskManagementMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_RISK_MANAGEMENT_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_RISK_MANAGEMENT_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultRisk).WithMany(t=>t.Nav_EvaluateRiskManagementMeasures).HasForeignKey(t => t.EVALUATION_RESULT_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ManagementMeasures).WithMany().HasForeignKey(t => t.MANAGEMENT_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateResultRiskWorkduty
|
|
|
|
|
|
public partial class HMEvaluateResultRiskWorkdutyMap :APTEntityBaseMap<T_HM_EVALUATE_RESULT_RISK_WORKDUTY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RESULT_RISK_WORKDUTY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationResultRisk).WithMany(t=>t.Nav_EvaluateRiskWorkduty).HasForeignKey(t => t.EVALUATION_RESULT_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.WORKDUTY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRisk
|
|
|
|
|
|
public partial class HMEvaluateRiskMap :APTEntityBaseMap<T_HM_EVALUATE_RISK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Type).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.RISK_PLACE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.IndividualMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.EngineeringMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.ManagementMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.EducationTrainingMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.EmergencyDisposalMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.postStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.equipmentStr).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentLiable).WithMany().HasForeignKey(t => t.DEPARTMENT_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PostLiable).WithMany().HasForeignKey(t => t.POST_LIABLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SourceDepartment).WithMany().HasForeignKey(t => t.SOURCE_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskDepartment
|
|
|
|
|
|
public partial class HMEvaluateRiskDepartmentMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationRisk).WithMany(t=>t.Nav_EvaluateRiskDepartment).HasForeignKey(t => t.EVALUATION_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskEducationMeasures
|
|
|
|
|
|
public partial class HMEvaluateRiskEducationMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_EDUCATION_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_EDUCATION_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationRisk).WithMany(t=>t.Nav_EvaluateRiskEducationMeasures).HasForeignKey(t => t.EVALUATION_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EducationMeasures).WithMany().HasForeignKey(t => t.EDUCATION_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskEmergencyMeasures
|
|
|
|
|
|
public partial class HMEvaluateRiskEmergencyMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_EMERGENCY_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_EMERGENCY_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationRisk).WithMany(t=>t.Nav_EvaluateRiskEmergencyMeasures).HasForeignKey(t => t.EVALUATION_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EmergencyMeasures).WithMany().HasForeignKey(t => t.EMERGENCY_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskEngineeringMeasures
|
|
|
|
|
|
public partial class HMEvaluateRiskEngineeringMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_ENGINEERING_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_ENGINEERING_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationRisk).WithMany(t=>t.Nav_EvaluateRiskEngineeringMeasures).HasForeignKey(t => t.EVALUATION_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EngineeringMeasures).WithMany().HasForeignKey(t => t.ENGINEERING_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskEquipment
|
|
|
|
|
|
public partial class HMEvaluateRiskEquipmentMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_EQUIPMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_EQUIPMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationRisk).WithMany(t=>t.Nav_EvaluateRiskEquipment).HasForeignKey(t => t.EVALUATION_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Equipment).WithMany().HasForeignKey(t => t.EQUIPMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskFacilities
|
|
|
|
|
|
public partial class HMEvaluateRiskFacilitiesMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_FACILITIES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_FACILITIES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationRisk).WithMany(t=>t.Nav_EvaluateRiskFacilities).HasForeignKey(t => t.EVALUATION_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Facilities).WithMany().HasForeignKey(t => t.FACILITIES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskIndividualMeasures
|
|
|
|
|
|
public partial class HMEvaluateRiskIndividualMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_INDIVIDUAL_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_INDIVIDUAL_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationRisk).WithMany(t=>t.Nav_EvaluateRiskIndividualMeasures).HasForeignKey(t => t.EVALUATION_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_IndividualMeasures).WithMany().HasForeignKey(t => t.INDIVIDUAL_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskLec
|
|
|
|
|
|
public partial class HMEvaluateRiskLecMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_LEC>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_LEC> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.TYPE).HasMaxLength(1);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskManagementMeasures
|
|
|
|
|
|
public partial class HMEvaluateRiskManagementMeasuresMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_MANAGEMENT_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_MANAGEMENT_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationRisk).WithMany(t=>t.Nav_EvaluateRiskManagementMeasures).HasForeignKey(t => t.EVALUATION_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ManagementMeasures).WithMany().HasForeignKey(t => t.MANAGEMENT_MEASURES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EvaluateRiskWorkduty
|
|
|
|
|
|
public partial class HMEvaluateRiskWorkdutyMap :APTEntityBaseMap<T_HM_EVALUATE_RISK_WORKDUTY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_EVALUATE_RISK_WORKDUTY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluationRisk).WithMany(t=>t.Nav_EvaluateRiskWorkduty).HasForeignKey(t => t.EVALUATION_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Facilities
|
|
|
|
|
|
public partial class HMFacilitiesMap :APTEntityBaseMap<T_HM_FACILITIES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_FACILITIES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.TYPE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FilePublish
|
|
|
|
|
|
public partial class HMFilePublishMap :APTEntityBaseMap<T_HM_FILE_PUBLISH>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_FILE_PUBLISH> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CrucialTaskAnalysis).WithMany().HasForeignKey(t => t.CRUCIAL_TASK_ANALYSIS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LicenseAnalysis).WithMany().HasForeignKey(t => t.LICENSE_ANALYSIS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OrdinaryTaskAnalysis).WithMany().HasForeignKey(t => t.ORDINARY_TASK_ANALYSIS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.EDITION).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_License_Details);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_Crucial_Details);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_Ordinary_Details);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FilePublishArea
|
|
|
|
|
|
public partial class HMFilePublishAreaMap :APTEntityBaseMap<T_HM_FILE_PUBLISH_AREA>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_FILE_PUBLISH_AREA> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_FilePublish).WithMany(t=>t.Nav_Area).HasForeignKey(t => t.FILE_PUBLISH_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardRecord
|
|
|
|
|
|
public partial class HMHazardRecordMap :APTEntityBaseMap<T_HM_HAZARD_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_InitiatingDepartment).WithMany().HasForeignKey(t => t.INITIATING_DEPARTMENT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_NoteTaker).WithMany().HasForeignKey(t => t.NOTE_TAKER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Property(t => t.APPROVECODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LiableUser).WithMany().HasForeignKey(t => t.LIABLE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Plan).WithMany().HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Property(t => t.AREAS).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.IDENTIFYINGS).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardRecordDetail
|
|
|
|
|
|
public partial class HMHazardRecordDetailMap :APTEntityBaseMap<T_HM_HAZARD_RECORD_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_RECORD_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_HazardRecord).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateHazard).WithMany().HasForeignKey(t => t.EVALUATE_HAZARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.HAZARD_POSITION).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.EXPOSURE_LIMIT_VALUE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OccupationalRisk).WithMany().HasForeignKey(t => t.OCCUPATIONALRISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardRecordFile
|
|
|
|
|
|
public partial class HMHazardRecordFileMap :APTEntityBaseMap<T_HM_HAZARD_RECORD_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_RECORD_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardRecordUser
|
|
|
|
|
|
public partial class HMHazardRecordUserMap :APTEntityBaseMap<T_HM_HAZARD_RECORD_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_RECORD_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardTask
|
|
|
|
|
|
public partial class HMHazardTaskMap :APTEntityBaseMap<T_HM_HAZARD_TASK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_TASK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.LEVEL).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_InitiatingDepartment).WithMany().HasForeignKey(t => t.INITIATING_DEPARTMENT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Property(t => t.APPROVECODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LiableUser).WithMany().HasForeignKey(t => t.LIABLE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Plan).WithMany().HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardTaskArea
|
|
|
|
|
|
public partial class HMHazardTaskAreaMap :APTEntityBaseMap<T_HM_HAZARD_TASK_AREA>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_TASK_AREA> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task).WithMany(t=>t.Nav_Areas).HasForeignKey(t => t.TASK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardTaskDetail
|
|
|
|
|
|
public partial class HMHazardTaskDetailMap :APTEntityBaseMap<T_HM_HAZARD_TASK_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_TASK_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task).WithMany(t=>t.Nav_Detail).HasForeignKey(t => t.TASK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.RECORD_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardTaskDetailIdentifying
|
|
|
|
|
|
public partial class HMHazardTaskDetailIdentifyingMap :APTEntityBaseMap<T_HM_HAZARD_TASK_DETAIL_IDENTIFYING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_TASK_DETAIL_IDENTIFYING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task_Detail).WithMany(t=>t.Nav_Identifyings).HasForeignKey(t => t.TASK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardTaskDetailUser
|
|
|
|
|
|
public partial class HMHazardTaskDetailUserMap :APTEntityBaseMap<T_HM_HAZARD_TASK_DETAIL_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_TASK_DETAIL_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task_Detail).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.TASK_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardTaskFile
|
|
|
|
|
|
public partial class HMHazardTaskFileMap :APTEntityBaseMap<T_HM_HAZARD_TASK_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_TASK_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.TASK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HazardTaskIdentifying
|
|
|
|
|
|
public partial class HMHazardTaskIdentifyingMap :APTEntityBaseMap<T_HM_HAZARD_TASK_IDENTIFYING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_HAZARD_TASK_IDENTIFYING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Task).WithMany(t=>t.Nav_Identifyings).HasForeignKey(t => t.TASK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Identifying).WithMany().HasForeignKey(t => t.IDENTIFYING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Identifying
|
|
|
|
|
|
public partial class HMIdentifyingMap :APTEntityBaseMap<T_HM_IDENTIFYING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_IDENTIFYING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
builder.Property(t => t.LIMIT_UNIT).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region IndividualMeasures
|
|
|
|
|
|
public partial class HMIndividualMeasuresMap :APTEntityBaseMap<T_HM_INDIVIDUAL_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_INDIVIDUAL_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobtaskIdentify
|
|
|
|
|
|
public partial class HMJobtaskIdentifyMap :APTEntityBaseMap<T_HM_JOBTASK_IDENTIFY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_JOBTASK_IDENTIFY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApproveDetails);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.CALLBACK_INTERFACE);
|
|
|
|
|
|
builder.Ignore(t => t.PARAM);
|
|
|
|
|
|
builder.Ignore(t => t.FORM_CODE);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CONTEXT);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobtaskIdentifyDetail
|
|
|
|
|
|
public partial class HMJobtaskIdentifyDetailMap :APTEntityBaseMap<T_HM_JOBTASK_IDENTIFY_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_JOBTASK_IDENTIFY_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobtaskIdentify).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.JOBTASK_IDENTIFY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.DetailPost);
|
|
|
|
|
|
builder.Ignore(t => t.OperationStepName);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobtaskIdentifyDetailPost
|
|
|
|
|
|
public partial class HMJobtaskIdentifyDetailPostMap :APTEntityBaseMap<T_HM_JOBTASK_IDENTIFY_DETAIL_POST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_JOBTASK_IDENTIFY_DETAIL_POST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Detail).WithMany(t=>t.Nav_DetailPost).HasForeignKey(t => t.JOBTASK_IDENTIFY_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobtaskIdentifyDetailRisk
|
|
|
|
|
|
public partial class HMJobtaskIdentifyDetailRiskMap :APTEntityBaseMap<T_HM_JOBTASK_IDENTIFY_DETAIL_RISK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_JOBTASK_IDENTIFY_DETAIL_RISK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Detail).WithMany(t=>t.Nav_DetailRisk).HasForeignKey(t => t.JOBTASK_IDENTIFY_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateRisk).WithMany().HasForeignKey(t => t.EVALUATE_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobtaskIdentifyFile
|
|
|
|
|
|
public partial class HMJobtaskIdentifyFileMap :APTEntityBaseMap<T_HM_JOBTASK_IDENTIFY_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_JOBTASK_IDENTIFY_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobtaskIdentify).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.JOBTASK_IDENTIFY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobtaskIdentifyUser
|
|
|
|
|
|
public partial class HMJobtaskIdentifyUserMap :APTEntityBaseMap<T_HM_JOBTASK_IDENTIFY_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_JOBTASK_IDENTIFY_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobtaskIdentify).WithMany(t=>t.Nav_IdentifyUser).HasForeignKey(t => t.JOBTASK_IDENTIFY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region LicenseAnalysis
|
|
|
|
|
|
public partial class HMLicenseAnalysisMap :APTEntityBaseMap<T_HM_LICENSE_ANALYSIS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_LICENSE_ANALYSIS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationAnalyze).WithMany().HasForeignKey(t => t.OPERATION_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.CALLBACK_INTERFACE);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApproveDetails);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CONTEXT);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region LicenseAnalysisDetail
|
|
|
|
|
|
public partial class HMLicenseAnalysisDetailMap :APTEntityBaseMap<T_HM_LICENSE_ANALYSIS_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_LICENSE_ANALYSIS_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LicenseAnalysis).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.LICENSE_ANALYSIS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SafeConfirmsStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SafeMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DealMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_WorkPermitType).WithMany().HasForeignKey(t => t.WORK_PERMIT_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region LicenseAnalysisDetailRisk
|
|
|
|
|
|
public partial class HMLicenseAnalysisDetailRiskMap :APTEntityBaseMap<T_HM_LICENSE_ANALYSIS_DETAIL_RISK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_LICENSE_ANALYSIS_DETAIL_RISK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Details).WithMany(t=>t.Nav_DetailRisk).HasForeignKey(t => t.LICENSE_ANALYSIS_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateRisk).WithMany().HasForeignKey(t => t.EVALUATE_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region LicenseAnalysisFile
|
|
|
|
|
|
public partial class HMLicenseAnalysisFileMap :APTEntityBaseMap<T_HM_LICENSE_ANALYSIS_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_LICENSE_ANALYSIS_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Details).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.LICENSE_ANALYSIS_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ManagementMeasures
|
|
|
|
|
|
public partial class HMManagementMeasuresMap :APTEntityBaseMap<T_HM_MANAGEMENT_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_MANAGEMENT_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MonitorMeasures
|
|
|
|
|
|
public partial class HMMonitorMeasuresMap :APTEntityBaseMap<T_HM_MONITOR_MEASURES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_MONITOR_MEASURES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region NoticeReleaseFile
|
|
|
|
|
|
public partial class HMNoticeReleaseFileMap :APTEntityBaseMap<T_HM_NOTICE_RELEASE_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_NOTICE_RELEASE_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_NoticeRelease).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.NOTICE_RELEASE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OccupationalRisk
|
|
|
|
|
|
public partial class HMOccupationalRiskMap :APTEntityBaseMap<T_HM_OCCUPATIONAL_RISK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OCCUPATIONAL_RISK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationInstructionFile
|
|
|
|
|
|
public partial class HMOperationInstructionFileMap :APTEntityBaseMap<T_HM_OPERATION_INSTRUCTION_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_INSTRUCTION_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationLink).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.OPERATION_LINK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationLink
|
|
|
|
|
|
public partial class HMOperationLinkMap :APTEntityBaseMap<T_HM_OPERATION_LINK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_LINK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_WorkPermitType).WithMany().HasForeignKey(t => t.WORK_PERMIT_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SafeConfirmsStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SafeMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DealMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.POST).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Unit).WithMany().HasForeignKey(t => t.UNIT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationLinkArea
|
|
|
|
|
|
public partial class HMOperationLinkAreaMap :APTEntityBaseMap<T_HM_OPERATION_LINK_AREA>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_LINK_AREA> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationLink).WithMany(t=>t.Nav_LinkArea).HasForeignKey(t => t.OPERATION_LINK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationLinkEvaluateRisk
|
|
|
|
|
|
public partial class HMOperationLinkEvaluateRiskMap :APTEntityBaseMap<T_HM_OPERATION_LINK_EVALUATE_RISK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_LINK_EVALUATE_RISK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationLink).WithMany(t=>t.Nav_OperationLinkEvaluateRisk).HasForeignKey(t => t.OPERATION_LINK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateRisk).WithMany().HasForeignKey(t => t.EVALUATE_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationLinkPost
|
|
|
|
|
|
public partial class HMOperationLinkPostMap :APTEntityBaseMap<T_HM_OPERATION_LINK_POST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_LINK_POST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationLink).WithMany(t=>t.Nav_LinkPost).HasForeignKey(t => t.OPERATION_LINK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationStep
|
|
|
|
|
|
public partial class HMOperationStepMap :APTEntityBaseMap<T_HM_OPERATION_STEP>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_STEP> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationStepDealMeasure
|
|
|
|
|
|
public partial class HMOperationStepDealMeasureMap :APTEntityBaseMap<T_HM_OPERATION_STEP_DEAL_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_STEP_DEAL_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany(t=>t.Nav_DealMeasures).HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(600);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationStepSafeConfirm
|
|
|
|
|
|
public partial class HMOperationStepSafeConfirmMap :APTEntityBaseMap<T_HM_OPERATION_STEP_SAFE_CONFIRM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_STEP_SAFE_CONFIRM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany(t=>t.Nav_SafeConfirms).HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(600);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationStepSafeMeasure
|
|
|
|
|
|
public partial class HMOperationStepSafeMeasureMap :APTEntityBaseMap<T_HM_OPERATION_STEP_SAFE_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_STEP_SAFE_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany(t=>t.Nav_SafeMeasures).HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(600);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskAnalyzeDealMeasure
|
|
|
|
|
|
public partial class HMOperationTaskAnalyzeDealMeasureMap :APTEntityBaseMap<T_HM_OPERATION_TASK_ANALYZE_DEAL_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_ANALYZE_DEAL_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskAnalyzeSafeConfirm
|
|
|
|
|
|
public partial class HMOperationTaskAnalyzeSafeConfirmMap :APTEntityBaseMap<T_HM_OPERATION_TASK_ANALYZE_SAFE_CONFIRM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_ANALYZE_SAFE_CONFIRM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskAnalyzeSafeMeasure
|
|
|
|
|
|
public partial class HMOperationTaskAnalyzeSafeMeasureMap :APTEntityBaseMap<T_HM_OPERATION_TASK_ANALYZE_SAFE_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_ANALYZE_SAFE_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDealMeasure
|
|
|
|
|
|
public partial class HMOperationTaskDealMeasureMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DEAL_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DEAL_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationLink).WithMany(t=>t.Nav_DealMeasures).HasForeignKey(t => t.OPERATION_LINK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(600);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguish
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyze
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzeMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_JobtaskIdentify).WithMany().HasForeignKey(t => t.JOBTASK_IDENTIFY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.CALLBACK_INTERFACE);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApproveDetails);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CONTEXT);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyzeDetail
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzeDetailMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DistinguishAnalyze).WithMany(t=>t.Nav_AnalyzeDetails).HasForeignKey(t => t.OPERATION_TASK_DISTINGUISH_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DistinguishAnalyzeH).WithMany().HasForeignKey(t => t.ANALYZE_H_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DistinguishAnalyzeL).WithMany().HasForeignKey(t => t.ANALYZE_L_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DistinguishAnalyzeE).WithMany().HasForeignKey(t => t.ANALYZE_E_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DistinguishAnalyzeP).WithMany().HasForeignKey(t => t.ANALYZE_P_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DistinguishAnalyzeR).WithMany().HasForeignKey(t => t.ANALYZE_R_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_WorkPermitType).WithMany().HasForeignKey(t => t.WORK_PERMIT_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyzeE
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzeEMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_E>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_E> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyzeFile
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzeFileMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DistinguishAnalyze).WithMany(t=>t.Nav_AnalyzeFiles).HasForeignKey(t => t.OPERATION_TASK_DISTINGUISH_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyzeH
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzeHMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_H>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_H> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyzeL
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzeLMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_L>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_L> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyzeP
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzePMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_P>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_P> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyzeR
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzeRMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_R>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_R> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyzeRisk
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzeRiskMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_RISK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_RISK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_AnalyzeDetails).WithMany(t=>t.Nav_DetailRisk).HasForeignKey(t => t.OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateRisk).WithMany().HasForeignKey(t => t.EVALUATE_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishAnalyzeUser
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishAnalyzeUserMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DistinguishAnalyze).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.OPERATION_TASK_DISTINGUISH_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishDetail
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishDetailMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationTaskDistinguish).WithMany(t=>t.Nav_DistinguishDetails).HasForeignKey(t => t.OPERATION_TASK_DISTINGUISH_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_LINK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Workduty).WithMany().HasForeignKey(t => t.WORKDUTY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.RISK_NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_WorkType).WithMany().HasForeignKey(t => t.WORK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishFile
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishFileMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationTaskDistinguish).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.OPERATION_TASK_DISTINGUISH_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskDistinguishUser
|
|
|
|
|
|
public partial class HMOperationTaskDistinguishUserMap :APTEntityBaseMap<T_HM_OPERATION_TASK_DISTINGUISH_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_DISTINGUISH_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationTaskDistinguish).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.OPERATION_TASK_DISTINGUISH_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskSafeConfirm
|
|
|
|
|
|
public partial class HMOperationTaskSafeConfirmMap :APTEntityBaseMap<T_HM_OPERATION_TASK_SAFE_CONFIRM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_SAFE_CONFIRM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationLink).WithMany(t=>t.Nav_SafeConfirms).HasForeignKey(t => t.OPERATION_LINK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(600);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OperationTaskSafeMeasure
|
|
|
|
|
|
public partial class HMOperationTaskSafeMeasureMap :APTEntityBaseMap<T_HM_OPERATION_TASK_SAFE_MEASURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OPERATION_TASK_SAFE_MEASURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationLink).WithMany(t=>t.Nav_SafeMeasures).HasForeignKey(t => t.OPERATION_LINK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(600);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OrdinaryAnalysisFile
|
|
|
|
|
|
public partial class HMOrdinaryAnalysisFileMap :APTEntityBaseMap<T_HM_ORDINARY_ANALYSIS_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_ORDINARY_ANALYSIS_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Details).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.ORDINARY_TASK_ANALYSIS_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OrdinaryAnalysisPerson
|
|
|
|
|
|
public partial class HMOrdinaryAnalysisPersonMap :APTEntityBaseMap<T_HM_ORDINARY_ANALYSIS_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_ORDINARY_ANALYSIS_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OrdinaryTaskAnalysis).WithMany(t=>t.Nav_OrdinaryAnalysisPerson).HasForeignKey(t => t.ORDINARY_TASK_ANALYSIS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OrdinaryTaskDetailRisk
|
|
|
|
|
|
public partial class HMOrdinaryTaskDetailRiskMap :APTEntityBaseMap<T_HM_ORDINARY_TASK_DETAIL_RISK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_ORDINARY_TASK_DETAIL_RISK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Details).WithMany(t=>t.Nav_DetailRisk).HasForeignKey(t => t.ORDINARY_TASK_ANALYSIS_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateRisk).WithMany().HasForeignKey(t => t.EVALUATE_RISK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OrdinaryTaskAnalysis
|
|
|
|
|
|
public partial class HMOrdinaryTaskAnalysisMap :APTEntityBaseMap<T_HM_ORDINARY_TASK_ANALYSIS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_ORDINARY_TASK_ANALYSIS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationAnalyze).WithMany().HasForeignKey(t => t.OPERATION_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.CALLBACK_INTERFACE);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_ApproveDetails);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CONTEXT);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OrdinaryTaskDetail
|
|
|
|
|
|
public partial class HMOrdinaryTaskDetailMap :APTEntityBaseMap<T_HM_ORDINARY_TASK_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_ORDINARY_TASK_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OrdinaryTaskAnalysis).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.ORDINARY_TASK_ANALYSIS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationStep).WithMany().HasForeignKey(t => t.OPERATION_STEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SafeConfirmsStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SafeMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DealMeasuresStr).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Area).WithMany().HasForeignKey(t => t.AREA_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region OtherApproveLog
|
|
|
|
|
|
public partial class HMOtherApproveLogMap :APTEntityBaseMap<T_HM_OTHER_APPROVE_LOG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_OTHER_APPROVE_LOG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Request
|
|
|
|
|
|
public partial class HMRequestMap :APTEntityBaseMap<T_HM_REQUEST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_REQUEST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Risksource
|
|
|
|
|
|
public partial class HMRisksourceMap :APTEntityBaseMap<T_HM_RISKSOURCE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISKSOURCE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskType
|
|
|
|
|
|
public partial class HMRiskTypeMap :APTEntityBaseMap<T_HM_RISK_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_RISK_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TaskAnalyze
|
|
|
|
|
|
public partial class HMTaskAnalyzeMap :APTEntityBaseMap<T_HM_TASK_ANALYZE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_TASK_ANALYZE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DistinguishAnalyze).WithMany().HasForeignKey(t => t.OPERATION_TASK_DISTINGUISH_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TaskAnalyzeDetail
|
|
|
|
|
|
public partial class HMTaskAnalyzeDetailMap :APTEntityBaseMap<T_HM_TASK_ANALYZE_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_TASK_ANALYZE_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TaskAnalyze).WithMany(t=>t.Nav_AnalyzeDetails).HasForeignKey(t => t.TASK_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_OperationLink).WithMany().HasForeignKey(t => t.OPERATION_LINK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TaskAnalyzeDetailFile
|
|
|
|
|
|
public partial class HMTaskAnalyzeDetailFileMap :APTEntityBaseMap<T_HM_TASK_ANALYZE_DETAIL_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_TASK_ANALYZE_DETAIL_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.FILE_NAME).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TaskAnalyzeUser
|
|
|
|
|
|
public partial class HMTaskAnalyzeUserMap :APTEntityBaseMap<T_HM_TASK_ANALYZE_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_TASK_ANALYZE_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TaskAnalyze).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.TASK_ANALYZE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region WorkPermitType
|
|
|
|
|
|
public partial class HMWorkPermitTypeMap :APTEntityBaseMap<T_HM_WORK_PERMIT_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_WORK_PERMIT_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region WorkType
|
|
|
|
|
|
public partial class HMWorkTypeMap :APTEntityBaseMap<T_HM_WORK_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_HM_WORK_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafetaskFinish
|
|
|
|
|
|
public partial class BISafetaskFinishMap :APTEntityBaseMap<T_BI_SAFETASK_FINISH>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_SAFETASK_FINISH> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Team).WithMany().HasForeignKey(t => t.TEAM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TEAM_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TEAM_CHARGE_USER).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ActiveUserRecord
|
|
|
|
|
|
public partial class BIActiveUserRecordMap :APTEntityBaseMap<T_BI_ACTIVE_USER_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_ACTIVE_USER_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region LoginRecord
|
|
|
|
|
|
public partial class BILoginRecordMap :APTEntityBaseMap<T_BI_LOGIN_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_LOGIN_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.VERSION).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.FROM).HasMaxLength(10);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Bschecktype
|
|
|
|
|
|
public partial class BIBschecktypeMap :APTEntityBaseMap<T_BI_BSCHECKTYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_BSCHECKTYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.name).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.value).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region BschecktypeYear
|
|
|
|
|
|
public partial class BIBschecktypeYearMap :APTEntityBaseMap<T_BI_BSCHECKTYPE_YEAR>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_BSCHECKTYPE_YEAR> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Ignore(t => t.YEARMONTH);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region BsriskInfo
|
|
|
|
|
|
public partial class BIBsriskInfoMap :APTEntityBaseMap<T_BI_BSRISK_INFO>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_BSRISK_INFO> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Bssafecheck
|
|
|
|
|
|
public partial class BIBssafecheckMap :APTEntityBaseMap<T_BI_BSSAFECHECK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_BSSAFECHECK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.TEAMNAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.PERCENTCHECK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region BssafechecktypeYear
|
|
|
|
|
|
public partial class BIBssafechecktypeYearMap :APTEntityBaseMap<T_BI_BSSAFECHECKTYPE_YEAR>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_BSSAFECHECKTYPE_YEAR> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region BssafecheckYear
|
|
|
|
|
|
public partial class BIBssafecheckYearMap :APTEntityBaseMap<T_BI_BSSAFECHECK_YEAR>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_BSSAFECHECK_YEAR> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CloseTasks
|
|
|
|
|
|
public partial class BICloseTasksMap :APTEntityBaseMap<T_BI_CLOSE_TASKS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_CLOSE_TASKS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.USER_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TASK_IDS).HasMaxLength(5000);
|
|
|
|
|
|
builder.Property(t => t.TASK_NAMES).HasMaxLength(5000);
|
|
|
|
|
|
builder.Property(t => t.AUDIT_USER_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.OPINION).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentMonthRun
|
|
|
|
|
|
public partial class BIDepartmentMonthRunMap :APTEntityBaseMap<T_BI_DEPARTMENT_MONTH_RUN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_DEPARTMENT_MONTH_RUN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.MONTHStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.FINISH_RATE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NORMAL_FINISH_RATE).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.TOTAL_QTY);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FormCheckItem
|
|
|
|
|
|
public partial class BIFormCheckItemMap :APTEntityBaseMap<T_BI_FORM_CHECK_ITEM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_FORM_CHECK_ITEM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.FORM_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.TABLE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.TITLE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.STATUS_FIELD).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FormRunAnalysis
|
|
|
|
|
|
public partial class BIFormRunAnalysisMap :APTEntityBaseMap<T_BI_FORM_RUN_ANALYSIS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_FORM_RUN_ANALYSIS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.MOUDLE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.FORM_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.FINISH_RATE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NORMAL_FINISH_RATE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HomeBsriskreason
|
|
|
|
|
|
public partial class BIHomeBsriskreasonMap :APTEntityBaseMap<T_BI_HOME_BSRISKREASON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_HOME_BSRISKREASON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Ignore(t => t.CODE);
|
|
|
|
|
|
builder.Ignore(t => t.DEPARTMENTNAME);
|
|
|
|
|
|
builder.Ignore(t => t.SOURCENAME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HriskchangePec
|
|
|
|
|
|
public partial class BIHriskchangePecMap :APTEntityBaseMap<T_BI_HRISKCHANGE_PEC>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_HRISKCHANGE_PEC> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.YEARMONTH).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.CHANGE_PERCENT_SHOW).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HriskCount
|
|
|
|
|
|
public partial class BIHriskCountMap :APTEntityBaseMap<T_BI_HRISK_COUNT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_HRISK_COUNT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HriskTop
|
|
|
|
|
|
public partial class BIHriskTopMap :APTEntityBaseMap<T_BI_HRISK_TOP>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_HRISK_TOP> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.CHECKCONTENT).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobProfile
|
|
|
|
|
|
public partial class BIJobProfileMap :APTEntityBaseMap<T_BI_JOB_PROFILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_JOB_PROFILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DepName).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.JobName).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MouldRunSummary
|
|
|
|
|
|
public partial class BIMouldRunSummaryMap :APTEntityBaseMap<T_BI_MOULD_RUN_SUMMARY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_MOULD_RUN_SUMMARY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.MOUDLE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.FINISH_RATE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NORMAL_FINISH_RATE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region NotificationTask
|
|
|
|
|
|
public partial class BINotificationTaskMap :APTEntityBaseMap<T_BI_NOTIFICATION_TASK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_NOTIFICATION_TASK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.MOUDLE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.SOURCE_FORMCODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NOTICE_TITLE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region NotificationTaskNew
|
|
|
|
|
|
public partial class BINotificationTaskNewMap :APTEntityBaseMap<T_BI_NOTIFICATION_TASK_NEW>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_NOTIFICATION_TASK_NEW> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.NOTICE_TITLE).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.USER_NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.SOURCE_FORMCODE).HasMaxLength(20);
|
|
|
|
|
|
builder.HasIndex("SOURCE_DATA_ID");
|
|
|
|
|
|
builder.Property(t => t.MOUDLE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.TABLE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.OVER_TIME);
|
|
|
|
|
|
builder.Ignore(t => t.DEPARTMENT_ID);
|
|
|
|
|
|
builder.Ignore(t => t.DEPARTMENT_NAME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskLevel1
|
|
|
|
|
|
public partial class BIRiskLevel1Map :APTEntityBaseMap<T_BI_RISK_LEVEL1>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_RISK_LEVEL1> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DepName).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskLevel2
|
|
|
|
|
|
public partial class BIRiskLevel2Map :APTEntityBaseMap<T_BI_RISK_LEVEL2>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_RISK_LEVEL2> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DepName).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ParentDepartment).WithMany().HasForeignKey(t => t.PARENT_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Runlog
|
|
|
|
|
|
public partial class BIRunlogMap :APTEntityBaseMap<T_BI_RUNLOG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_RUNLOG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Summary
|
|
|
|
|
|
public partial class BISummaryMap :APTEntityBaseMap<T_BI_SUMMARY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_SUMMARY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter1).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter2).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter3).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter4).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter5).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter6).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter7).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter8).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter9).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.Parameter10).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SystemRunSummary
|
|
|
|
|
|
public partial class BISystemRunSummaryMap :APTEntityBaseMap<T_BI_SYSTEM_RUN_SUMMARY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_SYSTEM_RUN_SUMMARY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.FINISH_RATE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NORMAL_FINISH_RATE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainPlanCount
|
|
|
|
|
|
public partial class BITrainPlanCountMap :APTEntityBaseMap<T_BI_TRAIN_PLAN_COUNT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BI_TRAIN_PLAN_COUNT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DepName).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region AbilityEvaluate
|
|
|
|
|
|
public partial class CMAbilityEvaluateMap :APTEntityBaseMap<T_CM_ABILITY_EVALUATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_ABILITY_EVALUATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.OVERALL_EVALUATE_CONCLUSION).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region AbilityEvaluateProject
|
|
|
|
|
|
public partial class CMAbilityEvaluateProjectMap :APTEntityBaseMap<T_CM_ABILITY_EVALUATE_PROJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_ABILITY_EVALUATE_PROJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Evaluate).WithMany(t=>t.Nav_ListProject).HasForeignKey(t => t.EVALUATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EvaluateProject).WithMany().HasForeignKey(t => t.PROJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region AbilityEvaluateUser
|
|
|
|
|
|
public partial class CMAbilityEvaluateUserMap :APTEntityBaseMap<T_CM_ABILITY_EVALUATE_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_ABILITY_EVALUATE_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_AbilityEvaluate).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.ABILITY_EVALUATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region AbilityProject
|
|
|
|
|
|
public partial class CMAbilityProjectMap :APTEntityBaseMap<T_CM_ABILITY_PROJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_ABILITY_PROJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.EVALUATE_CONTENT).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Config
|
|
|
|
|
|
public partial class CMConfigMap :APTEntityBaseMap<T_CM_CONFIG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_CONFIG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ContingencyType
|
|
|
|
|
|
public partial class CMContingencyTypeMap :APTEntityBaseMap<T_CM_CONTINGENCY_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_CONTINGENCY_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CoverageInfluence
|
|
|
|
|
|
public partial class CMCoverageInfluenceMap :APTEntityBaseMap<T_CM_COVERAGE_INFLUENCE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_COVERAGE_INFLUENCE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillEstimate
|
|
|
|
|
|
public partial class CMDrillEstimateMap :APTEntityBaseMap<T_CM_DRILL_ESTIMATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_ESTIMATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany().HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.ADVISE).HasMaxLength(300);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillEstimateItemType
|
|
|
|
|
|
public partial class CMDrillEstimateItemTypeMap :APTEntityBaseMap<T_CM_DRILL_ESTIMATE_ITEM_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_ESTIMATE_ITEM_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillEstimateRecord
|
|
|
|
|
|
public partial class CMDrillEstimateRecordMap :APTEntityBaseMap<T_CM_DRILL_ESTIMATE_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_ESTIMATE_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Estimate).WithMany(t=>t.Nav_ListEstimateRecord).HasForeignKey(t => t.ESTIMEATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Item).WithMany().HasForeignKey(t => t.ITEM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.ADVISE).HasMaxLength(300);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillName
|
|
|
|
|
|
public partial class CMDrillNameMap :APTEntityBaseMap<T_CM_DRILL_NAME>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_NAME> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillPlan
|
|
|
|
|
|
public partial class CMDrillPlanMap :APTEntityBaseMap<T_CM_DRILL_PLAN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_PLAN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillPlanDetail
|
|
|
|
|
|
public partial class CMDrillPlanDetailMap :APTEntityBaseMap<T_CM_DRILL_PLAN_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_PLAN_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PLAN).WithMany(t=>t.Nav_listPlanDetail).HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Name).WithMany().HasForeignKey(t => t.NAME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillPlanStandardCreate
|
|
|
|
|
|
public partial class CMDrillPlanStandardCreateMap :APTEntityBaseMap<T_CM_DRILL_PLAN_STANDARD_CREATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_PLAN_STANDARD_CREATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_StandardCreate).WithMany().HasForeignKey(t => t.STANDARD_CREATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillRecord
|
|
|
|
|
|
public partial class CMDrillRecordMap :APTEntityBaseMap<T_CM_DRILL_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PlanDetail).WithMany().HasForeignKey(t => t.PLAN_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Name).WithMany().HasForeignKey(t => t.NAME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TIME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.PLACE).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserRecord).WithMany().HasForeignKey(t => t.USER_ID_RECORD).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserManage).WithMany().HasForeignKey(t => t.USER_ID_MANAGE).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CONTENT).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_OUT).HasMaxLength(800);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillRecordDepartment
|
|
|
|
|
|
public partial class CMDrillRecordDepartmentMap :APTEntityBaseMap<T_CM_DRILL_RECORD_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_RECORD_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_ListDepartment).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillRecordFile
|
|
|
|
|
|
public partial class CMDrillRecordFileMap :APTEntityBaseMap<T_CM_DRILL_RECORD_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_RECORD_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_FilesRecord).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillRecordStanderFile
|
|
|
|
|
|
public partial class CMDrillRecordStanderFileMap :APTEntityBaseMap<T_CM_DRILL_RECORD_STANDER_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_RECORD_STANDER_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_FilesStander).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillRecordSummaryFile
|
|
|
|
|
|
public partial class CMDrillRecordSummaryFileMap :APTEntityBaseMap<T_CM_DRILL_RECORD_SUMMARY_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_RECORD_SUMMARY_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_FilesSummary).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillRecordUserEstimate
|
|
|
|
|
|
public partial class CMDrillRecordUserEstimateMap :APTEntityBaseMap<T_CM_DRILL_RECORD_USER_ESTIMATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_RECORD_USER_ESTIMATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_ListUserEstimate).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillSummaryRequirement
|
|
|
|
|
|
public partial class CMDrillSummaryRequirementMap :APTEntityBaseMap<T_CM_DRILL_SUMMARY_REQUIREMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_SUMMARY_REQUIREMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_ListSummaryRequirement).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TypeRequirement).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DrillSummaryRequirementType
|
|
|
|
|
|
public partial class CMDrillSummaryRequirementTypeMap :APTEntityBaseMap<T_CM_DRILL_SUMMARY_REQUIREMENT_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_DRILL_SUMMARY_REQUIREMENT_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EquipmentDemandSurvey
|
|
|
|
|
|
public partial class CMEquipmentDemandSurveyMap :APTEntityBaseMap<T_CM_EQUIPMENT_DEMAND_SURVEY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_EQUIPMENT_DEMAND_SURVEY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.START_TIME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.END_TIME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EquipmentDemandSurveyDetail
|
|
|
|
|
|
public partial class CMEquipmentDemandSurveyDetailMap :APTEntityBaseMap<T_CM_EQUIPMENT_DEMAND_SURVEY_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_EQUIPMENT_DEMAND_SURVEY_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EQDSurvey).WithMany(t=>t.Nav_ListDetail).HasForeignKey(t => t.DEMAND_SURVEY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SurveyMaster).WithMany(t=>t.Nav_ListDetail).HasForeignKey(t => t.SURVEY_MASTER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MaterialType).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MaterialLibrary).WithMany().HasForeignKey(t => t.LIBRARY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.MATERIAL_NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.MATERIAL_LOCATION).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.SPECIFICATION).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.UNIT).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.PURPOSE).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EquipmentDemandSurveyFile
|
|
|
|
|
|
public partial class CMEquipmentDemandSurveyFileMap :APTEntityBaseMap<T_CM_EQUIPMENT_DEMAND_SURVEY_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_EQUIPMENT_DEMAND_SURVEY_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EQDSurvey).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.DEMAND_SURVEY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EquipmentDemandSurveyMaster
|
|
|
|
|
|
public partial class CMEquipmentDemandSurveyMasterMap :APTEntityBaseMap<T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.START_TIME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.END_TIME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EquipmentDemandSurveyMasterFile
|
|
|
|
|
|
public partial class CMEquipmentDemandSurveyMasterFileMap :APTEntityBaseMap<T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_EQUIPMENT_DEMAND_SURVEY_MASTER_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_SurveyMaster).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.SURVEY_MASTER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EventType
|
|
|
|
|
|
public partial class CMEventTypeMap :APTEntityBaseMap<T_CM_EVENT_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_EVENT_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MaterialLibrary
|
|
|
|
|
|
public partial class CMMaterialLibraryMap :APTEntityBaseMap<T_CM_MATERIAL_LIBRARY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_MATERIAL_LIBRARY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MaterialType).WithMany().HasForeignKey(t => t.MATERIAL_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.INTERNAL_NO).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.SPECIFICATION).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.UNIT).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.LOCATION).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.PURPOSE).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARMTNET_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.MAIN_TEC_PARAMS).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MaterialLibraryFile
|
|
|
|
|
|
public partial class CMMaterialLibraryFileMap :APTEntityBaseMap<T_CM_MATERIAL_LIBRARY_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_MATERIAL_LIBRARY_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MaterialLibrary).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.MATERIAL_LIBRARY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MaterialType
|
|
|
|
|
|
public partial class CMMaterialTypeMap :APTEntityBaseMap<T_CM_MATERIAL_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_MATERIAL_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RspEstimate
|
|
|
|
|
|
public partial class CMRspEstimateMap :APTEntityBaseMap<T_CM_RSP_ESTIMATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_RSP_ESTIMATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.EVENT_NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.ACCIDENT_PLACE).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserReport).WithMany().HasForeignKey(t => t.USER_ID_REPORT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentReport).WithMany().HasForeignKey(t => t.DEPARTMENT_ID_REPORT).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DESC).HasMaxLength(1000);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserManage).WithMany().HasForeignKey(t => t.USER_ID_MANAGE).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.JoinDepartment).HasMaxLength(400);
|
|
|
|
|
|
builder.Property(t => t.RUN_SITUATION).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.RESTORE_SITUATION).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.ADVISE).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.CONCLUSION).HasMaxLength(1000);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RspEstimateCondition
|
|
|
|
|
|
public partial class CMRspEstimateConditionMap :APTEntityBaseMap<T_CM_RSP_ESTIMATE_CONDITION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_RSP_ESTIMATE_CONDITION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(300);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RspEstimateConditions
|
|
|
|
|
|
public partial class CMRspEstimateConditionsMap :APTEntityBaseMap<T_CM_RSP_ESTIMATE_CONDITIONS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_RSP_ESTIMATE_CONDITIONS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RspEstimate).WithMany(t=>t.Nav_ListRspConditions).HasForeignKey(t => t.ESTIMATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RspEstimateCondition).WithMany().HasForeignKey(t => t.CONDITION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RspEstimateEstimateUser
|
|
|
|
|
|
public partial class CMRspEstimateEstimateUserMap :APTEntityBaseMap<T_CM_RSP_ESTIMATE_ESTIMATE_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_RSP_ESTIMATE_ESTIMATE_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RspEstimate).WithMany(t=>t.Nav_ListEstimate).HasForeignKey(t => t.ESTIMATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RspEstimateEventKind
|
|
|
|
|
|
public partial class CMRspEstimateEventKindMap :APTEntityBaseMap<T_CM_RSP_ESTIMATE_EVENT_KIND>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_RSP_ESTIMATE_EVENT_KIND> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RspEstimate).WithMany(t=>t.Nav_ListEventKind).HasForeignKey(t => t.ESTIMATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RspEstimateJoinUser
|
|
|
|
|
|
public partial class CMRspEstimateJoinUserMap :APTEntityBaseMap<T_CM_RSP_ESTIMATE_JOIN_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_RSP_ESTIMATE_JOIN_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RspEstimate).WithMany(t=>t.Nav_ListJoin).HasForeignKey(t => t.ESTIMATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UrgentArearInfluence
|
|
|
|
|
|
public partial class CMUrgentArearInfluenceMap :APTEntityBaseMap<T_CM_URGENT_AREAR_INFLUENCE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_URGENT_AREAR_INFLUENCE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UrgentEvent).WithMany(t=>t.Nav_ListArearInfluence).HasForeignKey(t => t.URGENT_EVENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CoverageInfluence).WithMany().HasForeignKey(t => t.COVERAGE_INFLUENCE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UrgentEvent
|
|
|
|
|
|
public partial class CMUrgentEventMap :APTEntityBaseMap<T_CM_URGENT_EVENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_URGENT_EVENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EventType).WithMany().HasForeignKey(t => t.EVENT_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.AREARINFLUENCE);
|
|
|
|
|
|
builder.Property(t => t.AREAR_INFLUENCE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS_INFLUENCE).HasMaxLength(300);
|
|
|
|
|
|
builder.Property(t => t.ACCIDENT_CONSEQUENCE).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.RISKTYPE);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UrgentEventContingencyPlan
|
|
|
|
|
|
public partial class CMUrgentEventContingencyPlanMap :APTEntityBaseMap<T_CM_URGENT_EVENT_CONTINGENCY_PLAN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_URGENT_EVENT_CONTINGENCY_PLAN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UrgentEvent).WithMany(t=>t.Nav_ListEventContingencyPlan).HasForeignKey(t => t.URGENT_EVENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ContingencyType).WithMany().HasForeignKey(t => t.CONTINGENCY_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UrgentEventRiskType
|
|
|
|
|
|
public partial class CMUrgentEventRiskTypeMap :APTEntityBaseMap<T_CM_URGENT_EVENT_RISK_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_CM_URGENT_EVENT_RISK_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UrgentEvent).WithMany(t=>t.Nav_ListEventRiskType).HasForeignKey(t => t.URGENT_EVENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RiskType).WithMany().HasForeignKey(t => t.RISK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtConfig
|
|
|
|
|
|
public partial class SCMtConfigMap :APTEntityBaseMap<T_SC_MT_CONFIG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_CONFIG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtContent
|
|
|
|
|
|
public partial class SCMtContentMap :APTEntityBaseMap<T_SC_MT_CONTENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_CONTENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ContentName).WithMany(t=>t.Nav_ListContent).HasForeignKey(t => t.CONTENTNAME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TITLE).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtContentDeal
|
|
|
|
|
|
public partial class SCMtContentDealMap :APTEntityBaseMap<T_SC_MT_CONTENT_DEAL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_CONTENT_DEAL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Content).WithMany(t=>t.Nav_ListContentDeal).HasForeignKey(t => t.CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CONTENTDETAIL).HasMaxLength(300);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtContentName
|
|
|
|
|
|
public partial class SCMtContentNameMap :APTEntityBaseMap<T_SC_MT_CONTENT_NAME>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_CONTENT_NAME> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeeting
|
|
|
|
|
|
public partial class SCMtMeetingMap :APTEntityBaseMap<T_SC_MT_MEETING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Ignore(t => t.MEETINGTYPESHOW);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User_Originator).WithMany().HasForeignKey(t => t.USER_ID_ORIGINATOR).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.THEME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserHost).WithMany().HasForeignKey(t => t.USER_ID_HOST).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserRecorder).WithMany().HasForeignKey(t => t.USER_ID_RECORDER).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CONTENT).HasMaxLength(2000);
|
|
|
|
|
|
builder.Property(t => t.RECORD).HasMaxLength(2000);
|
|
|
|
|
|
builder.Ignore(t => t.STATUSSHOW);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Enums).WithMany().HasForeignKey(t => t.CheckLevel_ENUMS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.Ignore(t => t.CONTENT32);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingBegin
|
|
|
|
|
|
public partial class SCMtMeetingBeginMap :APTEntityBaseMap<T_SC_MT_MEETING_BEGIN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_BEGIN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.TABLENAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingContent
|
|
|
|
|
|
public partial class SCMtMeetingContentMap :APTEntityBaseMap<T_SC_MT_MEETING_CONTENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_CONTENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany(t=>t.Nav_ListMeetingContent).HasForeignKey(t => t.MEETING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ContentName).WithMany().HasForeignKey(t => t.CONTENTNAME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingEnd
|
|
|
|
|
|
public partial class SCMtMeetingEndMap :APTEntityBaseMap<T_SC_MT_MEETING_END>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_END> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingFile
|
|
|
|
|
|
public partial class SCMtMeetingFileMap :APTEntityBaseMap<T_SC_MT_MEETING_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.MEETING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingFileOfficialseal
|
|
|
|
|
|
public partial class SCMtMeetingFileOfficialsealMap :APTEntityBaseMap<T_SC_MT_MEETING_FILE_OFFICIALSEAL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_FILE_OFFICIALSEAL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany(t=>t.Nav_FilesOfficialseal).HasForeignKey(t => t.MEETING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingFileRecord
|
|
|
|
|
|
public partial class SCMtMeetingFileRecordMap :APTEntityBaseMap<T_SC_MT_MEETING_FILE_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_FILE_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany(t=>t.Nav_FilesRecord).HasForeignKey(t => t.MEETING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingMinutes
|
|
|
|
|
|
public partial class SCMtMeetingMinutesMap :APTEntityBaseMap<T_SC_MT_MEETING_MINUTES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_MINUTES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany().HasForeignKey(t => t.MEETING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.RESOLUTION).HasMaxLength(3000);
|
|
|
|
|
|
builder.Property(t => t.MEETINGRECORD).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.STATUSSHOW);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingMinutesContent
|
|
|
|
|
|
public partial class SCMtMeetingMinutesContentMap :APTEntityBaseMap<T_SC_MT_MEETING_MINUTES_CONTENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_MINUTES_CONTENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MeetingMinutes).WithMany(t=>t.Nav_ListContent).HasForeignKey(t => t.MEETING_MINUTES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Content).WithMany().HasForeignKey(t => t.CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingMinutesContentDeal
|
|
|
|
|
|
public partial class SCMtMeetingMinutesContentDealMap :APTEntityBaseMap<T_SC_MT_MEETING_MINUTES_CONTENT_DEAL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_MINUTES_CONTENT_DEAL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Content).WithMany(t=>t.Nav_ListContentDeal).HasForeignKey(t => t.CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ContentDeal).WithMany().HasForeignKey(t => t.CONTENT_DEAL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingMinutesDetail
|
|
|
|
|
|
public partial class SCMtMeetingMinutesDetailMap :APTEntityBaseMap<T_SC_MT_MEETING_MINUTES_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_MINUTES_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MeetingMinutes).WithMany(t=>t.Nav_ListMinutesDetail).HasForeignKey(t => t.MEETING_MINUTES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.RESOLUTION).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentDeal).WithMany().HasForeignKey(t => t.DEAL_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserDeal).WithMany().HasForeignKey(t => t.DEAL_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.OPINION).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEALBACK).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.DEALEFFECTSHOW);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingMinutesDetailFile
|
|
|
|
|
|
public partial class SCMtMeetingMinutesDetailFileMap :APTEntityBaseMap<T_SC_MT_MEETING_MINUTES_DETAIL_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_MINUTES_DETAIL_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MeetingMinutesDetail).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.MEETING_MINUTES_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingMinutesFile
|
|
|
|
|
|
public partial class SCMtMeetingMinutesFileMap :APTEntityBaseMap<T_SC_MT_MEETING_MINUTES_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_MINUTES_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MeetingMinutes).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.MEETING_MINUTES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingPabsence
|
|
|
|
|
|
public partial class SCMtMeetingPabsenceMap :APTEntityBaseMap<T_SC_MT_MEETING_PABSENCE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_PABSENCE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MeetingMinutes).WithMany(t=>t.Nav_ListPAbsence).HasForeignKey(t => t.MEETING_MINUTES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingPall
|
|
|
|
|
|
public partial class SCMtMeetingPallMap :APTEntityBaseMap<T_SC_MT_MEETING_PALL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_PALL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany(t=>t.Nav_ListPAll).HasForeignKey(t => t.MEETING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NOTJOINREASON).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.NAME);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingPaskforleave
|
|
|
|
|
|
public partial class SCMtMeetingPaskforleaveMap :APTEntityBaseMap<T_SC_MT_MEETING_PASKFORLEAVE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_PASKFORLEAVE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MeetingMinutes).WithMany(t=>t.Nav_ListPAskForLeave).HasForeignKey(t => t.MEETING_MINUTES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingPjoin
|
|
|
|
|
|
public partial class SCMtMeetingPjoinMap :APTEntityBaseMap<T_SC_MT_MEETING_PJOIN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_PJOIN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MeetingMinutes).WithMany(t=>t.Nav_ListPJoin).HasForeignKey(t => t.MEETING_MINUTES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingPreview
|
|
|
|
|
|
public partial class SCMtMeetingPreviewMap :APTEntityBaseMap<T_SC_MT_MEETING_PREVIEW>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_PREVIEW> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany(t=>t.Nav_ListPReView).HasForeignKey(t => t.MEETING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NOTJOINREASON).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingTheme
|
|
|
|
|
|
public partial class SCMtMeetingThemeMap :APTEntityBaseMap<T_SC_MT_MEETING_THEME>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_THEME> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMeetingThemes
|
|
|
|
|
|
public partial class SCMtMeetingThemesMap :APTEntityBaseMap<T_SC_MT_MEETING_THEMES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MEETING_THEMES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Meeting).WithMany(t=>t.Nav_ListThemes).HasForeignKey(t => t.MEETING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MeetingTheme).WithMany().HasForeignKey(t => t.THEME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtMinutesPreview
|
|
|
|
|
|
public partial class SCMtMinutesPreviewMap :APTEntityBaseMap<T_SC_MT_MINUTES_PREVIEW>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_MINUTES_PREVIEW> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MeetingMinutes).WithMany(t=>t.Nav_ListPReview).HasForeignKey(t => t.MEETING_MINUTES_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtPlanSet
|
|
|
|
|
|
public partial class SCMtPlanSetMap :APTEntityBaseMap<T_SC_MT_PLAN_SET>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_PLAN_SET> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ContentName).WithMany().HasForeignKey(t => t.CONTENTNAME_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveRole).WithMany().HasForeignKey(t => t.APPROVE_ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.RUNDATA).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MtPlanSetDepartment
|
|
|
|
|
|
public partial class SCMtPlanSetDepartmentMap :APTEntityBaseMap<T_SC_MT_PLAN_SET_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_MT_PLAN_SET_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PlanSet).WithMany(t=>t.Nav_ListSetDepartment).HasForeignKey(t => t.PLAN_SET_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Agency
|
|
|
|
|
|
public partial class OGAgencyMap :TreeEntityBaseMap<T_OG_AGENCY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_AGENCY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region AgencyUser
|
|
|
|
|
|
public partial class OGAgencyUserMap :APTEntityBaseMap<T_OG_AGENCY_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_AGENCY_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Agency).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.AGENCY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Related
|
|
|
|
|
|
public partial class OGRelatedMap :APTEntityBaseMap<T_OG_RELATED>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.CONTACT).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.CONTACT_INFO).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CONTENT).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.RISK).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedAgreement
|
|
|
|
|
|
public partial class OGRelatedAgreementMap :APTEntityBaseMap<T_OG_RELATED_AGREEMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_AGREEMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Related).WithMany(t=>t.Nav_Agreements).HasForeignKey(t => t.RELATED_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.AMOUNT).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedAgreementFile
|
|
|
|
|
|
public partial class OGRelatedAgreementFileMap :APTEntityBaseMap<T_OG_RELATED_AGREEMENT_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_AGREEMENT_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Agreement).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.AGREEMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedQualification
|
|
|
|
|
|
public partial class OGRelatedQualificationMap :APTEntityBaseMap<T_OG_RELATED_QUALIFICATION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_QUALIFICATION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Related).WithMany(t=>t.Nav_Qualifications).HasForeignKey(t => t.RELATED_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Level).WithMany().HasForeignKey(t => t.LEVEL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedQualificationDetail
|
|
|
|
|
|
public partial class OGRelatedQualificationDetailMap :APTEntityBaseMap<T_OG_RELATED_QUALIFICATION_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_QUALIFICATION_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Qualification).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.QUALIFICATION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Item).WithMany().HasForeignKey(t => t.ITEM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.BUSINESS_SCOPE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedQualificationDetailFile
|
|
|
|
|
|
public partial class OGRelatedQualificationDetailFileMap :APTEntityBaseMap<T_OG_RELATED_QUALIFICATION_DETAIL_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_QUALIFICATION_DETAIL_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Detail).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedUser
|
|
|
|
|
|
public partial class OGRelatedUserMap :APTEntityBaseMap<T_OG_RELATED_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Related).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.RELATED_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Type).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CERTIFICATE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CERTIFICATE_NUMBER).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedUserHealth
|
|
|
|
|
|
public partial class OGRelatedUserHealthMap :APTEntityBaseMap<T_OG_RELATED_USER_HEALTH>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_USER_HEALTH> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RelatedUser).WithMany(t=>t.Nav_Healths).HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedUserSign
|
|
|
|
|
|
public partial class OGRelatedUserSignMap :APTEntityBaseMap<T_OG_RELATED_USER_SIGN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_USER_SIGN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RelatedUser).WithMany(t=>t.Nav_Signs).HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedUserInsurance
|
|
|
|
|
|
public partial class OGRelatedUserInsuranceMap :APTEntityBaseMap<T_OG_RELATED_USER_INSURANCE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_USER_INSURANCE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RelatedUser).WithMany(t=>t.Nav_Insurances).HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedEstimate
|
|
|
|
|
|
public partial class OGRelatedEstimateMap :APTEntityBaseMap<T_OG_RELATED_ESTIMATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_ESTIMATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Related).WithMany().HasForeignKey(t => t.RELATED_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedEstimateDetail
|
|
|
|
|
|
public partial class OGRelatedEstimateDetailMap :APTEntityBaseMap<T_OG_RELATED_ESTIMATE_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_ESTIMATE_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Estimate).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.ESTIMATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Item).WithMany().HasForeignKey(t => t.ITEM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ExternalContactDetail
|
|
|
|
|
|
public partial class OGExternalContactDetailMap :APTEntityBaseMap<T_OG_EXTERNAL_CONTACT_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_EXTERNAL_CONTACT_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.PERSON).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.PHONE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.CONTACT_MATTER).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedQualificationDetailItem
|
|
|
|
|
|
public partial class OGRelatedQualificationDetailItemMap :APTEntityBaseMap<T_OG_RELATED_QUALIFICATION_DETAIL_ITEM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_QUALIFICATION_DETAIL_ITEM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ApproveRewardPunishmentReason
|
|
|
|
|
|
public partial class OGApproveRewardPunishmentReasonMap :APTEntityBaseMap<T_OG_APPROVE_REWARD_PUNISHMENT_REASON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_APPROVE_REWARD_PUNISHMENT_REASON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedEstimateItem
|
|
|
|
|
|
public partial class OGRelatedEstimateItemMap :APTEntityBaseMap<T_OG_RELATED_ESTIMATE_ITEM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_ESTIMATE_ITEM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedQualificationLevel
|
|
|
|
|
|
public partial class OGRelatedQualificationLevelMap :APTEntityBaseMap<T_OG_RELATED_QUALIFICATION_LEVEL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_QUALIFICATION_LEVEL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasIndex("TYPE", "NAME").IsUnique();
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RelatedUserType
|
|
|
|
|
|
public partial class OGRelatedUserTypeMap :APTEntityBaseMap<T_OG_RELATED_USER_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OG_RELATED_USER_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TimeSet
|
|
|
|
|
|
public partial class PTTimeSetMap :APTEntityBaseMap<T_PT_TIME_SET>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PT_TIME_SET> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Post
|
|
|
|
|
|
public partial class SCPostMap :APTEntityBaseMap<T_SC_POST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_POST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Depost).WithMany().HasForeignKey(t => t.DEPOST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PostDepost
|
|
|
|
|
|
public partial class SCPostDepostMap :APTEntityBaseMap<T_SC_POST_DEPOST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_POST_DEPOST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany(t=>t.Nav_Posts).HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Depost).WithMany().HasForeignKey(t => t.DEPOST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PostSafePdtTemplateFile
|
|
|
|
|
|
public partial class SCPostSafePdtTemplateFileMap :APTEntityBaseMap<T_SC_POST_SAFE_PDT_TEMPLATE_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_POST_SAFE_PDT_TEMPLATE_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_File).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Department
|
|
|
|
|
|
public partial class SCDepartmentMap :APTEntityBaseMap<T_SC_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany(t=>t.Nav_Depts).HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentPost
|
|
|
|
|
|
public partial class SCDepartmentPostMap :APTEntityBaseMap<T_SC_DEPARTMENT_POST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_DEPARTMENT_POST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Dept).WithMany(t=>t.Nav_Posts).HasForeignKey(t => t.DEPT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Depost).WithMany().HasForeignKey(t => t.DEPOST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DocumentLibrary
|
|
|
|
|
|
public partial class SCDocumentLibraryMap :APTEntityBaseMap<T_SC_DOCUMENT_LIBRARY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_DOCUMENT_LIBRARY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.MODULE).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.FORM).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.FILE_NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.VALUE_FIELD).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.FILE_TYPE).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DocumentLibraryDetail
|
|
|
|
|
|
public partial class SCDocumentLibraryDetailMap :APTEntityBaseMap<T_SC_DOCUMENT_LIBRARY_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_DOCUMENT_LIBRARY_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Library).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.DOCUMENT_LIBRARY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.YEAR).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DocumentLibraryDetailFile
|
|
|
|
|
|
public partial class SCDocumentLibraryDetailFileMap :APTEntityBaseMap<T_SC_DOCUMENT_LIBRARY_DETAIL_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_DOCUMENT_LIBRARY_DETAIL_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Library).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.DOCUMENT_LIBRARY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region StandardCreate
|
|
|
|
|
|
public partial class SCStandardCreateMap :APTEntityBaseMap<T_SC_STANDARD_CREATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_STANDARD_CREATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.UNIT).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.REASON).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.PROFILE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.FORMULATE).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Property(t => t.NOTE).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.Nav_Details);
|
|
|
|
|
|
builder.Ignore(t => t.VERSION_NAME);
|
|
|
|
|
|
builder.Property(t => t.FILE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.FILE_CONTENT).HasMaxLength(5000);
|
|
|
|
|
|
builder.Property(t => t.LAW_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region StandardCreateFile
|
|
|
|
|
|
public partial class SCStandardCreateFileMap :APTEntityBaseMap<T_SC_STANDARD_CREATE_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SC_STANDARD_CREATE_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Standard).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.STANDARD_CREATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeSurvey
|
|
|
|
|
|
public partial class SESafeSurveyMap :APTEntityBaseMap<T_SE_SAFE_SURVEY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_SAFE_SURVEY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(300);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchDepartment).WithMany().HasForeignKey(t => t.LAUNCH_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchUser).WithMany().HasForeignKey(t => t.LAUNCH_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SAFE_USER_IDS).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeSurveyListDepartment
|
|
|
|
|
|
public partial class SESafeSurveyListDepartmentMap :APTEntityBaseMap<T_SE_SAFE_SURVEY_LIST_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_SAFE_SURVEY_LIST_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Safe).WithMany(t=>t.Nav_JoinDepartment).HasForeignKey(t => t.SAFE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeSurveyListFile
|
|
|
|
|
|
public partial class SESafeSurveyListFileMap :APTEntityBaseMap<T_SE_SAFE_SURVEY_LIST_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_SAFE_SURVEY_LIST_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Safe).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.SAFE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeSurveyListPaper
|
|
|
|
|
|
public partial class SESafeSurveyListPaperMap :APTEntityBaseMap<T_SE_SAFE_SURVEY_LIST_PAPER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_SAFE_SURVEY_LIST_PAPER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Safe).WithMany(t=>t.Nav_Papers).HasForeignKey(t => t.SAFE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Test).WithMany().HasForeignKey(t => t.TEST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SafeSurveyListPoint
|
|
|
|
|
|
public partial class SESafeSurveyListPointMap :APTEntityBaseMap<T_SE_SAFE_SURVEY_LIST_POINT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_SAFE_SURVEY_LIST_POINT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Safe).WithMany(t=>t.Nav_Points).HasForeignKey(t => t.SAFE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Point).WithMany().HasForeignKey(t => t.POINT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainSurvey
|
|
|
|
|
|
public partial class SETrainSurveyMap :APTEntityBaseMap<T_SE_TRAIN_SURVEY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_SURVEY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchDepartment).WithMany().HasForeignKey(t => t.LAUNCH_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchUser).WithMany().HasForeignKey(t => t.LAUNCH_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SAFE_USER_IDS).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainSurveyListDemand
|
|
|
|
|
|
public partial class SETrainSurveyListDemandMap :APTEntityBaseMap<T_SE_TRAIN_SURVEY_LIST_DEMAND>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_SURVEY_LIST_DEMAND> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Survey).WithMany(t=>t.Nav_Demands).HasForeignKey(t => t.SURVEY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.OTHER).HasMaxLength(200);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainSurveyListDemandItem
|
|
|
|
|
|
public partial class SETrainSurveyListDemandItemMap :APTEntityBaseMap<T_SE_TRAIN_SURVEY_LIST_DEMAND_ITEM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_SURVEY_LIST_DEMAND_ITEM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_List).WithMany(t=>t.Nav_Items).HasForeignKey(t => t.LIST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DEMAND).WithMany().HasForeignKey(t => t.DEMAND_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainSurveyListDepartment
|
|
|
|
|
|
public partial class SETrainSurveyListDepartmentMap :APTEntityBaseMap<T_SE_TRAIN_SURVEY_LIST_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_SURVEY_LIST_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Survey).WithMany(t=>t.Nav_JoinDepartment).HasForeignKey(t => t.SURVEY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainSurveyListPoint
|
|
|
|
|
|
public partial class SETrainSurveyListPointMap :APTEntityBaseMap<T_SE_TRAIN_SURVEY_LIST_POINT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_SURVEY_LIST_POINT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Survey).WithMany(t=>t.Nav_Points).HasForeignKey(t => t.SURVEY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Point).WithMany().HasForeignKey(t => t.POINT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region YearTrainPlan
|
|
|
|
|
|
public partial class SEYearTrainPlanMap :APTEntityBaseMap<T_SE_YEAR_TRAIN_PLAN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_YEAR_TRAIN_PLAN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchDepartment).WithMany().HasForeignKey(t => t.LAUNCH_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchUser).WithMany().HasForeignKey(t => t.LAUNCH_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.PLAN_NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.IMPLEMENT_REQUIREMENT).HasMaxLength(300);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_GOAL).HasMaxLength(200);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region YearTrainPlanDetail
|
|
|
|
|
|
public partial class SEYearTrainPlanDetailMap :APTEntityBaseMap<T_SE_YEAR_TRAIN_PLAN_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_YEAR_TRAIN_PLAN_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_YearTrainPlan).WithMany(t=>t.Nav_YearTrainPlanDetail).HasForeignKey(t => t.YEAR_TRAIN_PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainTypeEnum).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.OBJECT).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_MODEL).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TEACHING_MATERIAL).HasMaxLength(300);
|
|
|
|
|
|
builder.Property(t => t.TEACHER).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainCheckTypeEnum).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ResponsibilityDep).WithMany().HasForeignKey(t => t.RESPONSIBILITY_DEP_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ResponsibilityUser).WithMany().HasForeignKey(t => t.RESPONSIBILITY_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region YearTrainPlanContent
|
|
|
|
|
|
public partial class SEYearTrainPlanContentMap :APTEntityBaseMap<T_SE_YEAR_TRAIN_PLAN_CONTENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_YEAR_TRAIN_PLAN_CONTENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_YearTrainPlanDetail).WithMany(t=>t.Nav_YearTrainPlanContent).HasForeignKey(t => t.YEAR_TRAIN_PLAN_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TestEnumPoint).WithMany().HasForeignKey(t => t.CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region YearTrainPlanFile
|
|
|
|
|
|
public partial class SEYearTrainPlanFileMap :APTEntityBaseMap<T_SE_YEAR_TRAIN_PLAN_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_YEAR_TRAIN_PLAN_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_YearTrainPlan).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.YEAR_TRAIN_PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region YearTrainPlanDepartment
|
|
|
|
|
|
public partial class SEYearTrainPlanDepartmentMap :APTEntityBaseMap<T_SE_YEAR_TRAIN_PLAN_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_YEAR_TRAIN_PLAN_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_YearTrainPlan).WithMany(t=>t.Nav_YearTrainPlanDepartment).HasForeignKey(t => t.YEAR_TRAIN_PLAN_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepTrainPlan
|
|
|
|
|
|
public partial class SEDepTrainPlanMap :APTEntityBaseMap<T_SE_DEP_TRAIN_PLAN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_DEP_TRAIN_PLAN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchDepartment).WithMany().HasForeignKey(t => t.LAUNCH_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchUser).WithMany().HasForeignKey(t => t.LAUNCH_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SAFE_USER_IDS).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepTrainPlanDetail
|
|
|
|
|
|
public partial class SEDepTrainPlanDetailMap :APTEntityBaseMap<T_SE_DEP_TRAIN_PLAN_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_DEP_TRAIN_PLAN_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepTrainPlan).WithMany(t=>t.Nav_DepTrainPlanDetail).HasForeignKey(t => t.DEP_TRAIN_PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainTypeEnum).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(300);
|
|
|
|
|
|
builder.Property(t => t.OBJECT).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_MODEL).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TEACHING_MATERIAL).HasMaxLength(300);
|
|
|
|
|
|
builder.Property(t => t.TEACHER).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainCheckTypeEnum).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepTrainPlanContent
|
|
|
|
|
|
public partial class SEDepTrainPlanContentMap :APTEntityBaseMap<T_SE_DEP_TRAIN_PLAN_CONTENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_DEP_TRAIN_PLAN_CONTENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepTrainPlanDetail).WithMany(t=>t.Nav_DepTrainPlanContent).HasForeignKey(t => t.DEP_TRAIN_PLAN_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TestEnumPoint).WithMany().HasForeignKey(t => t.CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainNotify
|
|
|
|
|
|
public partial class SETrainNotifyMap :APTEntityBaseMap<T_SE_TRAIN_NOTIFY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_NOTIFY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchDepartment).WithMany().HasForeignKey(t => t.LAUNCH_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchUser).WithMany().HasForeignKey(t => t.LAUNCH_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainType).WithMany().HasForeignKey(t => t.TRAIN_TYPE).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_ADDR).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_TEACHER).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_MODEL).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainCheckType).WithMany().HasForeignKey(t => t.CHECK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_PLAN).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RecordUser).WithMany().HasForeignKey(t => t.RECORD_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainNotifyFile
|
|
|
|
|
|
public partial class SETrainNotifyFileMap :APTEntityBaseMap<T_SE_TRAIN_NOTIFY_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_NOTIFY_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Notify).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.NOTIFY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainNotifyContentRel
|
|
|
|
|
|
public partial class SETrainNotifyContentRelMap :APTEntityBaseMap<T_SE_TRAIN_NOTIFY_CONTENT_REL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_NOTIFY_CONTENT_REL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Notify).WithMany(t=>t.Nav_TrainContentList).HasForeignKey(t => t.NOTIFY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Point).WithMany().HasForeignKey(t => t.POINT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainNotifyPersons
|
|
|
|
|
|
public partial class SETrainNotifyPersonsMap :APTEntityBaseMap<T_SE_TRAIN_NOTIFY_PERSONS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_NOTIFY_PERSONS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Notify).WithMany(t=>t.Nav_TrainUserList).HasForeignKey(t => t.NOTIFY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.LEAVE_REASON).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.POST_NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainRecord
|
|
|
|
|
|
public partial class SETrainRecordMap :APTEntityBaseMap<T_SE_TRAIN_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Notify).WithMany().HasForeignKey(t => t.NOTIFY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainRecordFile
|
|
|
|
|
|
public partial class SETrainRecordFileMap :APTEntityBaseMap<T_SE_TRAIN_RECORD_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_RECORD_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainRecordPaper
|
|
|
|
|
|
public partial class SETrainRecordPaperMap :APTEntityBaseMap<T_SE_TRAIN_RECORD_PAPER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_RECORD_PAPER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Papers).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Test).WithMany().HasForeignKey(t => t.TEST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainRecordUser
|
|
|
|
|
|
public partial class SETrainRecordUserMap :APTEntityBaseMap<T_SE_TRAIN_RECORD_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_RECORD_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.POST_NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainingEffectEvaluation
|
|
|
|
|
|
public partial class SETrainingEffectEvaluationMap :APTEntityBaseMap<T_SE_TRAINING_EFFECT_EVALUATION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAINING_EFFECT_EVALUATION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.FEEDBACK_RATIO).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainingEffectEvaluationOpinion
|
|
|
|
|
|
public partial class SETrainingEffectEvaluationOpinionMap :APTEntityBaseMap<T_SE_TRAINING_EFFECT_EVALUATION_OPINION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAINING_EFFECT_EVALUATION_OPINION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainingEffect).WithMany(t=>t.Nav_OpinionList).HasForeignKey(t => t.TRAINING_EFFECT_EVALUATION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.OPINION_CONTENT).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainingEffectEvaluationEnd
|
|
|
|
|
|
public partial class SETrainingEffectEvaluationEndMap :APTEntityBaseMap<T_SE_TRAINING_EFFECT_EVALUATION_END>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAINING_EFFECT_EVALUATION_END> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainingEffect).WithMany(t=>t.Nav_ResultList).HasForeignKey(t => t.TRAINING_EFFECT_EVALUATION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.GOOD_RATION).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.BETTER_RATION).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.NORMAL_RATION).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.BAD_RATION).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Subject).WithMany().HasForeignKey(t => t.SUBJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainingEffectEvaluationSurvey
|
|
|
|
|
|
public partial class SETrainingEffectEvaluationSurveyMap :APTEntityBaseMap<T_SE_TRAINING_EFFECT_EVALUATION_SURVEY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAINING_EFFECT_EVALUATION_SURVEY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.OPINION).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainingEffectEvaluationSurveyResults
|
|
|
|
|
|
public partial class SETrainingEffectEvaluationSurveyResultsMap :APTEntityBaseMap<T_SE_TRAINING_EFFECT_EVALUATION_SURVEY_RESULTS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAINING_EFFECT_EVALUATION_SURVEY_RESULTS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainingEffectSurvey).WithMany(t=>t.Nav_ResultList).HasForeignKey(t => t.TRAINING_EFFECT_EVALUATION_SURVEY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Subject).WithMany().HasForeignKey(t => t.SUBJECT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ThreeLevelSafeEduCard
|
|
|
|
|
|
public partial class SEThreeLevelSafeEduCardMap :APTEntityBaseMap<T_SE_THREE_LEVEL_SAFE_EDU_CARD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_THREE_LEVEL_SAFE_EDU_CARD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchDepartment).WithMany().HasForeignKey(t => t.LAUNCH_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_LaunchUser).WithMany().HasForeignKey(t => t.LAUNCH_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.ID_CARD_NUMBER).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
builder.Ignore(t => t.IS_OVERTIME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ThreeLevelSafeTrainRecord
|
|
|
|
|
|
public partial class SEThreeLevelSafeTrainRecordMap :APTEntityBaseMap<T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EDUCard).WithMany(t=>t.Nav_TrainRecordList).HasForeignKey(t => t.EDU_CARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TAINNING_ADDR).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TRAINNING_TIME).HasMaxLength(10);
|
|
|
|
|
|
builder.Property(t => t.TEACHER).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_MODEL).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Content).WithMany().HasForeignKey(t => t.CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SCORE).HasMaxLength(10);
|
|
|
|
|
|
builder.Ignore(t => t.PUBLISH);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ThreeLevelSafeTrainRecordFile
|
|
|
|
|
|
public partial class SEThreeLevelSafeTrainRecordFileMap :APTEntityBaseMap<T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainRecord).WithMany(t=>t.Nav_TrainRecordFile).HasForeignKey(t => t.TRAIN_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ThreeLevelSafeTrainRecordSignatureFile
|
|
|
|
|
|
public partial class SEThreeLevelSafeTrainRecordSignatureFileMap :APTEntityBaseMap<T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_SIGNATURE_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_THREE_LEVEL_SAFE_TRAIN_RECORD_SIGNATURE_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TrainRecord).WithMany(t=>t.Nav_TrainSignatureFile).HasForeignKey(t => t.TRAIN_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CertificateType
|
|
|
|
|
|
public partial class SECertificateTypeMap :APTEntityBaseMap<T_SE_CERTIFICATE_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_CERTIFICATE_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Seconfig
|
|
|
|
|
|
public partial class SESeconfigMap :APTEntityBaseMap<T_SE_SECONFIG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_SECONFIG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RenewalTrain
|
|
|
|
|
|
public partial class SERenewalTrainMap :APTEntityBaseMap<T_SE_RENEWAL_TRAIN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_RENEWAL_TRAIN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CertificateType).WithMany().HasForeignKey(t => t.CERTIFICATE_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CERTIFICATE_NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.CERTIFICATE_CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.CERTIFICATE_AUTHORITY).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RenewalTrainFile
|
|
|
|
|
|
public partial class SERenewalTrainFileMap :APTEntityBaseMap<T_SE_RENEWAL_TRAIN_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_RENEWAL_TRAIN_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Renewal).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.RENEWALD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Test
|
|
|
|
|
|
public partial class SETestMap :APTEntityBaseMap<T_SE_TEST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TEST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.OPTION_A).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.OPTION_B).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.OPTION_C).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.OPTION_D).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.OPTION_E).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.TRAINNAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TestEnumPoint
|
|
|
|
|
|
public partial class SETestEnumPointMap :APTEntityBaseMap<T_SE_TEST_ENUM_POINT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TEST_ENUM_POINT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TestListPoint
|
|
|
|
|
|
public partial class SETestListPointMap :APTEntityBaseMap<T_SE_TEST_LIST_POINT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TEST_LIST_POINT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Test).WithMany(t=>t.Nav_Points).HasForeignKey(t => t.TEST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Point).WithMany().HasForeignKey(t => t.POINT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TestListPost
|
|
|
|
|
|
public partial class SETestListPostMap :APTEntityBaseMap<T_SE_TEST_LIST_POST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TEST_LIST_POST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Test).WithMany(t=>t.Nav_Posts).HasForeignKey(t => t.TEST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ThreeLevelSafeContent
|
|
|
|
|
|
public partial class SEThreeLevelSafeContentMap :APTEntityBaseMap<T_SE_THREE_LEVEL_SAFE_CONTENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_THREE_LEVEL_SAFE_CONTENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(300);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainingSurveySubject
|
|
|
|
|
|
public partial class SETrainingSurveySubjectMap :APTEntityBaseMap<T_SE_TRAINING_SURVEY_SUBJECT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAINING_SURVEY_SUBJECT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainCheckTypeEnum
|
|
|
|
|
|
public partial class SETrainCheckTypeEnumMap :APTEntityBaseMap<T_SE_TRAIN_CHECK_TYPE_ENUM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_CHECK_TYPE_ENUM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(300);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainDemandEnum
|
|
|
|
|
|
public partial class SETrainDemandEnumMap :APTEntityBaseMap<T_SE_TRAIN_DEMAND_ENUM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_DEMAND_ENUM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainRecordReport
|
|
|
|
|
|
public partial class SETrainRecordReportMap :APTEntityBaseMap<T_SE_TRAIN_RECORD_REPORT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_RECORD_REPORT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.UNIT).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.LEVEL).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.CLASS_NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_TYPE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.TRAIN_MODEL).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TrainTypeEnum
|
|
|
|
|
|
public partial class SETrainTypeEnumMap :APTEntityBaseMap<T_SE_TRAIN_TYPE_ENUM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_TYPE_ENUM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.HasIndex("NAME").IsUnique();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Hmi
|
|
|
|
|
|
public partial class BDHmiMap :APTEntityBaseMap<T_BD_HMI>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BD_HMI> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(300);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Picture
|
|
|
|
|
|
public partial class BDPictureMap :APTEntityBaseMap<T_BD_PICTURE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BD_PICTURE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasIndex("CODE", "ORG_ID").IsUnique();
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_EnumItem).WithMany().HasForeignKey(t => t.ENUM_ITEM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Enum).WithMany().HasForeignKey(t => t.ENUM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PictureFile
|
|
|
|
|
|
public partial class BDPictureFileMap :APTEntityBaseMap<T_BD_PICTURE_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BD_PICTURE_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Picture).WithMany(t=>t.Nav_PictureFiles).HasForeignKey(t => t.PICTURE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.IMG_FILE_PATH).HasMaxLength(300);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Place
|
|
|
|
|
|
public partial class BDPlaceMap :TreeEntityBaseMap<T_BD_PLACE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BD_PLACE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.NAME_ACRONYM).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ServerInfo
|
|
|
|
|
|
public partial class BDServerInfoMap :APTEntityBaseMap<T_BD_SERVER_INFO>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BD_SERVER_INFO> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.IP).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SystemInfo
|
|
|
|
|
|
public partial class BDSystemInfoMap :APTEntityBaseMap<T_BD_SYSTEM_INFO>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BD_SYSTEM_INFO> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region WordTemplate
|
|
|
|
|
|
public partial class BDWordTemplateMap :APTEntityBaseMap<T_BD_WORD_TEMPLATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_BD_WORD_TEMPLATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.RET_ENTITY_TYPE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.DATA_API).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(300);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Api
|
|
|
|
|
|
public partial class FMApiMap :APTEntityBaseMap<T_FM_API>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_API> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.METHOD).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.DESCRIBE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region BaseAdd
|
|
|
|
|
|
public partial class FMBaseAddMap :APTEntityBaseMap<T_FM_BASE_ADD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_BASE_ADD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.LONGITUDE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.LATITIDE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.HIERARCHY).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.ADDRESS).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region BaseEnergy
|
|
|
|
|
|
public partial class FMBaseEnergyMap :APTEntityBaseMap<T_FM_BASE_ENERGY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_BASE_ENERGY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.ENERGY_MANAGEMENT).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.ENERGY_LEADER).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.LEADER_POSITION).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.LEADER_TEL).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.ENERGY_CHARGE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.CHARGE_TEL).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.AUTH_MECHANISM).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region BaseInfo
|
|
|
|
|
|
public partial class FMBaseInfoMap :APTEntityBaseMap<T_FM_BASE_INFO>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_BASE_INFO> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.ABB_NAME).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.LEGAL_PERSON).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.CREDIT_CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Place).WithMany().HasForeignKey(t => t.PLACE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PropEunmItem).WithMany().HasForeignKey(t => t.PROP_ENUM_ITEM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_FundEunmItem).WithMany().HasForeignKey(t => t.FUND_ENUM_ITEM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentCalendarConfig
|
|
|
|
|
|
public partial class FMDepartmentCalendarConfigMap :APTEntityBaseMap<T_FM_DEPARTMENT_CALENDAR_CONFIG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_CALENDAR_CONFIG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany(t=>t.Nav_DepartmentCalendarConfig).HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Calendar).WithMany().HasForeignKey(t => t.CALENDAR_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentCalendarConfigDetail
|
|
|
|
|
|
public partial class FMDepartmentCalendarConfigDetailMap :APTEntityBaseMap<T_FM_DEPARTMENT_CALENDAR_CONFIG_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_CALENDAR_CONFIG_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentCalendarConfig).WithMany(t=>t.Nav_DepartmentCalendarConfigDetail).HasForeignKey(t => t.DEPARTMENT_CALENDAR_CONFIG_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Class).WithMany().HasForeignKey(t => t.CLASS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentCalendarConfigTeam
|
|
|
|
|
|
public partial class FMDepartmentCalendarConfigTeamMap :APTEntityBaseMap<T_FM_DEPARTMENT_CALENDAR_CONFIG_TEAM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_CALENDAR_CONFIG_TEAM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentCalendarConfig).WithMany(t=>t.Nav_DepartmentCalendarConfigTeam).HasForeignKey(t => t.DEPARTMENT_CALENDAR_CONFIG_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Team).WithMany().HasForeignKey(t => t.TEAM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentCompletion
|
|
|
|
|
|
public partial class FMDepartmentCompletionMap :APTEntityBaseMap<T_FM_DEPARTMENT_COMPLETION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_COMPLETION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.SHOP_DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TEAM_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.FORM_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.MONTHStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.FINISH_RATE);
|
|
|
|
|
|
builder.Ignore(t => t.NORMAL_FINISH_RATE);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentCompletionSort
|
|
|
|
|
|
public partial class FMDepartmentCompletionSortMap :APTEntityBaseMap<T_FM_DEPARTMENT_COMPLETION_SORT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_COMPLETION_SORT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TEAM_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Ignore(t => t.CALC);
|
|
|
|
|
|
builder.Ignore(t => t.TEAM_ONTIME_FINISH_COUNT);
|
|
|
|
|
|
builder.Ignore(t => t.POST_ONTIME_FINISH_COUNT);
|
|
|
|
|
|
builder.Ignore(t => t.HANDOVER_ONTIME_FINISH_COUNT);
|
|
|
|
|
|
builder.Ignore(t => t.ACTIVITY_ONTIME_FINISH_COUNT);
|
|
|
|
|
|
builder.Ignore(t => t.CALC_LICENSE);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentPost
|
|
|
|
|
|
public partial class FMDepartmentPostMap :APTEntityBaseMap<T_FM_DEPARTMENT_POST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_POST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentPostUser
|
|
|
|
|
|
public partial class FMDepartmentPostUserMap :APTEntityBaseMap<T_FM_DEPARTMENT_POST_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_POST_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentPost).WithMany(t=>t.Nav_Users).HasForeignKey(t => t.DEPARTMENT_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentProductionUnit
|
|
|
|
|
|
public partial class FMDepartmentProductionUnitMap :APTEntityBaseMap<T_FM_DEPARTMENT_PRODUCTION_UNIT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_PRODUCTION_UNIT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany(t=>t.Nav_ProdutionUnit).HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Enums).WithMany().HasForeignKey(t => t.ENUMS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentSafeuser
|
|
|
|
|
|
public partial class FMDepartmentSafeuserMap :APTEntityBaseMap<T_FM_DEPARTMENT_SAFEUSER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_SAFEUSER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany(t=>t.Nav_SafeUser).HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentScheduling
|
|
|
|
|
|
public partial class FMDepartmentSchedulingMap :APTEntityBaseMap<T_FM_DEPARTMENT_SCHEDULING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_SCHEDULING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartMent).WithMany(t=>t.Nav_DepartmentScheduling).HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentCalendarConfig).WithMany().HasForeignKey(t => t.DEPARTMENT_CALENDAR_CONFIG_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Class).WithMany().HasForeignKey(t => t.CLASS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Team).WithMany().HasForeignKey(t => t.TEAM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentSchedulingDetail
|
|
|
|
|
|
public partial class FMDepartmentSchedulingDetailMap :APTEntityBaseMap<T_FM_DEPARTMENT_SCHEDULING_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_SCHEDULING_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartmentScheduling).WithMany(t=>t.Nav_DepartmentSchedulingDetail).HasForeignKey(t => t.DEPARTMENT_SCHEDULING_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Person).WithMany().HasForeignKey(t => t.PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DepartmentUser
|
|
|
|
|
|
public partial class FMDepartmentUserMap :APTEntityBaseMap<T_FM_DEPARTMENT_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_DEPARTMENT_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany(t=>t.Nav_DepartmentUser).HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Enum
|
|
|
|
|
|
public partial class FMEnumMap :APTEntityBaseMap<T_FM_ENUM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_ENUM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasIndex("CODE", "ORG_ID").IsUnique();
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Enums
|
|
|
|
|
|
public partial class FMEnumsMap :APTEntityBaseMap<T_FM_ENUMS>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_ENUMS> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EnumItem
|
|
|
|
|
|
public partial class FMEnumItemMap :APTEntityBaseMap<T_FM_ENUM_ITEM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_ENUM_ITEM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME_EN).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.VALUE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region EnumType
|
|
|
|
|
|
public partial class FMEnumTypeMap :APTEntityBaseMap<T_FM_ENUM_TYPE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_ENUM_TYPE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasIndex("CODE", "ORG_ID").IsUnique();
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region HiddenDangerRectification
|
|
|
|
|
|
public partial class FMHiddenDangerRectificationMap :APTEntityBaseMap<T_FM_HIDDEN_DANGER_RECTIFICATION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_HIDDEN_DANGER_RECTIFICATION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TEAM_NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region JobActivityCompletion
|
|
|
|
|
|
public partial class FMJobActivityCompletionMap :APTEntityBaseMap<T_FM_JOB_ACTIVITY_COMPLETION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_JOB_ACTIVITY_COMPLETION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.SHOP_DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TEAM_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.FORM_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.MONTHStr).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MessageTemplate
|
|
|
|
|
|
public partial class FMMessageTemplateMap :APTEntityBaseMap<T_FM_MESSAGE_TEMPLATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_MESSAGE_TEMPLATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Monitoring
|
|
|
|
|
|
public partial class FMMonitoringMap :APTEntityBaseMap<T_FM_MONITORING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_MONITORING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.IP).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.MONITORING_ADDR).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Notice
|
|
|
|
|
|
public partial class FMNoticeMap :APTEntityBaseMap<T_FM_NOTICE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_NOTICE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.TEMPLATE_ID).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TABLENAME).HasMaxLength(60);
|
|
|
|
|
|
builder.Property(t => t.USERNAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TEL).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.ERRORMSG).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.MESSAGE).HasMaxLength(300);
|
|
|
|
|
|
builder.Property(t => t.TITLE).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region NotificationTask
|
|
|
|
|
|
public partial class FMNotificationTaskMap :APTEntityBaseMap<T_FM_NOTIFICATION_TASK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_NOTIFICATION_TASK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.NOTICE_TITLE).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.USER_NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.SOURCE_FORMCODE).HasMaxLength(20);
|
|
|
|
|
|
builder.HasIndex("SOURCE_DATA_ID");
|
|
|
|
|
|
builder.Ignore(t => t.ICON);
|
|
|
|
|
|
builder.Ignore(t => t.PARENT_DEPARTMENT_ID);
|
|
|
|
|
|
builder.Ignore(t => t.DEPARTMENT_ID);
|
|
|
|
|
|
builder.Ignore(t => t.DEPARTMENT_NAME);
|
|
|
|
|
|
builder.Ignore(t => t.MOUDLE_NAME);
|
|
|
|
|
|
builder.Property(t => t.TABLE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.OVER_TIME);
|
|
|
|
|
|
builder.Ignore(t => t.DEPT_DEPARTMENT_ID);
|
|
|
|
|
|
builder.Ignore(t => t.SHOP_DEPARTMENT_ID);
|
|
|
|
|
|
builder.Ignore(t => t.CLASS_DEPARTMENT_ID);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region NotificationTaskTimeSet
|
|
|
|
|
|
public partial class FMNotificationTaskTimeSetMap :APTEntityBaseMap<T_FM_NOTIFICATION_TASK_TIME_SET>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_NOTIFICATION_TASK_TIME_SET> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(20);
|
|
|
|
|
|
builder.Ignore(t => t.STRTASK_TYPE);
|
|
|
|
|
|
builder.Property(t => t.TABLENAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.TABLEKEY).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.TABLETIME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.LIMITDATE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ParamSet
|
|
|
|
|
|
public partial class FMParamSetMap :APTEntityBaseMap<T_FM_PARAM_SET>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_PARAM_SET> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Person
|
|
|
|
|
|
public partial class FMPersonMap :APTEntityBaseMap<T_FM_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.NAME_ACRONYM).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.SEX).HasMaxLength(20);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DepartMent).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TEL).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.EMAIL).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskLevelProportion
|
|
|
|
|
|
public partial class FMRiskLevelProportionMap :APTEntityBaseMap<T_FM_RISK_LEVEL_PROPORTION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_RISK_LEVEL_PROPORTION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.RISK_LEVEL).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.COLOR).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RiskTypeProportion
|
|
|
|
|
|
public partial class FMRiskTypeProportionMap :APTEntityBaseMap<T_FM_RISK_TYPE_PROPORTION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_RISK_TYPE_PROPORTION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.RISK_TYPE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.COLOR).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RoleDepartment
|
|
|
|
|
|
public partial class FMRoleDepartmentMap :APTEntityBaseMap<T_FM_ROLE_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_ROLE_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Role).WithMany().HasForeignKey(t => t.ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Snapshot
|
|
|
|
|
|
public partial class FMSnapshotMap :APTEntityBaseMap<T_FM_SNAPSHOT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_SNAPSHOT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DESCRIPTION).HasMaxLength(1000);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.ACCEPT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(t => t.CREATER_NAME);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SnapshotFile
|
|
|
|
|
|
public partial class FMSnapshotFileMap :APTEntityBaseMap<T_FM_SNAPSHOT_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_SNAPSHOT_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Snapshot).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.SNAPSHOT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SyncLog
|
|
|
|
|
|
public partial class FMSyncLogMap :APTEntityBaseMap<T_FM_SYNC_LOG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_SYNC_LOG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.TRACEIDENTIFIER).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TRACEIDENTIFIERED).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.API_NAME).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.SYNC_PARAM).HasMaxLength(100);
|
|
|
|
|
|
builder.Ignore(t => t.ISINSERT);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region SyncLogDetail
|
|
|
|
|
|
public partial class FMSyncLogDetailMap :APTEntityBaseMap<T_FM_SYNC_LOG_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_SYNC_LOG_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.TRACEIDENTIFIER).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(300);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Team
|
|
|
|
|
|
public partial class FMTeamMap :APTEntityBaseMap<T_FM_TEAM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_TEAM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.ABB_NAME).HasMaxLength(5);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ChargePerson).WithMany().HasForeignKey(t => t.CHARGE_PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TeamPerson
|
|
|
|
|
|
public partial class FMTeamPersonMap :APTEntityBaseMap<T_FM_TEAM_PERSON>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_TEAM_PERSON> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Team).WithMany(t=>t.Nav_TeamPersons).HasForeignKey(t => t.TEAM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Person).WithMany(t=>t.Nav_TeamPersons).HasForeignKey(t => t.PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UserDepartment
|
|
|
|
|
|
public partial class FMUserDepartmentMap :APTEntityBaseMap<T_FM_USER_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_USER_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany(t=>t.Nav_UserDeparts).HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UserPost
|
|
|
|
|
|
public partial class FMUserPostMap :APTEntityBaseMap<T_FM_USER_POST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_USER_POST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UserProductionUnit
|
|
|
|
|
|
public partial class FMUserProductionUnitMap :APTEntityBaseMap<T_FM_USER_PRODUCTION_UNIT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_USER_PRODUCTION_UNIT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany(t=>t.Nav_ProdutionUnit).HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Enums).WithMany().HasForeignKey(t => t.ENUMS_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UserProductionUnitSet
|
|
|
|
|
|
public partial class FMUserProductionUnitSetMap :APTEntityBaseMap<T_FM_USER_PRODUCTION_UNIT_SET>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_USER_PRODUCTION_UNIT_SET> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UserSignFile
|
|
|
|
|
|
public partial class FMUserSignFileMap :APTEntityBaseMap<T_FM_USER_SIGN_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_USER_SIGN_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany(t=>t.Nav_UserSignFiles).HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region UserTest
|
|
|
|
|
|
public partial class FMUserTestMap :APTEntityBaseMap<T_FM_USER_TEST>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_USER_TEST> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_UserPost).WithMany(t=>t.Nav_UserTests).HasForeignKey(t => t.USER_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region WorkTicketCompletion
|
|
|
|
|
|
public partial class FMWorkTicketCompletionMap :APTEntityBaseMap<T_FM_WORK_TICKET_COMPLETION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_FM_WORK_TICKET_COMPLETION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.SHOP_DEPARTMENT_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.TEAM_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.MONTHStr).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.CALC);
|
|
|
|
|
|
builder.Ignore(t => t.FINISH_RATE);
|
|
|
|
|
|
builder.Ignore(t => t.NORMAL_FINISH_RATE);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Oprate
|
|
|
|
|
|
public partial class LGOprateMap :APTEntityBaseMap<T_LG_OPRATE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_LG_OPRATE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.FORM_CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.FORM_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.BTN_CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.BTN_NAME).HasMaxLength(30);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Enterprise
|
|
|
|
|
|
public partial class NWEnterpriseMap :TreeEntityBaseMap<T_NW_ENTERPRISE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_NW_ENTERPRISE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
builder.Ignore(t => t.CheckKeys);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RoleDataPerm
|
|
|
|
|
|
public partial class NWRoleDataPermMap :APTEntityBaseMap<T_NW_ROLE_DATA_PERM>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_NW_ROLE_DATA_PERM> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RoleMenu
|
|
|
|
|
|
public partial class NWRoleMenuMap :APTEntityBaseMap<T_NW_ROLE_MENU>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_NW_ROLE_MENU> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region BillingRule
|
|
|
|
|
|
public partial class OPBillingRuleMap :APTEntityBaseMap<T_OP_BILLING_RULE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_BILLING_RULE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Version).WithMany().HasForeignKey(t => t.VERSION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region BillingRuleVersion
|
|
|
|
|
|
public partial class OPBillingRuleVersionMap :APTEntityBaseMap<T_OP_BILLING_RULE_VERSION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_BILLING_RULE_VERSION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Rule).WithMany(t=>t.Nav_Versions).HasForeignKey(t => t.RULE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.VERSION).HasMaxLength(5);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ChargeTimeSet
|
|
|
|
|
|
public partial class OPChargeTimeSetMap :APTEntityBaseMap<T_OP_CHARGE_TIME_SET>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_CHARGE_TIME_SET> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Client
|
|
|
|
|
|
public partial class OPClientMap :APTEntityBaseMap<T_OP_CLIENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_CLIENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NICK_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.ID_CARD).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.TEL).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.AVATAURL).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.EMAIL).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.ADDR).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ClinetOpenid
|
|
|
|
|
|
public partial class OPClinetOpenidMap :APTEntityBaseMap<T_OP_CLINET_OPENID>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_CLINET_OPENID> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.OPEN_ID).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.NavClient).WithMany().HasForeignKey(t => t.CLIENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CommonQuestion
|
|
|
|
|
|
public partial class OPCommonQuestionMap :APTEntityBaseMap<T_OP_COMMON_QUESTION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_COMMON_QUESTION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.QUESTION).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.ANSWER).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FileFirmware
|
|
|
|
|
|
public partial class OPFileFirmwareMap :APTEntityBaseMap<T_OP_FILE_FIRMWARE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_FILE_FIRMWARE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.FIRMWARE_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.FIRMWARE_TYPE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.FIRMWARE_PATH).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.FIRMWARE_VERSION).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.FIRMWARE_CONTENT).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Member
|
|
|
|
|
|
public partial class OPMemberMap :APTEntityBaseMap<T_OP_MEMBER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_MEMBER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.OPENID).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.PHONE).HasMaxLength(20);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RechargeCard).WithMany().HasForeignKey(t => t.RECHARGE_CARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Menu
|
|
|
|
|
|
public partial class OPMenuMap :TreeEntityBaseMap<T_OP_MENU>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_MENU> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME_ACRONYM).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.MENU_FORM_PARAMS).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.ICON).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(30);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MenuForm).WithMany().HasForeignKey(t => t.MENU_FORM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Notice
|
|
|
|
|
|
public partial class OPNoticeMap :APTEntityBaseMap<T_OP_NOTICE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_NOTICE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NOTICE_TITLE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(30);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region NoticeDetail
|
|
|
|
|
|
public partial class OPNoticeDetailMap :APTEntityBaseMap<T_OP_NOTICE_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_NOTICE_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Notice).WithMany(t=>t.Nav_NoticeDetails).HasForeignKey(t => t.NOTICE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.TEXT).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PeakValleyConfig
|
|
|
|
|
|
public partial class OPPeakValleyConfigMap :APTEntityBaseMap<T_OP_PEAK_VALLEY_CONFIG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_PEAK_VALLEY_CONFIG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.START_TIME).HasMaxLength(10);
|
|
|
|
|
|
builder.Property(t => t.END_TIME).HasMaxLength(10);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RechargeCard
|
|
|
|
|
|
public partial class OPRechargeCardMap :APTEntityBaseMap<T_OP_RECHARGE_CARD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_RECHARGE_CARD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_CardRfid).WithMany().HasForeignKey(t => t.RFID_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.REAMRK).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RechargeOrder
|
|
|
|
|
|
public partial class OPRechargeOrderMap :APTEntityBaseMap<T_OP_RECHARGE_ORDER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_RECHARGE_ORDER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_RechargeCard).WithMany().HasForeignKey(t => t.RECHARGE_CARD_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RechargeSetting
|
|
|
|
|
|
public partial class OPRechargeSettingMap :APTEntityBaseMap<T_OP_RECHARGE_SETTING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_RECHARGE_SETTING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RfidCard
|
|
|
|
|
|
public partial class OPRfidCardMap :APTEntityBaseMap<T_OP_RFID_CARD>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_RFID_CARD> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.RFID).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.IDENTIFICATION).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.REAMRK).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RoleMenu
|
|
|
|
|
|
public partial class OPRoleMenuMap :APTEntityBaseMap<T_OP_ROLE_MENU>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_ROLE_MENU> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Tenant
|
|
|
|
|
|
public partial class OPTenantMap :APTEntityBaseMap<T_OP_TENANT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_TENANT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
builder.Ignore(t => t.CheckKeys);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TenantDB).WithMany().HasForeignKey(t => t.DB_CONN_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Tenant).WithMany().HasForeignKey(t => t.TEMPLATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.WXPAYKEY).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.MCH_ID).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.CERTPATH).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.CERTPASSWORD).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TenantDbConn
|
|
|
|
|
|
public partial class OPTenantDbConnMap :APTEntityBaseMap<T_OP_TENANT_DB_CONN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_TENANT_DB_CONN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.DB_CONN).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.DB_CONN_WAN).HasMaxLength(200);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TenantDomain
|
|
|
|
|
|
public partial class OPTenantDomainMap :APTEntityBaseMap<T_OP_TENANT_DOMAIN>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_TENANT_DOMAIN> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.DOMAIN_NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Tenant).WithMany(t=>t.Nav_Domains).HasForeignKey(t => t.TENANT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region TenantExpiration
|
|
|
|
|
|
public partial class OPTenantExpirationMap :APTEntityBaseMap<T_OP_TENANT_EXPIRATION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_TENANT_EXPIRATION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_TENANT).WithMany().HasForeignKey(t => t.TENANT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region User
|
|
|
|
|
|
public partial class OPUserMap :APTEntityBaseMap<T_OP_USER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_USER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.PASSWORD).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.PHONE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(30);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Version
|
|
|
|
|
|
public partial class OPVersionMap :APTEntityBaseMap<T_OP_VERSION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_VERSION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.OLD_VERSION_NO).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.VERSION_NO).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.VERSION_ZH).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.CONTENT).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.UPDATE_SQL).HasMaxLength(500);
|
|
|
|
|
|
builder.Ignore(t => t.CheckMenuKeys);
|
|
|
|
|
|
builder.Ignore(t => t.CheckTenantKeys);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Tenant).WithMany().HasForeignKey(t => t.TEMPLATE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region VersionMenu
|
|
|
|
|
|
public partial class OPVersionMenuMap :APTEntityBaseMap<T_OP_VERSION_MENU>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_VERSION_MENU> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region VersionTenant
|
|
|
|
|
|
public partial class OPVersionTenantMap :APTEntityBaseMap<T_OP_VERSION_TENANT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_OP_VERSION_TENANT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ApprovalRole
|
|
|
|
|
|
public partial class PFApprovalRoleMap :APTEntityBaseMap<T_PF_APPROVAL_ROLE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APPROVAL_ROLE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Approve
|
|
|
|
|
|
public partial class PFApproveMap :APTEntityBaseMap<T_PF_APPROVE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APPROVE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.APPROVE_CODE).HasMaxLength(10);
|
|
|
|
|
|
builder.Property(t => t.CALLBACK_INTERFACE).HasMaxLength(100);
|
|
|
|
|
|
builder.Ignore(t => t.CurrentNode);
|
|
|
|
|
|
builder.Ignore(t => t.IS_SEND_MESSAGE);
|
|
|
|
|
|
builder.Property(t => t.PARAM).HasMaxLength(200);
|
|
|
|
|
|
builder.Ignore(t => t.REJECT_INTERFACE);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ApproveDetail
|
|
|
|
|
|
public partial class PFApproveDetailMap :APTEntityBaseMap<T_PF_APPROVE_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APPROVE_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany(t=>t.Nav_ApproveDetails).HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NUM).HasMaxLength(10);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveUser).WithMany().HasForeignKey(t => t.APPROVE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.CONTEXT).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveRole).WithMany().HasForeignKey(t => t.APPROVE_ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ApproveOperationRole
|
|
|
|
|
|
public partial class PFApproveOperationRoleMap :APTEntityBaseMap<T_PF_APPROVE_OPERATION_ROLE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APPROVE_OPERATION_ROLE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany(t=>t.Nav_ApproveRoles).HasForeignKey(t => t.APPROVAL_ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Role).WithMany().HasForeignKey(t => t.ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ApproveRejectConfig
|
|
|
|
|
|
public partial class PFApproveRejectConfigMap :APTEntityBaseMap<T_PF_APPROVE_REJECT_CONFIG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APPROVE_REJECT_CONFIG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.FORM_CODE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.REJECT_INTERFACE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.ARCHIVE_INTERFACE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.PARAM).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ApproveRoleDepartment
|
|
|
|
|
|
public partial class PFApproveRoleDepartmentMap :APTEntityBaseMap<T_PF_APPROVE_ROLE_DEPARTMENT>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APPROVE_ROLE_DEPARTMENT> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Approve).WithMany(t=>t.Nav_ApproveDeparts).HasForeignKey(t => t.APPROVAL_ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ApproveTemp
|
|
|
|
|
|
public partial class PFApproveTempMap :APTEntityBaseMap<T_PF_APPROVE_TEMP>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APPROVE_TEMP> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.FORM_CODE).HasMaxLength(10);
|
|
|
|
|
|
builder.Property(t => t.CALLBACK_INTERFACE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.PARAM).HasMaxLength(200);
|
|
|
|
|
|
builder.Property(t => t.REJECT_INTERFACE).HasMaxLength(100);
|
|
|
|
|
|
builder.Property(t => t.ARCHIVE_INTERFACE).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.APPROVE_ROLE_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.CLASS_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.METHOD_NAME).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ApproveTempDetail
|
|
|
|
|
|
public partial class PFApproveTempDetailMap :APTEntityBaseMap<T_PF_APPROVE_TEMP_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APPROVE_TEMP_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveTemp).WithMany(t=>t.Nav_ApproveTempDetails).HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NUM).HasMaxLength(10);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DefaultApproveUser).WithMany().HasForeignKey(t => t.DEFAULT_APPROVE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveRole).WithMany().HasForeignKey(t => t.APPROVE_ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region AppVersion
|
|
|
|
|
|
public partial class PFAppVersionMap :APTEntityBaseMap<T_PF_APP_VERSION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APP_VERSION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region AppVersionFile
|
|
|
|
|
|
public partial class PFAppVersionFileMap :APTEntityBaseMap<T_PF_APP_VERSION_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_APP_VERSION_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_AppVersion).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.APP_VERSION_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ClientScopes
|
|
|
|
|
|
public partial class PFClientScopesMap :APTEntityBaseMap<T_PF_CLIENT_SCOPES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_CLIENT_SCOPES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Scope).WithMany().HasForeignKey(t => t.SCOPE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DataChanel).WithMany(t=>t.Nav_ClientScopes).HasForeignKey(t => t.DATA_CHANNEL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region CodeRuleRunLog
|
|
|
|
|
|
public partial class PFCodeRuleRunLogMap :APTEntityBaseMap<T_PF_CODE_RULE_RUN_LOG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_CODE_RULE_RUN_LOG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region ComplaintLog
|
|
|
|
|
|
public partial class PFComplaintLogMap :APTEntityBaseMap<T_PF_COMPLAINT_LOG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_COMPLAINT_LOG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveDetails).WithMany().HasForeignKey(t => t.APPROVE_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ApproveUser).WithMany().HasForeignKey(t => t.COMPLAINT_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DataChannel
|
|
|
|
|
|
public partial class PFDataChannelMap :APTEntityBaseMap<T_PF_DATA_CHANNEL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_DATA_CHANNEL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.APP_ID).HasMaxLength(30);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Tenant).WithMany().HasForeignKey(t => t.TENANT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.SECURITY_KEY).HasMaxLength(100);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_DataFrequency).WithMany().HasForeignKey(t => t.DATA_FREQUENCY_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region DataFrequency
|
|
|
|
|
|
public partial class PFDataFrequencyMap :APTEntityBaseMap<T_PF_DATA_FREQUENCY>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_DATA_FREQUENCY> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasIndex("CODE", "ORG_ID").IsUnique();
|
|
|
|
|
|
builder.HasIndex("NAME", "ORG_ID").IsUnique();
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Fddeback
|
|
|
|
|
|
public partial class PFFddebackMap :APTEntityBaseMap<T_PF_FDDEBACK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_FDDEBACK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.INFO).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.BACKINFO).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FddebackFile
|
|
|
|
|
|
public partial class PFFddebackFileMap :APTEntityBaseMap<T_PF_FDDEBACK_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_FDDEBACK_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_FeedBack).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.FDDEBACK_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FormHomeChart
|
|
|
|
|
|
public partial class PFFormHomeChartMap :APTEntityBaseMap<T_PF_FORM_HOME_CHART>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_FORM_HOME_CHART> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FormHomeHmi
|
|
|
|
|
|
public partial class PFFormHomeHmiMap :APTEntityBaseMap<T_PF_FORM_HOME_HMI>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_FORM_HOME_HMI> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Hmi).WithMany().HasForeignKey(t => t.HMI_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FormHomeRanking
|
|
|
|
|
|
public partial class PFFormHomeRankingMap :APTEntityBaseMap<T_PF_FORM_HOME_RANKING>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_FORM_HOME_RANKING> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FormHomeStatistic
|
|
|
|
|
|
public partial class PFFormHomeStatisticMap :APTEntityBaseMap<T_PF_FORM_HOME_STATISTIC>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_FORM_HOME_STATISTIC> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region FormRelation
|
|
|
|
|
|
public partial class PFFormRelationMap :APTEntityBaseMap<T_PF_FORM_RELATION>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_FORM_RELATION> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MqttConfig
|
|
|
|
|
|
public partial class PFMqttConfigMap :APTEntityBaseMap<T_PF_MQTT_CONFIG>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_MQTT_CONFIG> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.MQ_IP).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region MqttConfigTheme
|
|
|
|
|
|
public partial class PFMqttConfigThemeMap :APTEntityBaseMap<T_PF_MQTT_CONFIG_THEME>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_MQTT_CONFIG_THEME> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_MqttConfig).WithMany(t=>t.Nav_MqttConfigTheme).HasForeignKey(t => t.MQTT_CONFIG_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(20);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PicFilter
|
|
|
|
|
|
public partial class PFPicFilterMap :APTEntityBaseMap<T_PF_PIC_FILTER>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_PIC_FILTER> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Form).WithMany().HasForeignKey(t => t.PAGE_FORM_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_Picture).WithMany().HasForeignKey(t => t.PICTURE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.PICTURE_ID).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.NUM).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region PicFilterDetail
|
|
|
|
|
|
public partial class PFPicFilterDetailMap :APTEntityBaseMap<T_PF_PIC_FILTER_DETAIL>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_PIC_FILTER_DETAIL> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_PicFilter).WithMany(t=>t.Nav_PicFilterDetail).HasForeignKey(t => t.PIC_FILTER_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(50);
|
|
|
|
|
|
builder.Property(t => t.VALUE).HasMaxLength(50);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region QuestionFeedback
|
|
|
|
|
|
public partial class PFQuestionFeedbackMap :APTEntityBaseMap<T_PF_QUESTION_FEEDBACK>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_QUESTION_FEEDBACK> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.USER_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.FEEDBACK_TIME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.DEAPARTMENT_NAME).HasMaxLength(500);
|
|
|
|
|
|
builder.Property(t => t.QUESTION_DESCRIPTION).HasMaxLength(500);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region QuestionFeedbackFile
|
|
|
|
|
|
public partial class PFQuestionFeedbackFileMap :APTEntityBaseMap<T_PF_QUESTION_FEEDBACK_FILE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_QUESTION_FEEDBACK_FILE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_QuestionFeedback).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.T_PF_QUESTION_FEEDBACK).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region Scopes
|
|
|
|
|
|
public partial class PFScopesMap :APTEntityBaseMap<T_PF_SCOPES>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_SCOPES> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.NAME).HasMaxLength(30);
|
|
|
|
|
|
builder.Property(t => t.REMARK).HasMaxLength(100);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region VersionManage
|
|
|
|
|
|
public partial class PFVersionManageMap :APTEntityBaseMap<T_PF_VERSION_MANAGE>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Configure(EntityTypeBuilder<T_PF_VERSION_MANAGE> builder)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Configure(builder);
|
|
|
|
|
|
builder.Property(t => t.VERSION_NO).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.VERSION_ZH).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.VERSION).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.LAST_VERSION).HasMaxLength(20);
|
|
|
|
|
|
builder.Property(t => t.CONTENT).HasMaxLength(1000);
|
|
|
|
|
|
builder.Property(t => t.GRAMMAR).HasMaxLength(1000);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
|
|
|