You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
314 lines
10 KiB
314 lines
10 KiB
namespace Warehouse.Models
|
|
{
|
|
using System;
|
|
using System.Data.Entity;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using Warehouse.Models.Permission;
|
|
|
|
public partial class whModel : DbContext
|
|
{
|
|
public whModel()
|
|
: base("name=whConn")
|
|
{
|
|
}
|
|
|
|
public virtual DbSet<tapplicationlog> tapplicationlogs { get; set; }
|
|
public virtual DbSet<tlocationcondition> tlocationconditions { get; set; }
|
|
public virtual DbSet<tstock> tstocks { get; set; }
|
|
public virtual DbSet<tstockinlog> tstockinlogs { get; set; }
|
|
public virtual DbSet<tstoragelocation> tstoragelocations { get; set; }
|
|
//add by xue lei on 2019-3-1
|
|
public virtual DbSet<tcontainer> tcontainers { get; set; }
|
|
public virtual DbSet<tcontainerpallet> tcontainerpallets { get; set; }
|
|
//add by xue lei on 2019-3-14
|
|
public virtual DbSet<tpermission> tpermissions { get; set; }
|
|
public virtual DbSet<trolepermission> trolepermissions { get; set; }
|
|
public virtual DbSet<trole> troles { get; set; }
|
|
public virtual DbSet<tuserrole> tuserroles { get; set; }
|
|
public virtual DbSet<tuser> tusers { get; set; }
|
|
|
|
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<tapplicationlog>()
|
|
.Property(e => e.palletno)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tapplicationlog>()
|
|
.Property(e => e.createuser)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tapplicationlog>()
|
|
.Property(e => e.updateuser)
|
|
.IsUnicode(false);
|
|
|
|
//commented by xue lei on 2019-2-21
|
|
//modelBuilder.Entity<tlocationcondition>()
|
|
// .Property(e => e.storagelocationid)
|
|
// .IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.powergrade)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.color)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.igrade)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.celltype)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.finalgrade)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.cellqty)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.frame)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.jbox)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.bartype)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.modulespec)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.status)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tlocationcondition>()
|
|
.Property(e => e.createuser)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstock>()
|
|
.Property(e => e.Name)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstock>()
|
|
.Property(e => e.Area)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstock>()
|
|
.Property(e => e.Type)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstock>()
|
|
.Property(e => e.Person)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstock>()
|
|
.Property(e => e.Phone)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstock>()
|
|
.Property(e => e.Address)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstock>()
|
|
.Property(e => e.Remark)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstockinlog>()
|
|
.Property(e => e.palletno)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstockinlog>()
|
|
.Property(e => e.createuser)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstockinlog>()
|
|
.Property(e => e.updateuser)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstockinlog>()
|
|
.Property(e => e.remark)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstockinlog>()
|
|
.Property(e => e.v1)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstoragelocation>()
|
|
.Property(e => e.locationname)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tstoragelocation>()
|
|
.Property(e => e.ChargerUserID)
|
|
.IsUnicode(false);
|
|
|
|
//add by xue lei on 2019-3-1
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.ContainerNo)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.State)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.powergrade)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.color)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.igrade)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.celltype)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.finalgrade)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.cellqty)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.frame)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.jbox)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.bartype)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.modulespec)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.condiction)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.CustomerNo)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.MaterialCompany)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.PlateNo)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.Driver)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.DriverPhone)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.DriveType)
|
|
.IsUnicode(false);
|
|
//add by xue lei on 2019-3-7
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.DriveNo)
|
|
.IsUnicode(false);
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.shipmentuser)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainer>()
|
|
.Property(e => e.createuser)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainerpallet>()
|
|
.Property(e => e.ContainerNo)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainerpallet>()
|
|
.Property(e => e.palletno)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tcontainerpallet>()
|
|
.Property(e => e.createuser)
|
|
.IsUnicode(false);
|
|
modelBuilder.Entity<tcontainerpallet>()
|
|
.Property(e => e.status)
|
|
.IsUnicode(false);
|
|
|
|
//add by xue lei on 2019-3-14
|
|
modelBuilder.Entity<tpermission>()
|
|
.Property(e => e.PermissionName)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tpermission>()
|
|
.Property(e => e.Remark)
|
|
.IsUnicode(false);
|
|
|
|
//modelBuilder.Entity<trolepermission>()
|
|
// .Property(e => e.PermissionId)
|
|
// .IsUnicode(false);
|
|
|
|
modelBuilder.Entity<trole>()
|
|
.Property(e => e.RoleName)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<trole>()
|
|
.HasMany(e => e.trolepermissions)
|
|
.WithRequired(e => e.trole)
|
|
.WillCascadeOnDelete(false);
|
|
|
|
modelBuilder.Entity<trole>()
|
|
.HasMany(e => e.tuserroles)
|
|
.WithRequired(e => e.trole)
|
|
.WillCascadeOnDelete(false);
|
|
|
|
modelBuilder.Entity<tuser>()
|
|
.Property(e => e.Username)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tuser>()
|
|
.Property(e => e.DisplayName)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tuser>()
|
|
.Property(e => e.workshop)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tuser>()
|
|
.Property(e => e.Password)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tuser>()
|
|
.Property(e => e.PasswordSalt)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tuser>()
|
|
.Property(e => e.UserImage)
|
|
.IsUnicode(false);
|
|
|
|
modelBuilder.Entity<tuser>()
|
|
.HasMany(e => e.tuserroles)
|
|
.WithRequired(e => e.tuser)
|
|
.WillCascadeOnDelete(false);
|
|
}
|
|
}
|
|
}
|
|
|