低空智控平台 后端go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
2.0 KiB

package model
import "time"
// InvoiceProfile 用户发票资料
type InvoiceProfile struct {
ID int64 `gorm:"primaryKey;column:id;type:BIGINT;not null" json:"id"`
UserID int64 `gorm:"column:user_id;type:BIGINT;not null;index" json:"userId"`
Title string `gorm:"column:title;type:VARCHAR(128);not null" json:"title"`
TaxpayerNumber string `gorm:"column:taxpayer_number;type:VARCHAR(64);not null" json:"taxpayerNumber"`
Email string `gorm:"column:email;type:VARCHAR(128);not null" json:"email"`
IsDefault bool `gorm:"column:is_default;type:TINYINT;default:0" json:"isDefault"`
CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"`
}
func (InvoiceProfile) TableName() string { return "invoice_profile" }
// InvoiceRequest 人工发票申请
type InvoiceRequest struct {
ID int64 `gorm:"primaryKey;column:id;type:BIGINT;not null" json:"id"`
UserID int64 `gorm:"column:user_id;type:BIGINT;not null;index" json:"userId"`
OrderID int64 `gorm:"column:order_id;type:BIGINT;not null;uniqueIndex" json:"orderId"`
Amount float64 `gorm:"column:amount;type:DECIMAL(10,2);not null" json:"amount"`
Title string `gorm:"column:title;type:VARCHAR(128);not null" json:"title"`
TaxpayerNumber string `gorm:"column:taxpayer_number;type:VARCHAR(64);not null" json:"taxpayerNumber"`
Email string `gorm:"column:email;type:VARCHAR(128);not null" json:"email"`
Status string `gorm:"column:status;type:VARCHAR(16);default:pending" json:"status"`
InvoiceNumber string `gorm:"column:invoice_number;type:VARCHAR(64)" json:"invoiceNumber"`
AdminRemark string `gorm:"column:admin_remark;type:VARCHAR(256)" json:"adminRemark"`
RequestedAt time.Time `gorm:"column:requested_at" json:"requestedAt"`
ProcessedAt *time.Time `gorm:"column:processed_at" json:"processedAt"`
}
func (InvoiceRequest) TableName() string { return "invoice_request" }