// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package model

import (
	"time"
)

const TableNameOrder = "order"

// Order mapped from table <order>
type Order struct {
	ID                 uint64     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	OrderNo            string     `gorm:"column:order_no;not null" json:"order_no"`
	VoucherNo          string     `gorm:"column:voucher_no;not null" json:"voucher_no"`
	OutBizNo           string     `gorm:"column:out_biz_no;not null;comment:外部交易号" json:"out_biz_no"`                     // 外部交易号
	ProductNo          string     `gorm:"column:product_no;not null;comment:商品编号" json:"product_no"`                      // 商品编号
	BatchNo            string     `gorm:"column:batch_no;not null;comment:立减金批次号" json:"batch_no"`                        // 立减金批次号
	ActivityId         string     `gorm:"column:activity_id;not null;comment:activity_id" json:"activity_id"`             // activity_id
	Account            string     `gorm:"column:account;not null;comment:充值账号" json:"account"`                            // 充值账号
	AccountType        uint8      `gorm:"column:account_type;not null;comment:1:oepnid/userid 2:手机号" json:"account_type"` // 1:oepnid/userid 2:手机号
	Type               uint8      `gorm:"column:type;not null;comment:1:招行" json:"type"`
	Status             uint8      `gorm:"column:status;not null;comment:1:待发放 2:发放中 3:发放成功 4:发放失败" json:"status"` // 1:待发放 2:发放中 3:发放成功 4:发放失败
	AppID              string     `gorm:"column:app_id;not null;comment:批次所属应用" json:"app_id"`                    // 批次所属应用
	MerchantNo         string     `gorm:"column:merchant_no;not null;comment:创建批次号的商户号" json:"merchant_no"`       // 创建批次号的商户号
	NotifyUrl          string     `gorm:"column:notify_url;not null;comment:回调地址" json:"notify_url"`
	Channel            uint8      `gorm:"column:channel;not null;comment:1:微信 2:支付宝" json:"channel"` // 1:微信 2:支付宝
	Remark             string     `gorm:"column:remark;not null;comment:remark" json:"remark"`
	Attach             string     `gorm:"column:attach;not null;comment:attach" json:"attach"`
	ReceiveSuccessTime *time.Time `gorm:"column:receive_success_time" json:"receive_success_time"`
	LastUseTime        *time.Time `gorm:"column:last_use_time" json:"last_use_time"`
	TransactionId      string     `gorm:"column:transaction_id;not null" json:"transaction_id"`
	CreateTime         *time.Time `gorm:"column:create_time" json:"create_time"`
	UpdateTime         *time.Time `gorm:"column:update_time" json:"update_time"`
}

// TableName Order's table name
func (*Order) TableName() string {
	return TableNameOrder
}
