fusenapi/model/gmodel/fs_user_material_gen.go

28 lines
1.1 KiB
Go
Raw Normal View History

2023-08-02 10:14:53 +00:00
package gmodel
import (
"gorm.io/gorm"
2023-09-01 02:27:28 +00:00
"time"
2023-08-02 10:14:53 +00:00
)
// fs_user_material 用户素材表
type FsUserMaterial struct {
2023-09-01 02:27:28 +00:00
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // 用户 ID
Module *string `gorm:"default:'';" json:"module"` //
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户 ID
GuestId *int64 `gorm:"index;default:0;" json:"guest_id"` // 游客 ID
ResourceId *string `gorm:"default:'';" json:"resource_id"` //
ResourceUrl *string `gorm:"default:'';" json:"resource_url"` //
Metadata *[]byte `gorm:"default:'';" json:"metadata"` //
2023-09-01 07:04:18 +00:00
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` // 上传时间
LogoId *int64 `gorm:"index;default:0;" json:"logo_id"` // logo库ID
2023-08-02 10:14:53 +00:00
}
type FsUserMaterialModel struct {
db *gorm.DB
name string
}
func NewFsUserMaterialModel(db *gorm.DB) *FsUserMaterialModel {
return &FsUserMaterialModel{db: db, name: "fs_user_material"}
}