//------------------------------------------------------------------------------ // // 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 Sys_Announcement_Mapping : EntityTypeConfiguration { public Sys_Announcement_Mapping() { this.HasKey(t => t.AnnouncementID); this.ToTable("Sys_Announcement"); this.Property(t => t.AnnouncementID).HasColumnName("AnnouncementID"); this.Property(t => t.AnnouncementTypeID).HasColumnName("AnnouncementTypeID"); this.Property(t => t.Title).HasColumnName("Title").HasMaxLength(100); this.Property(t => t.Content).HasColumnName("Content"); this.Property(t => t.StartTime).HasColumnName("StartTime"); this.Property(t => t.EndTime).HasColumnName("EndTime"); this.Property(t => t.IsTop).HasColumnName("IsTop"); 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.Sys_AnnouncementType).WithMany(t => t.Sys_Announcement).HasForeignKey(d => d.AnnouncementTypeID); this.HasMany(t => t.Sys_Role).WithMany(t => t.Sys_Announcement) .Map(m => { m.ToTable("Sys_Announcement_Sys_Role"); m.MapLeftKey("AnnouncementID"); m.MapRightKey("RoleID"); }); this.HasMany(t => t.Sys_User).WithMany(t => t.Sys_Announcement) .Map(m => { m.ToTable("Sys_Announcement_Sys_User"); m.MapLeftKey("AnnouncementID"); m.MapRightKey("UserID"); }); } } }