package gorm_model

import (
	"time"
)

type YounggeeSupplierInvoice struct {
	InvoiceId         int        `gorm:"column:invoice_id;primary_key;AUTO_INCREMENT"` // 服务商回票ID
	SupplierId        int        `gorm:"column:supplier_id"`                           // 服务商ID
	IncomeIds         string     `gorm:"column:income_ids"`                            // 服务商收入ID
	InvoiceStatus     int        `gorm:"column:invoice_status"`                        // 回票状态，1待传发票，2平台确认中，3已回发票，4发票驳回
	InvoiceUrl        string     `gorm:"column:invoice_url"`                           // 发票url
	SOperator         int        `gorm:"column:s_operator"`                            // 服务商回票操作人
	SOperatorType     int        `gorm:"column:s_operator_type"`                       // 服务商回票操作人类型，1主，2子
	UploadInvoiceTime *time.Time `gorm:"column:upload_invoice_time"`                   // 上传发票时间
	AgreeTime         *time.Time `gorm:"column:agree_time"`                            // 同意时间
	RejectTime        *time.Time `gorm:"column:reject_time"`                           // 驳回开票时间
	FailReason        string     `gorm:"column:fail_reason"`                           // 驳回理由
	Company           string     `gorm:"column:company"`                               // 开票公司
}

func (m *YounggeeSupplierInvoice) TableName() string {
	return "younggee_supplier_invoice"
}
