//------------------------------------------------------------------------------
//
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
//------------------------------------------------------------------------------
namespace EMIS.Entities
{
#pragma warning disable 1573
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.Infrastructure;
using System.ComponentModel.DataAnnotations.Schema;
internal partial class CF_Staff_Mapping : EntityTypeConfiguration
{
public CF_Staff_Mapping()
{
this.HasKey(t => t.UserID);
this.ToTable("CF_Staff");
this.Property(t => t.UserID).HasColumnName("UserID");
this.Property(t => t.StaffCode).HasColumnName("StaffCode").IsRequired().IsUnicode(false).HasMaxLength(50);
this.Property(t => t.CollegeID).HasColumnName("CollegeID");
this.Property(t => t.DepartmentID).HasColumnName("DepartmentID");
this.Property(t => t.SexID).HasColumnName("SexID");
this.Property(t => t.BirthDate).HasColumnName("BirthDate");
this.Property(t => t.NationID).HasColumnName("NationID");
this.Property(t => t.PoliticsID).HasColumnName("PoliticsID");
this.Property(t => t.CertificatesType).HasColumnName("CertificatesType");
this.Property(t => t.CertificatesNum).HasColumnName("CertificatesNum").IsUnicode(false).HasMaxLength(50);
this.Property(t => t.TeacherTypeID).HasColumnName("TeacherTypeID");
this.Property(t => t.IncumbencyState).HasColumnName("IncumbencyState");
this.Property(t => t.SituationID).HasColumnName("SituationID");
this.Property(t => t.TitleID).HasColumnName("TitleID");
this.Property(t => t.LiteracyLevelID).HasColumnName("LiteracyLevelID");
this.Property(t => t.LearnPositionID).HasColumnName("LearnPositionID");
this.Property(t => t.IsDualTeacher).HasColumnName("IsDualTeacher");
this.Property(t => t.PaymentLevelID).HasColumnName("PaymentLevelID");
this.Property(t => t.WorkDate).HasColumnName("WorkDate");
this.Property(t => t.ComeSchoolDate).HasColumnName("ComeSchoolDate");
this.Property(t => t.PhotoUrl).HasColumnName("PhotoUrl").IsUnicode(false).HasMaxLength(500);
this.Property(t => t.Profile).HasColumnName("Profile");
this.Property(t => t.Remark).HasColumnName("Remark");
this.Property(t => t.RecordStatus).HasColumnName("RecordStatus");
this.Property(t => t.CreateUserID).HasColumnName("CreateUserID");
this.Property(t => t.CreateTime).HasColumnName("CreateTime");
this.Property(t => t.ModifyUserID).HasColumnName("ModifyUserID");
this.Property(t => t.ModifyTime).HasColumnName("ModifyTime");
this.HasOptional(t => t.CF_College).WithMany(t => t.CF_Staff).HasForeignKey(d => d.CollegeID);
this.HasOptional(t => t.CF_Department).WithMany(t => t.CF_Staff).HasForeignKey(d => d.DepartmentID);
this.HasRequired(t => t.Sys_User).WithOptional(t => t.CF_Staff);
this.HasMany(t => t.EM_EvaluationSetting).WithMany(t => t.CF_Staff)
.Map(m =>
{
m.ToTable("EM_EvaluationSetting_CF_Staff");
m.MapLeftKey("UserID");
m.MapRightKey("EvaluationSettingID");
});
this.HasMany(t => t.EM_ExecutableFreeSelectionCouseScheduling).WithMany(t => t.CF_Staff)
.Map(m =>
{
m.ToTable("EM_ExecutableFreeSelectionCouseScheduling_CF_Staff");
m.MapLeftKey("UserID");
m.MapRightKey("ExecutableFreeSelectionCouseSchedulingID");
});
this.HasMany(t => t.EM_FreeSelectionCouseApplyScheduling).WithMany(t => t.CF_Staff)
.Map(m =>
{
m.ToTable("EM_FreeSelectionCouseApplyScheduling_CF_Staff");
m.MapLeftKey("UserID");
m.MapRightKey("FreeSelectionCouseApplySchedulingID");
});
this.HasMany(t => t.EM_TeacherEvaluation).WithMany(t => t.CF_Staff)
.Map(m =>
{
m.ToTable("EM_TeacherEvaluation_Staff");
m.MapLeftKey("UserID");
m.MapRightKey("ID");
});
this.HasMany(t => t.EX_ExaminationRoomLayout).WithMany(t => t.CF_Staff)
.Map(m =>
{
m.ToTable("EX_ExaminationRoomLayout_CF_Staff");
m.MapLeftKey("UserID");
m.MapRightKey("ExaminationRoomLayoutID");
});
this.HasMany(t => t.SUP_ProjectRecord_CF_Staff).WithMany(t => t.SUP_ProjectRecord_CF_Staff)
.Map(m =>
{
m.ToTable("SUP_ProjectRecord_CF_Staff");
m.MapLeftKey("UserID");
m.MapRightKey("ProjectRecordID");
});
}
}
}