This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"quyun/v2/pkg/fields"
|
||||
|
||||
"go.ipao.vip/gen"
|
||||
"go.ipao.vip/gen/types"
|
||||
)
|
||||
@@ -16,14 +18,14 @@ const TableNameMedia = "medias"
|
||||
|
||||
// Media mapped from table <medias>
|
||||
type Media struct {
|
||||
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;type:timestamp without time zone;not null;default:now()" json:"created_at"`
|
||||
Name string `gorm:"column:name;type:character varying(255);not null" json:"name"`
|
||||
MimeType string `gorm:"column:mime_type;type:character varying(128);not null" json:"mime_type"`
|
||||
Size int64 `gorm:"column:size;type:bigint;not null" json:"size"`
|
||||
Path string `gorm:"column:path;type:character varying(255);not null" json:"path"`
|
||||
Metas types.JSON `gorm:"column:metas;type:jsonb;not null;default:{}" json:"metas"`
|
||||
Hash string `gorm:"column:hash;type:character varying(64);not null" json:"hash"`
|
||||
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;type:timestamp without time zone;not null;default:now()" json:"created_at"`
|
||||
Name string `gorm:"column:name;type:character varying(255);not null" json:"name"`
|
||||
MimeType string `gorm:"column:mime_type;type:character varying(128);not null" json:"mime_type"`
|
||||
Size int64 `gorm:"column:size;type:bigint;not null" json:"size"`
|
||||
Path string `gorm:"column:path;type:character varying(255);not null" json:"path"`
|
||||
Metas types.JSONType[fields.MediaMetas] `gorm:"column:metas;type:jsonb;not null;default:{}" json:"metas"`
|
||||
Hash string `gorm:"column:hash;type:character varying(64);not null" json:"hash"`
|
||||
}
|
||||
|
||||
// Quick operations without importing query package
|
||||
|
||||
Reference in New Issue
Block a user