You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.5 KiB

package global
import (
"time"
"gorm.io/gorm"
)
type MG_MODEL struct {
ID uint `gorm:"AUTO_INCREMENT;PRIMARY_KEY;" json:"id"` // 主键ID
Appid string `gorm:"size:50;comment:应用ID" json:"appid" ` // 应用ID
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
DeletedAt gorm.DeletedAt `json:"-"` // 删除时间
}
type Pure_MODEL struct {
ID uint `gorm:"AUTO_INCREMENT;PRIMARY_KEY;" json:"id"` // 主键ID
CreatedAt time.Time `json:"created_at"` // 创建时间
UpdatedAt time.Time `json:"updated_at"` // 更新时间
}
type Base_MODEL struct {
ID uint `gorm:"AUTO_INCREMENT;PRIMARY_KEY;" json:"id"` // 主键ID
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
DeletedAt gorm.DeletedAt `json:"-"` // 删除时间
}
type TIME_MODEL struct {
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt gorm.DeletedAt `json:"-"`
}
type TIME_MODEL_VIEW struct {
CreatedAtUnix int64 `gorm:"-" json:"createdAt"` //创建时间
UpdatedAtUnix int64 `gorm:"-" json:"updatedAt"` //更新时间
}
type TIME_MODEL_STR struct {
CreatedAtStr string `gorm:"-" json:"createdAt"` //创建时间
UpdatedAtStr string `gorm:"-" json:"updatedAt"` //更新时间
}
type BASE_ID_STR struct {
ID string `gorm:"primary_key;size:50" json:"id" form:"id"` //主键
}
type ID_BACKUP_STR struct {
ID string `gorm:"primary_key;size:50" json:"id" form:"id"` //主键
// Kid int `json:"kid" form:"kid"`
Backup int `json:"backup" form:"backup"`
Check int `json:"check" form:"check"`
CurrentCheck string `json:"currentCheck" form:"currentCheck"`
}
type BASE_ID struct {
ID uint `gorm:"AUTO_INCREMENT;primary_key;" json:"id" form:"id"` //主键
}
type ID_SORT struct {
ID string `json:"id"`
Sort int `json:"sort"`
}
type ID_COUNT struct {
ID string `json:"id"`
Count int `json:"count"`
}
type MG_Video struct {
Resolution string `gorm:"size:100" json:"resolution" ignore:"true"` //分辨率 逗号隔开
ProcessStatus int `gorm:"type:int(1);default:0" json:"processStatus" ignore:"true"` //转码状态 0-未转码 1-已转码 2-转码失败
}