// 自动生成模板PetAdoptionPosts package pet import ( "github.com/flipped-aurora/gin-vue-admin/server/global" "gorm.io/datatypes" "time" ) // petAdoptionPosts表 结构体 PetAdoptionPosts type PetAdoptionPosts struct { global.GVA_MODEL PublisherId *int `json:"publisherId" form:"publisherId" gorm:"comment:发布者用户ID;column:publisher_id;size:20;" binding:"required"` //发布者用户ID PetName *string `json:"petName" form:"petName" gorm:"comment:宠物名字;column:pet_name;size:100;"` //宠物名字 PetAge *int `json:"petAge" form:"petAge" gorm:"comment:宠物年龄(月);column:pet_age;size:10;"` //宠物年龄(月) PetGender *string `json:"petGender" form:"petGender" gorm:"comment:宠物性别:male-公,female-母;column:pet_gender;size:20;"` //宠物性别:male-公,female-母 IsNeutered *bool `json:"isNeutered" form:"isNeutered" gorm:"comment:是否绝育:0-否,1-是;column:is_neutered;"` //是否绝育:0-否,1-是 Breed *string `json:"breed" form:"breed" gorm:"comment:品种;column:breed;size:100;"` //品种 Weight *float64 `json:"weight" form:"weight" gorm:"comment:体重(单位:kg);column:weight;size:5;"` //体重(单位:kg) Personality *string `json:"personality" form:"personality" gorm:"comment:性格描述;column:personality;"` //性格描述 Content *string `json:"content" form:"content" gorm:"comment:领养帖子内容描述;column:content;" binding:"required"` //领养帖子内容描述 City *string `json:"city" form:"city" gorm:"comment:所在城市;column:city;size:100;"` //所在城市 Images datatypes.JSON `json:"images" form:"images" gorm:"comment:宠物图片URLs(JSON数组);column:images;" swaggertype:"array,object"` //宠物图片URLs(JSON数组) Videos datatypes.JSON `json:"videos" form:"videos" gorm:"comment:宠物视频URLs(JSON数组);column:videos;" swaggertype:"array,object"` //宠物视频URLs(JSON数组) HealthStatus *string `json:"healthStatus" form:"healthStatus" gorm:"comment:健康状况:healthy-健康,sick-生病;column:health_status;size:20;"` //健康状况:healthy-健康,sick-生病 HealthDescription *string `json:"healthDescription" form:"healthDescription" gorm:"comment:健康状况详细描述;column:health_description;"` //健康状况详细描述 AdoptionRequirements *string `json:"adoptionRequirements" form:"adoptionRequirements" gorm:"comment:领养要求和条件;column:adoption_requirements;"` //领养要求和条件 Questionnaire datatypes.JSON `json:"questionnaire" form:"questionnaire" gorm:"comment:领养问卷配置(JSON格式);column:questionnaire;" swaggertype:"object"` //领养问卷配置(JSON格式) Deadline *time.Time `json:"deadline" form:"deadline" gorm:"comment:申请截止时间;column:deadline;"` //申请截止时间 ContactPhone *string `json:"contactPhone" form:"contactPhone" gorm:"comment:联系电话;column:contact_phone;size:20;"` //联系电话 Status *string `json:"status" form:"status" gorm:"comment:帖子状态:active-活跃,closed-已关闭,expired-已过期;column:status;size:20;"` //帖子状态:active-活跃,closed-已关闭,expired-已过期 ViewCount *int `json:"viewCount" form:"viewCount" gorm:"comment:浏览次数;column:view_count;size:10;"` //浏览次数 ApplicationCount *int `json:"applicationCount" form:"applicationCount" gorm:"comment:申请次数;column:application_count;size:10;"` //申请次数 } // TableName petAdoptionPosts表 PetAdoptionPosts自定义表名 pet_adoption_posts func (PetAdoptionPosts) TableName() string { return "pet_adoption_posts" }