pet-ai/server/model/pet/pet_records.go

28 lines
2.8 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 自动生成模板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"
}