// 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 TableNameAccount = "account"

// Account mapped from table <account>
type Account struct {
	ID        int64      `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true;comment:自增id" json:"id"`                                                                // 自增id
	UserID    int64      `gorm:"column:user_id;type:bigint;not null;uniqueIndex:idx_uq_user_coin_type,priority:1;index:idx_user_id,priority:1;comment:用户ID" json:"user_id"` // 用户ID
	CoinID    int64      `gorm:"column:coin_id;type:bigint;not null;uniqueIndex:idx_uq_user_coin_type,priority:2;index:idx_coin_id,priority:1;comment:币种ID" json:"coin_id"` // 币种ID
	Type      string     `gorm:"column:type;type:varchar(100);not null;uniqueIndex:idx_uq_user_coin_type,priority:3;comment:账户类型" json:"type"`                              // 账户类型
	Status    int64      `gorm:"column:status;type:bigint;not null;comment:账号状态:  0:默认  1:正常  2:冻结" json:"status"`                                                          // 账号状态:  0:默认  1:正常  2:冻结
	Amount    float64    `gorm:"column:amount;type:decimal(40,20);not null;comment:金额" json:"amount"`                                                                       // 金额
	CreatedAt *time.Time `gorm:"column:created_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`                                         // 创建时间
	UpdatedAt *time.Time `gorm:"column:updated_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`                                         // 更新时间
}

// TableName Account's table name
func (*Account) TableName() string {
	return TableNameAccount
}
