This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// 自动生成模板PetRecords
|
||||
package pet
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"gorm.io/datatypes"
|
||||
"time"
|
||||
)
|
||||
|
||||
// petRecords表 结构体 PetRecords
|
||||
type PetRecords struct {
|
||||
global.GVA_MODEL
|
||||
PetId *int `json:"petId" form:"petId" gorm:"comment:关联的宠物ID;column:pet_id;size:20;" binding:"required"` //关联的宠物ID
|
||||
RecordType *string `json:"recordType" form:"recordType" gorm:"comment:记录类型:casual-随手记,milestone-大事记,daily-日常记录,health-健康记录,grooming-洗护记录,cleaning-清洁记录;column:record_type;size:20;" binding:"required"` //记录类型:casual-随手记,milestone-大事记,daily-日常记录,health-健康记录,grooming-洗护记录,cleaning-清洁记录
|
||||
RecordTime *time.Time `json:"recordTime" form:"recordTime" gorm:"comment:记录时间;column:record_time;" binding:"required"` //记录时间
|
||||
Content *string `json:"content" form:"content" gorm:"comment:具体内容(JSON格式,根据记录类型存储不同结构);column:content;"` //具体内容(JSON格式,根据记录类型存储不同结构)
|
||||
Description *string `json:"description" form:"description" gorm:"comment:文字内容描述;column:description;"` //文字内容描述
|
||||
ImageUrls datatypes.JSON `json:"imageUrls" form:"imageUrls" gorm:"comment:图片URLs(JSON数组);column:image_urls;" swaggertype:"array,object"` //图片URLs(JSON数组)
|
||||
VideoUrls datatypes.JSON `json:"videoUrls" form:"videoUrls" gorm:"comment:视频URLs(JSON数组);column:video_urls;" swaggertype:"array,object"` //视频URLs(JSON数组)
|
||||
Visibility *string `json:"visibility" form:"visibility" gorm:"comment:可见范围:public-公开,family-家人,private-私有;column:visibility;size:20;"` //可见范围:public-公开,family-家人,private-私有
|
||||
CreatorId *int `json:"creatorId" form:"creatorId" gorm:"comment:创建者用户ID;column:creator_id;size:20;" binding:"required"` //创建者用户ID
|
||||
}
|
||||
|
||||
// TableName petRecords表 PetRecords自定义表名 pet_records
|
||||
func (PetRecords) TableName() string {
|
||||
return "pet_records"
|
||||
}
|
||||
Reference in New Issue
Block a user