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.

51 lines
1.3 KiB

package global
import (
"time"
"gorm.io/gorm"
)
type MG_MODEL struct {
ID uint `gorm:"AUTO_INCREMENT;PRIMARY_KEY;" json:"id"` // 主键ID
CreatedAt time.Time `gorm:"index" json:"createdAt"` // 创建时间
UpdatedAt time.Time `gorm:"index" json:"updatedAt"` // 更新时间
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` // 删除时间
}
type TIME_MODEL struct {
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt gorm.DeletedAt `json:"-"`
}
type TIME_MODEL_VIEW 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"`
}