Documentation ¶
Index ¶
- Constants
- type MMedia
- func (p *MMedia) Create() error
- func (p *MMedia) GetId() int64
- func (p *MMedia) GetMeta() []MMeta
- func (p *MMedia) GetName() string
- func (p *MMedia) GetPart() string
- func (p *MMedia) GetPath() string
- func (p *MMedia) GetSign() string
- func (p *MMedia) GetType() string
- func (p *MMedia) GetUrl() string
- func (p *MMedia) TableName() string
- func (p *MMedia) Update(data MMedia) error
- type MMeta
- type Media
Constants ¶
View Source
const ( SKU = "sku" MEDIA = "media" MediaTypeImg = "img" MediaTypePdf = "pdf" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MMedia ¶ added in v0.0.4
type MMedia struct { ID int64 `gorm:"column:id;primaryKey"` Sign string `gorm:"column:sign"` //唯一标识 Type string `gorm:"column:type"` //资源类型 Name string `gorm:"column:name"` //资源名称 Path string `gorm:"column:path"` //资源路径 Meta string `gorm:"column:meta"` //资源属性 Url string `gorm:"-" json:"url"` CreatedAt string `gorm:"column:created_at;->"` //创建时间 UpdatedAt string `gorm:"column:updated_at;->"` //更新时间 }
type MMeta ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.