feat(invoice):基本完成发票相关数据库操作。

This commit is contained in:
徐涛
2023-06-16 13:49:00 +08:00
parent ce2bb160e1
commit db52a140b1
4 changed files with 591 additions and 0 deletions

27
vo/invoice.go Normal file
View File

@@ -0,0 +1,27 @@
package vo
import (
"electricity_bill_calc/model"
"electricity_bill_calc/types"
"github.com/shopspring/decimal"
)
type InvoiceResponse struct {
No string `json:"no" copier:"InvoiceNo"`
Tenement string `json:"tenement"`
Title model.InvoiceTitle `json:"title" copier:"Info"`
IssuedAt types.DateTime `json:"issuedAt"`
Amount decimal.Decimal `json:"amount" copier:"Total"`
TaxMethod int16 `json:"taxMethod"`
TaxRate decimal.Decimal `json:"taxRate"`
InvoiceType string `json:"invoiceType" copier:"Type"`
}
type InvoiceCreationForm struct {
Park string `json:"park"`
Tenement string `json:"tenement"`
TaxMethod int16 `json:"taxMethod"`
TaxRate decimal.NullDecimal `json:"taxRate"`
Covers []string `json:"covers"`
}