7 changed files with 408 additions and 1 deletions
-
128src/Shentun.Peis.Domain/InvoiceApplys/InvoiceApply.cs
-
65src/Shentun.Peis.Domain/InvoiceRecords/InvoiceRecord.cs
-
96src/Shentun.Peis.Domain/PaymentRecords/PaymentRecord.cs
-
41src/Shentun.Peis.EntityFrameworkCore/DbMapping/InvoiceApplys/InvoiceApplyDbMapping.cs
-
33src/Shentun.Peis.EntityFrameworkCore/DbMapping/InvoiceRecords/InvoiceRecordDbMapping.cs
-
36src/Shentun.Peis.EntityFrameworkCore/DbMapping/PaymentRecords/PaymentRecordDbMapping.cs
-
10src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
@ -0,0 +1,128 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Domain.Entities; |
||||
|
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
|
namespace Shentun.Peis.Models |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 发票申请
|
||||
|
/// </summary>
|
||||
|
[Table("invoice_apply")] |
||||
|
public class InvoiceApply : AuditedEntity<Guid>, IHasConcurrencyStamp |
||||
|
{ |
||||
|
public InvoiceApply() { } |
||||
|
|
||||
|
public InvoiceApply(Guid id) : base(id) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 单位编号
|
||||
|
/// </summary>
|
||||
|
[Column("customer_org_id")] |
||||
|
public Guid CustomerOrgId { get; set; } |
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
///客户单位登记ID 体检次数
|
||||
|
/// </summary>
|
||||
|
[Column("customer_org_register_id")] |
||||
|
public Guid CustomerOrgRegisterId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 业务员
|
||||
|
/// </summary>
|
||||
|
[Column("sales_person")] |
||||
|
[StringLength(50)] |
||||
|
public string SalesPerson { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 申请时间
|
||||
|
/// </summary>
|
||||
|
[Column("apply_time")] |
||||
|
public DateTime? ApplyTime { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 申请金额
|
||||
|
/// </summary>
|
||||
|
[Column("apply_amount")] |
||||
|
public decimal ApplyAmount { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 开票名称
|
||||
|
/// </summary>
|
||||
|
[Column("invoice_name")] |
||||
|
[StringLength(100)] |
||||
|
public string InvoiceName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 国家组织机构代码
|
||||
|
/// </summary>
|
||||
|
[Column("country_org_code")] |
||||
|
[StringLength(30)] |
||||
|
public string CountryOrgCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 业务银行
|
||||
|
/// </summary>
|
||||
|
[Column("bank")] |
||||
|
[StringLength(100)] |
||||
|
public string Bank { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 银行帐号
|
||||
|
/// </summary>
|
||||
|
[Column("accounts")] |
||||
|
[StringLength(100)] |
||||
|
public string Accounts { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 联系人
|
||||
|
/// </summary>
|
||||
|
[Column("contact")] |
||||
|
[StringLength(30)] |
||||
|
public string Contact { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 联系电话
|
||||
|
/// </summary>
|
||||
|
[Column("contact_phone")] |
||||
|
[StringLength(20)] |
||||
|
public string ContactPhone { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否完成开票
|
||||
|
/// </summary>
|
||||
|
[Column("is_complete_invoicing")] |
||||
|
public char IsCompleteInvoicing { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否完成收款
|
||||
|
/// </summary>
|
||||
|
[Column("is_complete_payment")] |
||||
|
public char IsCompletePayment { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 备注
|
||||
|
/// </summary>
|
||||
|
[Column("remark")] |
||||
|
[StringLength(200)] |
||||
|
public string Remark { get; set; } |
||||
|
|
||||
|
[Column("concurrency_stamp")] |
||||
|
public string ConcurrencyStamp { get; set; } |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,65 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Domain.Entities; |
||||
|
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
|
namespace Shentun.Peis.Models |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 开票记录
|
||||
|
/// </summary>
|
||||
|
[Table("invoice_record")] |
||||
|
public class InvoiceRecord : AuditedEntity<Guid>, IHasConcurrencyStamp |
||||
|
{ |
||||
|
public InvoiceRecord() { } |
||||
|
|
||||
|
public InvoiceRecord(Guid id) : base(id) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///发票申请表id
|
||||
|
/// </summary>
|
||||
|
[Column("invoice_apply_id")] |
||||
|
public Guid InvoiceApplyId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 开票人
|
||||
|
/// </summary>
|
||||
|
[Column("invoice_person")] |
||||
|
[StringLength(50)] |
||||
|
public string InvoicePerson { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 开票时间
|
||||
|
/// </summary>
|
||||
|
[Column("invoice_time")] |
||||
|
public DateTime? InvoiceTime { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 开票金额
|
||||
|
/// </summary>
|
||||
|
[Column("invoice_amount")] |
||||
|
public decimal InvoiceAmount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 备注
|
||||
|
/// </summary>
|
||||
|
[Column("remark")] |
||||
|
[StringLength(200)] |
||||
|
public string Remark { get; set; } |
||||
|
|
||||
|
[Column("concurrency_stamp")] |
||||
|
public string ConcurrencyStamp { get; set; } |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,96 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Domain.Entities; |
||||
|
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
|
namespace Shentun.Peis.Models |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 收款记录
|
||||
|
/// </summary>
|
||||
|
[Table("payment_record")] |
||||
|
public class PaymentRecord : AuditedEntity<Guid>, IHasConcurrencyStamp |
||||
|
{ |
||||
|
public PaymentRecord() { } |
||||
|
|
||||
|
public PaymentRecord(Guid id) : base(id) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///发票申请表id
|
||||
|
/// </summary>
|
||||
|
[Column("invoice_apply_id")] |
||||
|
public Guid InvoiceApplyId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 付款账户
|
||||
|
/// </summary>
|
||||
|
[Column("payment_account")] |
||||
|
[StringLength(50)] |
||||
|
public string PaymentAccount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 付款银行
|
||||
|
/// </summary>
|
||||
|
[Column("payment_bank")] |
||||
|
[StringLength(50)] |
||||
|
public string PaymentBank { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 付款金额
|
||||
|
/// </summary>
|
||||
|
[Column("payment_amount")] |
||||
|
public decimal PaymentAmount { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 付款时间
|
||||
|
/// </summary>
|
||||
|
[Column("payment_time")] |
||||
|
public DateTime? PaymentTime { get; set; } |
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 收款账户
|
||||
|
/// </summary>
|
||||
|
[Column("collection_account")] |
||||
|
[StringLength(50)] |
||||
|
public string CollectionAccount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 收款银行
|
||||
|
/// </summary>
|
||||
|
[Column("collection_bank")] |
||||
|
[StringLength(50)] |
||||
|
public string CollectionBank { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 交易流水号
|
||||
|
/// </summary>
|
||||
|
[Column("Transaction_Id")] |
||||
|
[StringLength(30)] |
||||
|
public string TransactionId{ get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 备注
|
||||
|
/// </summary>
|
||||
|
[Column("remark")] |
||||
|
[StringLength(200)] |
||||
|
public string Remark { get; set; } |
||||
|
|
||||
|
[Column("concurrency_stamp")] |
||||
|
public string ConcurrencyStamp { get; set; } |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,41 @@ |
|||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
||||
|
using Shentun.Peis.EntityFrameworkCore; |
||||
|
using Shentun.Peis.Models; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Shentun.Peis.DbMapping |
||||
|
{ |
||||
|
internal class InvoiceApplyDbMapping : IEntityTypeConfiguration<InvoiceApply> |
||||
|
{ |
||||
|
public void Configure(EntityTypeBuilder<InvoiceApply> entity) |
||||
|
{ |
||||
|
entity.HasComment("发票申请"); |
||||
|
entity.Property(t => t.CustomerOrgId).HasComment("单位编号").IsRequired(); |
||||
|
entity.Property(t => t.CustomerOrgRegisterId).HasComment("单位体检次数id").IsRequired(); |
||||
|
entity.Property(t => t.SalesPerson).HasComment("业务员"); |
||||
|
entity.Property(t => t.ApplyTime).HasComment("申请时间"); |
||||
|
entity.Property(t => t.ApplyAmount).HasComment("申请金额").IsRequired(); |
||||
|
entity.Property(t => t.InvoiceName).HasComment("开票名称"); |
||||
|
entity.Property(t => t.CountryOrgCode).HasComment("税号"); |
||||
|
entity.Property(t => t.Bank).HasComment("业务银行"); |
||||
|
entity.Property(t => t.Accounts).HasComment("银行帐号"); |
||||
|
entity.Property(t => t.Contact).HasComment("联系人"); |
||||
|
entity.Property(t => t.ContactPhone).HasComment("联系电话"); |
||||
|
entity.Property(t => t.IsCompleteInvoicing).HasComment("是否完成开票").IsRequired().HasDefaultValueSql("'N'"); |
||||
|
entity.Property(t => t.IsCompletePayment).HasComment("是否完成收款").IsRequired().HasDefaultValueSql("'N'"); |
||||
|
entity.Property(t => t.Remark).HasComment("备注"); |
||||
|
|
||||
|
|
||||
|
entity.Property(e => e.Id) |
||||
|
.IsFixedLength() |
||||
|
.HasComment("编号").HasColumnName("id"); |
||||
|
|
||||
|
entity.ConfigureByConvention(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
||||
|
using Shentun.Peis.EntityFrameworkCore; |
||||
|
using Shentun.Peis.Models; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Shentun.Peis.DbMapping |
||||
|
{ |
||||
|
|
||||
|
internal class InvoiceRecordDbMapping : IEntityTypeConfiguration<InvoiceRecord> |
||||
|
{ |
||||
|
public void Configure(EntityTypeBuilder<InvoiceRecord> entity) |
||||
|
{ |
||||
|
entity.HasComment("开票记录"); |
||||
|
entity.Property(t => t.InvoiceApplyId).HasComment("发票申请表id").IsRequired(); |
||||
|
entity.Property(t => t.InvoicePerson).HasComment("开票人"); |
||||
|
entity.Property(t => t.InvoiceTime).HasComment("开票时间"); |
||||
|
entity.Property(t => t.InvoiceAmount).HasComment("开票金额").IsRequired(); |
||||
|
entity.Property(t => t.Remark).HasComment("备注"); |
||||
|
|
||||
|
|
||||
|
entity.Property(e => e.Id) |
||||
|
.IsFixedLength() |
||||
|
.HasComment("编号").HasColumnName("id"); |
||||
|
|
||||
|
entity.ConfigureByConvention(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
||||
|
using Shentun.Peis.EntityFrameworkCore; |
||||
|
using Shentun.Peis.Models; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Shentun.Peis.DbMapping |
||||
|
{ |
||||
|
internal class PaymentRecordDbMapping : IEntityTypeConfiguration<PaymentRecord> |
||||
|
{ |
||||
|
public void Configure(EntityTypeBuilder<PaymentRecord> entity) |
||||
|
{ |
||||
|
entity.HasComment("收款记录"); |
||||
|
entity.Property(t => t.InvoiceApplyId).HasComment("发票申请表id").IsRequired(); |
||||
|
entity.Property(t => t.PaymentAccount).HasComment("付款账户"); |
||||
|
entity.Property(t => t.PaymentBank).HasComment("付款银行"); |
||||
|
entity.Property(t => t.PaymentAmount).HasComment("付款金额").IsRequired(); |
||||
|
entity.Property(t => t.PaymentTime).HasComment("付款时间"); |
||||
|
entity.Property(t => t.CollectionAccount).HasComment("收款账户"); |
||||
|
entity.Property(t => t.CollectionBank).HasComment("收款银行"); |
||||
|
entity.Property(t => t.TransactionId).HasComment("交易流水号"); |
||||
|
entity.Property(t => t.Remark).HasComment("备注"); |
||||
|
|
||||
|
|
||||
|
entity.Property(e => e.Id) |
||||
|
.IsFixedLength() |
||||
|
.HasComment("编号").HasColumnName("id"); |
||||
|
|
||||
|
entity.ConfigureByConvention(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue