You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
335 lines
8.0 KiB
C#
335 lines
8.0 KiB
C#
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 InvoiceDbContext : DbContext
|
|
{
|
|
public InvoiceDbContext() : base("DongShengDB")
|
|
{
|
|
|
|
}
|
|
|
|
public DbSet<InvoiceRecord> Invoices { get; set; }
|
|
public DbSet<InvoiceRecordSub> InvoiceSubs { get; set; }
|
|
|
|
public DbSet<CompanyNew> CompanyNew { get; set; }
|
|
public DbSet<User> Users { get; set; }
|
|
|
|
public DbSet<CompanyBank> Banks { get; set; }
|
|
|
|
public DbSet<CodeGoodsInv> GoodsInvs { get; set; }
|
|
public DbSet<ParamSet> ParamSets { get; set; }
|
|
|
|
public DbSet<VUserAuthority> VUserAuthorities { get; set; }
|
|
public DbSet<UserCompany> UserCompanies { get; set; }
|
|
|
|
public DbSet<RemoteRecord> RemoteRecords { get; set; }
|
|
|
|
|
|
public DbSet<InvoiceBuyer> InvoiceBuyer { get; set; }
|
|
public DbSet<InvoiceBuyerSub> InvoiceBuyerSub { get; set; }
|
|
|
|
public DbSet<CurrencyExchangeInv> CurrencyExchangeInv { get; set; }
|
|
|
|
public DbSet<CodeCurrency> CodeCurrency { get; set; }
|
|
}
|
|
|
|
|
|
[Table("InvoiceRecord")]
|
|
public class InvoiceRecord
|
|
{
|
|
public const string StatusCreate = "Create"; //未开票
|
|
public const string StatusPost = "Post"; //已发送开票请求
|
|
public const string StatusIssued = "Issued"; //已开票
|
|
public const string StatusFail = "Fail"; //开票失败
|
|
public const string StatusCancelling = "Cancelling"; //请求作废
|
|
public const string StatusCancel = "Cancel"; //作废
|
|
|
|
[Key]
|
|
[MaxLength(36)]
|
|
public string GID { get; set; }
|
|
|
|
[MaxLength(64)]
|
|
public string FromId { get; set; }
|
|
|
|
[MaxLength(64)]
|
|
public string FromSystem { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string UserId { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string CompId { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string BuyerName { get; set; }
|
|
|
|
[MaxLength(60)]
|
|
public string BuyerTaxNum { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string BuyerTel { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string BuyerAddress { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string BuyerAccount { get; set; }
|
|
|
|
|
|
public DateTime? InvoiceDate { get; set; }
|
|
|
|
[MaxLength(1)]
|
|
public string InvoiceType { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string SalerName { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string SalerTaxNum { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string SalerTel { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string SalerAddress { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string SalerAccount { get; set; }
|
|
|
|
[MaxLength(12)]
|
|
public string InvoiceCode { get; set; }
|
|
|
|
[MaxLength(8)]
|
|
public string InvoiceNum { get; set; }
|
|
|
|
[MaxLength(2)]
|
|
public string PushMode { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string BuyerPhone { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
public string Email { get; set; }
|
|
|
|
[MaxLength(1)]
|
|
public string InvoiceLine { get; set; }
|
|
|
|
[MaxLength(8)]
|
|
public string Payee { get; set; }
|
|
|
|
[MaxLength(8)]
|
|
public string Checker { get; set; }
|
|
|
|
[MaxLength(10)]
|
|
public string Clerk { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string OrderNo { get; set; }
|
|
|
|
[MaxLength(400)]
|
|
public string Remark { get; set; }
|
|
|
|
|
|
public DateTime CreateTime { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string CreateUser { get; set; }
|
|
|
|
|
|
public DateTime? ModifyTime { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string ModifyUser { get; set; }
|
|
|
|
[MaxLength(10)]
|
|
public string Status { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string SerialNo { get; set; }
|
|
|
|
[MaxLength(12)]
|
|
public string InvCode { get; set; }
|
|
|
|
[MaxLength(8)]
|
|
public string InvNum { get; set; }
|
|
|
|
|
|
public decimal? Total { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
public string TotalWords { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string PdfUrl { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string PictureUrl { get; set; }
|
|
|
|
[MaxLength(-1)]
|
|
public string ResultJson { get; set; }
|
|
|
|
[MaxLength(400)]
|
|
public string RequireRemark { get; set; }
|
|
|
|
|
|
public decimal? AmountUSD { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string PdfNasUrl { get; set; }
|
|
|
|
[MaxLength(2000)]
|
|
public string ExtendData { get; set; }
|
|
|
|
|
|
public DateTime? ApiSendTime { get; set; }
|
|
|
|
|
|
public DateTime? ApiReadTime { get; set; }
|
|
|
|
[MaxLength(40)]
|
|
public string ApplyUser { get; set; }
|
|
|
|
[MaxLength(40)]
|
|
public string ClerkId { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string MBLNO { get; set; }
|
|
|
|
}
|
|
|
|
|
|
[Table("InvoiceRecordSub")]
|
|
public class InvoiceRecordSub
|
|
{
|
|
[Key]
|
|
[MaxLength(36)]
|
|
public string GID { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string InvId { get; set; }
|
|
|
|
[MaxLength(180)]
|
|
public string GoodsName { get; set; }
|
|
|
|
|
|
public decimal? Num { get; set; }
|
|
|
|
[MaxLength(1)]
|
|
public string WithTaxFlag { get; set; }
|
|
|
|
|
|
public decimal? Price { get; set; }
|
|
|
|
|
|
public decimal? Tax { get; set; }
|
|
|
|
|
|
public decimal? TaxIncludedAmount { get; set; }
|
|
|
|
|
|
public decimal? TaxExcludedAmount { get; set; }
|
|
|
|
|
|
public decimal? TaxRate { get; set; }
|
|
|
|
[MaxLength(40)]
|
|
public string SpecType { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string Unit { get; set; }
|
|
|
|
[MaxLength(19)]
|
|
public string GoodsCode { get; set; }
|
|
|
|
[MaxLength(1)]
|
|
public string FavouredPolicyFlag { get; set; }
|
|
|
|
[MaxLength(100)]
|
|
public string FavouredPolicyName { get; set; }
|
|
|
|
[MaxLength(1)]
|
|
public string ZeroRateFlag { get; set; }
|
|
|
|
[MaxLength(400)]
|
|
public string Remark { get; set; }
|
|
|
|
|
|
}
|
|
|
|
//发票购买方
|
|
[Table("InvoiceBuyer")]
|
|
public class InvoiceBuyer
|
|
{
|
|
[Key]
|
|
[MaxLength(36)]
|
|
public string GID { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string UserId { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string CompId { get; set; }
|
|
|
|
[MaxLength(200)]
|
|
public string BuyerName { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string BuyerTaxCode { get; set; }
|
|
|
|
|
|
public DateTime CreateTime { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string CreateUser { get; set; }
|
|
|
|
|
|
public DateTime? ModifyTime { get; set; }
|
|
|
|
[MaxLength(36)]
|
|
public string ModifyUser { get; set; }
|
|
|
|
}
|
|
|
|
//发票购买方子表
|
|
[Table("InvoiceBuyerSub")]
|
|
public class InvoiceBuyerSub
|
|
{
|
|
[Key]
|
|
public string GID { get; set; }
|
|
public string BuyerId { get; set; }
|
|
public string Address { get; set; }
|
|
public string Tel { get; set; }
|
|
public string BuyerAccount { get; set; }
|
|
public bool IsUSD { get; set; }
|
|
}
|
|
|
|
//发票汇率
|
|
[Table("currency_exchange_inv")]
|
|
public class CurrencyExchangeInv
|
|
{
|
|
[Key]
|
|
public string GID { get; set; }
|
|
public string CURRENCYID { get; set; }
|
|
public decimal? VALUE { get; set; }
|
|
public string TYPE { get; set; }
|
|
public DateTime? STARTTIME { get; set; }
|
|
public DateTime? ENDTIME { get; set; }
|
|
public string CREATEUSER { get; set; }
|
|
public DateTime CREATETIME { get; set; }
|
|
public string MODIFIEDUSER { get; set; }
|
|
public DateTime? MODIFIEDTIME { get; set; }
|
|
public string COMPANYID { get; set; }
|
|
public bool? ISDELETE { get; set; }
|
|
public string DELETEUSER { get; set; }
|
|
public DateTime? DELETETIME { get; set; }
|
|
public string CompId { get; set; }
|
|
}
|
|
} |