portal/db/models/sc_price_history.go

27 lines
445 B
Go
Raw Normal View History

2024-03-10 16:41:42 +00:00
package models
import (
"time"
"github.com/shopspring/decimal"
2024-03-10 16:41:42 +00:00
"gorm.io/gorm"
"gorm.io/gorm/schema"
2024-03-10 16:41:42 +00:00
)
var _ schema.Tabler = (*SCPriceHistory)(nil)
2024-03-10 16:41:42 +00:00
func init() {
registerModel(&SCPriceHistory{})
}
type SCPriceHistory struct {
gorm.Model
CreatedAt time.Time `gorm:"index:idx_rate"`
2024-03-11 11:57:09 +00:00
Rate decimal.Decimal `gorm:"type:DECIMAL(30,20);index:idx_rate"`
2024-03-10 16:41:42 +00:00
}
func (SCPriceHistory) TableName() string {
return "sc_price_history"
}