package models

import (
	"go-admin/common/models"

	"github.com/shopspring/decimal"
)

type MemberBalance struct {
	models.Model

	UserId       int             `json:"userId" gorm:"type:bigint;comment:用户id"`
	TotalAmount  decimal.Decimal `json:"totalAmount" gorm:"type:decimal(18,6);comment:总余额"`
	FreeAmount   decimal.Decimal `json:"freeAmount" gorm:"type:decimal(18,6);comment:可用余额"`
	FrozenAmount decimal.Decimal `json:"frozenAmount" gorm:"type:decimal(18,6);comment:冻结金额"`
	models.ModelTime
	models.ControlBy
}

func (MemberBalance) TableName() string {
	return "member_balance"
}

func (e *MemberBalance) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *MemberBalance) GetId() interface{} {
	return e.Id
}
