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 MskSubscribeDataContext : DbContext { public MskSubscribeDataContext() : base("DongShengDB") { } //public DbSet UserAccounts { get; set; } public DbSet UserAccountNew { get; set; } public DbSet Templates { get; set; } public DbSet Ctrns { get; set; } public DbSet TemplatesRate { get; set; } public DbSet RecData { get; set; } public DbSet RecDataSub { get; set; } public DbSet RecLastData { get; set; } public DbSet RealtimeRecord { get; set; } public DbSet Bookings { get; set; } public DbSet BookingTemplates { get; set; } public DbSet FromCities { get; set; } public DbSet ToCities { get; set; } public DbSet ProductNames { get; set; } public DbSet Users { get; set; } public DbSet UserBases { get; set; } public DbSet CustBalance { get; set; } public DbSet CustFee { get; set; } public DbSet Cust_Price { get; set; } public DbSet VUserAuthorities { get; set; } public DbSet UserCompanies { get; set; } public DbSet CompanyNew { get; set; } } [Table("msk_subscribe_booking")] public class MskSubscribeBooking { public const string StatusCreate = "Create"; public const string StatusPost = "Post"; public const string StatusGetting = "Getting"; public const string StatusSuccess = "Success"; public const string StatusFail = "Fail"; [Key] public string GID { get; set; } public string BookingCode { get; set; } public string BookingNO { get; set; } public string Carrier { get; set; } public string VesselName { get; set; } public string VoyageNumber { get; set; } public string FromCity { get; set; } public string ToCity { get; set; } public string ProductName { get; set; } public string Yard { get; set; } public DateTime? StartTime { get; set; } public string ContactNO { get; set; } public string CBType { get; set; } public string CBNO { get; set; } public string UserId { get; set; } public string UserName { get; set; } public string CompId { get; set; } public string CompName { get; set; } public string Status { get; set; } public string PriceId { get; set; } public decimal? Price { get; set; } public string Currency { get; set; } public string BoxType { get; set; } public int? Quantity { get; set; } public DateTime? TXRQ { get; set; } public DateTime CreateTime { get; set; } public DateTime? ModifyTime { get; set; } public string SerialNO { get; set; } public decimal? OFTotal { get; set; } public string OFCurrency { get; set; } public DateTime? EndTime { get; set; } } [Table("msk_subscribe_booking_template")] public class MskSubscribeBookingTemplate { [Key] public string GID { get; set; } public string Title { get; set; } public string Carrier { get; set; } public string ProductName { get; set; } public string Yard { get; set; } public string ContactNO { get; set; } public string CBType { get; set; } public string CBNO { get; set; } public string UserId { get; set; } public string UserName { get; set; } public string CompId { get; set; } public string CompName { get; set; } public int? Quantity { get; set; } public DateTime? TXRQ { get; set; } public DateTime CreateTime { get; set; } public DateTime? ModifyTime { get; set; } public string ContactType { get; set; } public bool IsDefault { get; set; } } [Table("msk_subscribe_from_city")] public class MskSubscribeFromCity { [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public string CityName { get; set; } public string Carrier { get; set; } public string Category { get; set; } } [Table("msk_subscribe_last_data")] public class MskSubscribeLastData { public const string OnOfflineOnlineNew = "OnlineNew"; public const string OnOfflineOffline = "Offline"; public const string ChangeStausUp = "Up"; public const string ChangeStausDown = "Down"; public const string ChangeStausNew = "New"; [Key] public string GID { get; set; } public string TempId { get; set; } public string VesselName { get; set; } public string VoyageNumber { get; set; } public string FromCity { get; set; } public string ToCity { get; set; } public DateTime? StartTime { get; set; } public DateTime? EndTime { get; set; } public string LastCity { get; set; } public DateTime? LastTime { get; set; } public int? Days { get; set; } public decimal? Total { get; set; } public string TotalCurrency { get; set; } public string BoxType { get; set; } public int? BoxNum { get; set; } public decimal? OFTotal { get; set; } public string OFCurrency { get; set; } public bool? ISBook { get; set; } public DateTime? QueryTime { get; set; } public DateTime? CalculationDate { get; set; } public string ErrorInfo { get; set; } public string OnOffline { get; set; } public string ChangeStatus { get; set; } public string FCJson { get; set; } public string PriceId { get; set; } public string Carrier { get; set; } } [Table("msk_subscribe_product_name")] public class MskSubscribeProductName { [Key] public string GID { get; set; } public string ProductName { get; set; } public bool Maersk { get; set; } } [Table("msk_subscribe_realtime_record")] public class MskSubscribeRealtimeRecord { public const string StatusPost = "Post"; public const string StatusGetting = "Getting"; public const string StatusReturnOK = "ReturnOK"; public const string StatusReturnFail = "ReturnFail"; public const string TypeRealtimeQuery = "RealtimeQuery"; [Key] public string GID { get; set; } public string SubId { get; set; } public string Status { get; set; } public string SerialNO { get; set; } public DateTime CreateTime { get; set; } public DateTime? ReturnTime { get; set; } public string Type { get; set; } public string ReturnData { get; set; } } [Table("msk_subscribe_rec_data")] public class MskSubscribeRecData { [Key] public string GID { get; set; } public string TempId { get; set; } public DateTime? RecTime { get; set; } public bool? IsOffline { get; set; } public string Carrier { get; set; } } [Table("msk_subscribe_rec_data_sub")] public class MskSubscribeRecDataSub { [Key] public string GID { get; set; } public string RecId { get; set; } public string CustName { get; set; } public string VesselName { get; set; } public string VoyageNumber { get; set; } public string FromCity { get; set; } public string ToCity { get; set; } public DateTime? StartTime { get; set; } public DateTime? EndTime { get; set; } public string LastCity { get; set; } public DateTime? LastTime { get; set; } public int? Days { get; set; } public decimal? Total { get; set; } public string TotalCurrency { get; set; } public string BoxType { get; set; } public int? BoxNum { get; set; } public decimal? OFTotal { get; set; } public string OFCurrency { get; set; } public bool? ISBook { get; set; } public DateTime? QueryTime { get; set; } public DateTime? CalculationDate { get; set; } public string ErrorInfo { get; set; } public string FCJson { get; set; } public string PriceId { get; set; } public string Carrier { get; set; } } [Table("msk_subscribe_template")] public class MskSubscribeTemplate { [Key] public string GID { get; set; } public string UserId { get; set; } public string DeparturePort { get; set; } public string Destinationport { get; set; } public string ProductName { get; set; } public DateTime CalculationDate { get; set; } public DateTime CreateDate { get; set; } public bool AlertMail { get; set; } public string MailTo { get; set; } public bool AlertTemplateMessage { get; set; } public string TemplateMessageTo { get; set; } public bool Enable { get; set; } public DateTime? ChargeTo { get; set; } public bool AlertOnline { get; set; } public bool AlertOffline { get; set; } public bool AlertPriceUp { get; set; } public bool AlertPriceDown { get; set; } public bool AlertMinPrice { get; set; } public string Remark { get; set; } public DateTime? ModifyTime { get; set; } public DateTime? EnableTime { get; set; } public string SubscribeCode { get; set; } public int SendDelay { get; set; } public DateTime? LastSend { get; set; } public string Carrier { get; set; } public string ExtendData { get; set; } public string CarrierCode { get; set; } public string DeparturePortCode { get; set; } public string DestinationportCode { get; set; } public string ServiceCode { get; set; } public string ServiceName { get; set; } } [Table("msk_subscribe_template_ctrn")] public class MskSubscribeTemplateCtrn { [Key] public string GID { get; set; } public string TempId { get; set; } public string CtrnType { get; set; } public int Num { get; set; } public decimal AlertPrice { get; set; } public int Sort { get; set; } public string Remark { get; set; } public string CtnCode { get; set; } } [Table("msk_subscribe_template_rate")] public class MskSubscribeTemplateRate { [Key] public string GID { get; set; } public string TempId { get; set; } public int BDate { get; set; } public int EDate { get; set; } public int Rate { get; set; } } [Table("msk_subscribe_to_city")] public class MskSubscribeToCity { [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public string CityName { get; set; } public string Carrier { get; set; } public string Category { get; set; } } //[Table("msk_subscribe_user_account")] //public class MskSubscribeUserAccount //{ // [Key, Column(Order = 0)] // public string UserId { get; set; } // public string MskSpotAccount { get; set; } // public string MskSpotPassword { get; set; } // public string MskSpotCustNO { get; set; } // public string Remark { get; set; } // public string MskSpotAccountBook { get; set; } // public string MskSpotPasswordBook { get; set; } // public string MskSpotCustNOBook { get; set; } // [Key, Column(Order = 1)] // public string Carrier { get; set; } // //[Key, Column(Order = 2)] // //public string Sort { get; set; } //} [Table("msk_subscribe_user_account_new")] public class MskSubscribeUserAccountNew { [Key] public string GID { get; set; } public string UserId { get; set; } public string Carrier { get; set; } public string Account { get; set; } public string Password { get; set; } public bool IsBook { get; set; } public string Remark { get; set; } } }