using DSWeb.Common.DB; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity; using System.Linq; using System.Web; namespace DSWeb.Common.DB { public class CompanyDataContext : DbContext { public CompanyDataContext(string conn) : base(conn) { } public CompanyDataContext() : base("DongShengDB") { } public DbSet CompanyNew { get; set; } public DbSet Users { get; set; } public DbSet UserBases { get; set; } public DbSet UserErpCode { get; set; } public DbSet JoinApplies { get; set; } public DbSet UserActions { get; set; } public DbSet UserAuthorityRanges { get; set; } public DbSet Banks { get; set; } public DbSet UserCompany { get; set; } public DbSet UserUserAttribute { get; set; } public DbSet Cust_Price { get; set; } public DbSet Cust_Fee { get; set; } public DbSet Cust_CZ { get; set; } public DbSet Cust_Balance { get; set; } public DbSet InfoClients { get; set; } public DbSet VirtualModules { get; set; } public DbSet UserVirtualModules { get; set; } public DbSet GoodsInvTemplate { get; set; } public DbSet GoodsInvs { get; set; } public DbSet Params { get; set; } public DbSet ParamItems { get; set; } public DbSet ParamValues { get; set; } //公章 public DbSet Seals { get; set; } } //公司 [Table("company_new")] public class CompanyNew { public const string AuditStatusNotSubmit = "NotSubmit"; public const string AuditStatusAuditing = "Auditing"; public const string AuditStatusSuccess = "Success"; public const string AuditStatusReject = "Reject"; [Key] public string CompId { get; set; } public string CompName { get; set; } public string SourceName { get; set; } public int AlertMinValue { get; set; } public string AuditStatus { get; set; } public string AuditText { get; set; } public string AdminUser { get; set; } public string AdminShowName { get; set; } public string Address { get; set; } public string Tel { get; set; } public string TaxCode { get; set; } /// /// 海关登记号 /// public string CustomsCode { get; set; } public string BankName { get; set; } public string BankAccount { get; set; } public string LicenceImage { get; set; } public string InvoiceSystem { get; set; } public string InvoiceApi { get; set; } public string EmailShowName { get; set; } public bool MinValueSMS { get; set; } public bool MinValueEmail { get; set; } public string MinValueEmailAddr { get; set; } /// /// 英文名 /// public string EnName { get; set; } //logo图片路径 public string LogoPath { get; set; } /// /// 舱单传输人备案号 /// public string CangdanCode { get; set; } } //公司参数 [Table("company_new_param")] public class CompanyNewParam { [Key] public string ParaCode { get; set; } public string ParaName { get; set; } public string Remark { get; set; } } //公司参数项 [Table("company_new_param_item")] public class CompanyNewParamItem { [Key, Column(Order = 0)] public string ParaCode { get; set; } [Key, Column(Order = 1)] public string ItemCode { get; set; } public string ItemName { get; set; } public string Remark { get; set; } } //公司参数值 [Table("company_new_param_value")] public class CompanyNewParamValue { [Key, Column(Order = 0)] public string ParaCode { get; set; } [Key, Column(Order = 1)] public string CompId { get; set; } public string ItemCode { get; set; } public string Remark { get; set; } } [Table("user_userattribute")] public class UserUserAttribute { [Key] [MaxLength(36)] public string GID { get; set; } [MaxLength(36)] public string USERID { get; set; } [MaxLength(36)] public string ATTRIBUTEID { get; set; } [MaxLength(100)] public string VALUE { get; set; } } //公司印章 [Table("company_new_seal")] public class CompanyNewSeal { /// /// 公章 /// public const string CompanyNewSealTypePublic = "Public"; /// /// 财务章 /// public const string CompanyNewSealTypeFinance = "Finance"; /// /// 业务章 /// public const string CompanyNewSealTypeBusiness = "Business"; [MaxLength(40), Key] public string GID { get; set; } [MaxLength(40)] public string CompId { get; set; } [MaxLength(20)] public string SealType { get; set; } [MaxLength(150)] public string PicPath { get; set; } public DateTime CreateTime { get; set; } [MaxLength(40)] public string CreateUser { get; set; } public DateTime? ModifyTime { get; set; } [MaxLength(40)] public string ModifyUser { get; set; } } }