mirror of
https://github.com/gowvp/gb28181.git
synced 2026-04-22 15:07:10 +08:00
27 lines
1.2 KiB
Go
Executable File
27 lines
1.2 KiB
Go
Executable File
// Code generated by godddx, DO AVOID EDIT.
|
|
package metadata
|
|
|
|
import "github.com/ixugo/goddd/pkg/orm"
|
|
|
|
// Metadata domain model
|
|
type Metadata struct {
|
|
ID string `gorm:"primaryKey" json:"id"`
|
|
CreatedAt orm.Time `gorm:"column:created_at;notNull;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
|
|
UpdatedAt orm.Time `gorm:"column:updated_at;notNull;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
|
|
CreatedBy string `gorm:"column:created_by;notNull;default:'';comment:创建者" json:"created_by"` // 创建者
|
|
LastUpdatedBy string `gorm:"column:last_updated_by;notNull;default:'';comment:最后更新者" json:"last_updated_by"` // 最后更新者
|
|
Ext string `gorm:"column:ext;type:text;notNull;default:'';comment:序列化的 JSON 字符串" json:"ext"` // 序列化的 JSON 字符串
|
|
}
|
|
|
|
// TableName database table name
|
|
func (*Metadata) TableName() string {
|
|
return "metadatas"
|
|
}
|
|
|
|
// CacheKey 缓存主键,必须唯一
|
|
// godddx 生成缓存代码时,依赖的主键
|
|
// 默认应该是 ID 字段,但也可以自定义
|
|
func (m *Metadata) CacheKey() string {
|
|
return m.ID
|
|
}
|