package model import ( "time" "gorm.io/gorm" ) type BaseModel struct { ID int `json:"id" form:"id" gorm:"primaryKey"` CreateAt time.Time `json:"-" gorm:"autoCreateTime"` //标签autoCreateTime设置如果字段名字不为CreatAt时候自动插入当前时间 UpdateAt time.Time `json:"-" gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `json:"-" gorm:"column:delete_at"` } const ( UserDocStatus_Normal = 0 //文件正常 UserDocStatus_LogicDelete = 1 //删除 UserDocStatus_PermanentlyDelete = 2 //永久删除 UserDocCategory_SelfUpload = 0 //自己上传 UserDocCategory_Download = 1 //转存(下载) UserDocCategory_Collect = 2 //收藏 //es Es_JyDoc = "jydoc" //es中文库的别名 ) var ( DocFileType = map[int]string{1: "doc", 2: "pdf", 3: "xls", 4: "ppt", 5: "txt", 6: "其他"} )