Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct {
ID uint64 `gorm:"column:id;AUTO_INCREMENT;primary_key" json:"id"`
CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
DeletedAt time.Time `gorm:"column:deleted_at" json:"deleted_at"`
Status int8 `gorm:"column:status" json:"status"` // 记录状态: -1=删除 0=可正常使用
Version int8 `gorm:"column:version" json:"version"` // 数据库版本
}
func (*BaseModel) BeforeCreate ¶
func (model *BaseModel) BeforeCreate()
func (*BaseModel) BeforeDelete ¶
func (model *BaseModel) BeforeDelete()
func (*BaseModel) BeforeUpdate ¶
func (model *BaseModel) BeforeUpdate()
type DMB ¶
type DMB struct {
Title string
Creator string
Description string
Abstract string `json:"abstract"` // 文章摘要
Publisher string
Type string
Contributors []string
Format string
Language string
License string // 最好是一个url
Source string
Subject string `json:"subject"`
GID string
PID string
ID uint64
Version int8
Modified string
Medium string
CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
DeletedAt time.Time `gorm:"column:deleted_at" json:"deleted_at"`
Status int8 `gorm:"column:status" json:"status"` // 记录状态: -1=删除 0=可正常使用
}
Dublin Metadata base
Click to show internal directories.
Click to hide internal directories.