2024-03-10 16:41:42 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"gorm.io/gorm"
|
2024-03-10 17:58:45 +00:00
|
|
|
"gorm.io/gorm/schema"
|
2024-03-10 16:41:42 +00:00
|
|
|
)
|
|
|
|
|
2024-03-10 17:58:45 +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"`
|
|
|
|
Rate float64 `gorm:"index:idx_rate"`
|
|
|
|
}
|
2024-03-10 17:58:45 +00:00
|
|
|
|
|
|
|
func (SCPriceHistory) TableName() string {
|
|
|
|
return "sc_price_history"
|
|
|
|
}
|