12345678910111213141516171819202122 |
- package model
- import (
- "gorm.io/gorm"
- "time"
- )
- 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 //收藏
- )
|