namespace TakeoutSaaS.TenantApi.Contracts.Finance; /// /// 保存发票设置请求。 /// public sealed class FinanceInvoiceSettingSaveRequest { /// /// 企业名称。 /// public string CompanyName { get; set; } = string.Empty; /// /// 纳税人识别号。 /// public string TaxpayerNumber { get; set; } = string.Empty; /// /// 注册地址。 /// public string? RegisteredAddress { get; set; } /// /// 注册电话。 /// public string? RegisteredPhone { get; set; } /// /// 开户银行。 /// public string? BankName { get; set; } /// /// 银行账号。 /// public string? BankAccount { get; set; } /// /// 是否启用电子普通发票。 /// public bool EnableElectronicNormalInvoice { get; set; } = true; /// /// 是否启用电子专用发票。 /// public bool EnableElectronicSpecialInvoice { get; set; } /// /// 是否启用自动开票。 /// public bool EnableAutoIssue { get; set; } /// /// 自动开票单张最大金额。 /// public decimal AutoIssueMaxAmount { get; set; } = 10_000m; } /// /// 发票记录列表请求。 /// public sealed class FinanceInvoiceRecordListRequest { /// /// 开始日期(yyyy-MM-dd)。 /// public string? StartDate { get; set; } /// /// 结束日期(yyyy-MM-dd)。 /// public string? EndDate { get; set; } /// /// 状态(pending/issued/voided)。 /// public string? Status { get; set; } /// /// 类型(normal/special)。 /// public string? InvoiceType { get; set; } /// /// 关键词(发票号/公司名/申请人)。 /// public string? Keyword { get; set; } /// /// 页码。 /// public int Page { get; set; } = 1; /// /// 每页条数。 /// public int PageSize { get; set; } = 10; } /// /// 发票记录详情请求。 /// public sealed class FinanceInvoiceRecordDetailRequest { /// /// 发票记录 ID。 /// public string RecordId { get; set; } = string.Empty; } /// /// 发票开票请求。 /// public sealed class FinanceInvoiceRecordIssueRequest { /// /// 发票记录 ID。 /// public string RecordId { get; set; } = string.Empty; /// /// 接收邮箱(可选)。 /// public string? ContactEmail { get; set; } /// /// 开票备注。 /// public string? IssueRemark { get; set; } } /// /// 发票作废请求。 /// public sealed class FinanceInvoiceRecordVoidRequest { /// /// 发票记录 ID。 /// public string RecordId { get; set; } = string.Empty; /// /// 作废原因。 /// public string VoidReason { get; set; } = string.Empty; } /// /// 发票申请请求。 /// public sealed class FinanceInvoiceRecordApplyRequest { /// /// 申请人。 /// public string ApplicantName { get; set; } = string.Empty; /// /// 开票抬头(公司名)。 /// public string CompanyName { get; set; } = string.Empty; /// /// 纳税人识别号。 /// public string? TaxpayerNumber { get; set; } /// /// 发票类型(normal/special)。 /// public string InvoiceType { get; set; } = "normal"; /// /// 开票金额。 /// public decimal Amount { get; set; } /// /// 关联订单号。 /// public string OrderNo { get; set; } = string.Empty; /// /// 接收邮箱。 /// public string? ContactEmail { get; set; } /// /// 联系电话。 /// public string? ContactPhone { get; set; } /// /// 申请备注。 /// public string? ApplyRemark { get; set; } /// /// 申请时间(可空)。 /// public DateTime? AppliedAt { get; set; } } /// /// 发票设置响应。 /// public sealed class FinanceInvoiceSettingResponse { /// /// 企业名称。 /// public string CompanyName { get; set; } = string.Empty; /// /// 纳税人识别号。 /// public string TaxpayerNumber { get; set; } = string.Empty; /// /// 注册地址。 /// public string? RegisteredAddress { get; set; } /// /// 注册电话。 /// public string? RegisteredPhone { get; set; } /// /// 开户银行。 /// public string? BankName { get; set; } /// /// 银行账号。 /// public string? BankAccount { get; set; } /// /// 是否启用电子普通发票。 /// public bool EnableElectronicNormalInvoice { get; set; } /// /// 是否启用电子专用发票。 /// public bool EnableElectronicSpecialInvoice { get; set; } /// /// 是否启用自动开票。 /// public bool EnableAutoIssue { get; set; } /// /// 自动开票单张最大金额。 /// public decimal AutoIssueMaxAmount { get; set; } } /// /// 发票统计响应。 /// public sealed class FinanceInvoiceStatsResponse { /// /// 本月已开票金额。 /// public decimal CurrentMonthIssuedAmount { get; set; } /// /// 本月已开票张数。 /// public int CurrentMonthIssuedCount { get; set; } /// /// 待开票数量。 /// public int PendingCount { get; set; } /// /// 已作废数量。 /// public int VoidedCount { get; set; } } /// /// 发票记录列表项响应。 /// public sealed class FinanceInvoiceRecordResponse { /// /// 记录 ID。 /// public string RecordId { get; set; } = string.Empty; /// /// 发票号码。 /// public string InvoiceNo { get; set; } = string.Empty; /// /// 申请人。 /// public string ApplicantName { get; set; } = string.Empty; /// /// 开票抬头(公司名)。 /// public string CompanyName { get; set; } = string.Empty; /// /// 发票类型编码。 /// public string InvoiceType { get; set; } = string.Empty; /// /// 发票类型文案。 /// public string InvoiceTypeText { get; set; } = string.Empty; /// /// 金额。 /// public decimal Amount { get; set; } /// /// 关联订单号。 /// public string OrderNo { get; set; } = string.Empty; /// /// 状态编码。 /// public string Status { get; set; } = string.Empty; /// /// 状态文案。 /// public string StatusText { get; set; } = string.Empty; /// /// 申请时间(本地显示字符串)。 /// public string AppliedAt { get; set; } = string.Empty; } /// /// 发票记录详情响应。 /// public sealed class FinanceInvoiceRecordDetailResponse { /// /// 记录 ID。 /// public string RecordId { get; set; } = string.Empty; /// /// 发票号码。 /// public string InvoiceNo { get; set; } = string.Empty; /// /// 申请人。 /// public string ApplicantName { get; set; } = string.Empty; /// /// 开票抬头(公司名)。 /// public string CompanyName { get; set; } = string.Empty; /// /// 纳税人识别号。 /// public string? TaxpayerNumber { get; set; } /// /// 发票类型编码。 /// public string InvoiceType { get; set; } = string.Empty; /// /// 发票类型文案。 /// public string InvoiceTypeText { get; set; } = string.Empty; /// /// 金额。 /// public decimal Amount { get; set; } /// /// 关联订单号。 /// public string OrderNo { get; set; } = string.Empty; /// /// 接收邮箱。 /// public string? ContactEmail { get; set; } /// /// 联系电话。 /// public string? ContactPhone { get; set; } /// /// 申请备注。 /// public string? ApplyRemark { get; set; } /// /// 状态编码。 /// public string Status { get; set; } = string.Empty; /// /// 状态文案。 /// public string StatusText { get; set; } = string.Empty; /// /// 申请时间(本地显示字符串)。 /// public string AppliedAt { get; set; } = string.Empty; /// /// 开票时间(本地显示字符串)。 /// public string? IssuedAt { get; set; } /// /// 开票人 ID。 /// public string? IssuedByUserId { get; set; } /// /// 开票备注。 /// public string? IssueRemark { get; set; } /// /// 作废时间(本地显示字符串)。 /// public string? VoidedAt { get; set; } /// /// 作废人 ID。 /// public string? VoidedByUserId { get; set; } /// /// 作废原因。 /// public string? VoidReason { get; set; } } /// /// 发票开票结果响应。 /// public sealed class FinanceInvoiceIssueResultResponse { /// /// 记录 ID。 /// public string RecordId { get; set; } = string.Empty; /// /// 发票号码。 /// public string InvoiceNo { get; set; } = string.Empty; /// /// 开票抬头。 /// public string CompanyName { get; set; } = string.Empty; /// /// 金额。 /// public decimal Amount { get; set; } /// /// 接收邮箱。 /// public string? ContactEmail { get; set; } /// /// 开票时间(本地显示字符串)。 /// public string IssuedAt { get; set; } = string.Empty; /// /// 状态编码。 /// public string Status { get; set; } = string.Empty; /// /// 状态文案。 /// public string StatusText { get; set; } = string.Empty; } /// /// 发票记录分页响应。 /// public sealed class FinanceInvoiceRecordListResultResponse { /// /// 列表项。 /// public List Items { get; set; } = []; /// /// 页码。 /// public int Page { get; set; } /// /// 每页条数。 /// public int PageSize { get; set; } /// /// 总条数。 /// public int TotalCount { get; set; } /// /// 统计。 /// public FinanceInvoiceStatsResponse Stats { get; set; } = new(); }