//------------------------------------------------------------------------------
//
// 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.CollegeID).HasColumnName("CollegeID");
this.Property(t => t.DepartmentID).HasColumnName("DepartmentID");
this.Property(t => t.StaffCode).HasColumnName("StaffCode").IsRequired().IsUnicode(false).HasMaxLength(50);
this.Property(t => t.BirthDate).HasColumnName("BirthDate");
this.Property(t => t.Sex).HasColumnName("Sex");
this.Property(t => t.TeacherType).HasColumnName("TeacherType");
this.Property(t => t.IncumbencyState).HasColumnName("IncumbencyState");
this.Property(t => t.CertificatesType).HasColumnName("CertificatesType");
this.Property(t => t.CertificatesNum).HasColumnName("CertificatesNum").IsUnicode(false).HasMaxLength(50);
this.Property(t => t.Situation).HasColumnName("Situation");
this.Property(t => t.LiteracyLevels).HasColumnName("LiteracyLevels");
this.Property(t => t.DegreeState).HasColumnName("DegreeState");
this.Property(t => t.LearnPosition).HasColumnName("LearnPosition");
this.Property(t => t.Title).HasColumnName("Title");
this.Property(t => t.WorkDate).HasColumnName("WorkDate");
this.Property(t => t.ComeSchoolDate).HasColumnName("ComeSchoolDate");
this.Property(t => t.TeachingDate).HasColumnName("TeachingDate");
this.Property(t => t.PhotoUrl).HasColumnName("PhotoUrl").IsUnicode(false).HasMaxLength(200);
this.Property(t => t.Profile).HasColumnName("Profile").IsUnicode(false).HasMaxLength(500);
this.Property(t => t.Remarks).HasColumnName("Remarks");
this.Property(t => t.PaymentLevelID).HasColumnName("PaymentLevelID");
this.Property(t => t.IsDualTeacher).HasColumnName("IsDualTeacher");
this.Property(t => t.RecordStatus).HasColumnName("RecordStatus");
this.Property(t => t.CreateTime).HasColumnName("CreateTime");
this.Property(t => t.CreateUserID).HasColumnName("CreateUserID");
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);
}
}
}