package models import "time" const TableNameSmsCodeSend = "sms_code_sends" // SmsCodeSend mapped from table type SmsCodeSend struct { ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true" json:"id"` Phone string `gorm:"column:phone;type:character varying(20);not null" json:"phone"` Code string `gorm:"column:code;type:character varying(20);not null" json:"code"` SentAt time.Time `gorm:"column:sent_at;type:timestamp without time zone;not null;default:now()" json:"sent_at"` ExpiresAt time.Time `gorm:"column:expires_at;type:timestamp without time zone;not null" json:"expires_at"` } func (*SmsCodeSend) TableName() string { return TableNameSmsCodeSend }