// Code generated by gorm.io/gen. DO NOT EDIT. // Code generated by gorm.io/gen. DO NOT EDIT. // Code generated by gorm.io/gen. DO NOT EDIT. package entity import ( "time" ) const TableNameMaterial = "materials" // Material mapped from table type Material struct { ID int64 `gorm:"column:id;type:int;primaryKey;autoIncrement:true" json:"id"` // 素材ID Name string `gorm:"column:name;type:varchar(100);not null" json:"name"` // 素材名称 File string `gorm:"column:file;type:varchar(255);not null" json:"file"` // 素材地址 Size string `gorm:"column:size;type:varchar(20);not null;default:0x0" json:"size"` // 素材尺寸 FileSize int64 `gorm:"column:file_size;type:int;not null" json:"file_size"` // 素材大小 Hash string `gorm:"column:hash;type:char(32);not null" json:"hash"` // 素材文件hash Type string `gorm:"column:type;type:varchar(10);not null;default:material" json:"type"` // 素材类型 UID int64 `gorm:"column:uid;type:int;not null" json:"uid"` // 上传用户 Status int64 `gorm:"column:status;type:tinyint;not null;default:1" json:"status"` // 素材状态 CreateAt time.Time `gorm:"column:create_at;type:timestamp;not null" json:"create_at"` // 创建时间 UpdateAt time.Time `gorm:"column:update_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"update_at"` // 更新时间 } // TableName Material's table name func (*Material) TableName() string { return TableNameMaterial }