This commit is contained in:
2025-08-06 09:02:16 +08:00
parent 2cddbc3e73
commit c48bae28be
93 changed files with 10628 additions and 36 deletions
@@ -0,0 +1,26 @@
// 自动生成模板PetAdoptionApplications
package pet
import
import (
"time"
pped-aurora/gin-vue-
"gorm.io/datatypes"
)
// petAdoptionApplications表 结构体 PetAdoptionApplications
global.GVA_MODEL
PostId *int `json:"postId" form:"postId" gorm:"comment:领养帖子ID;column:post_id;size:20;" binding:"required"` //领养帖子ID
ApplicantId *int `json:"applicantId" form:"applicantId" gorm:"comment:申请者用户ID;column:applicant_id;size:20;" binding:"required"` //申请者用户ID
ApplicationReason *string `json:"applicationReason" form:"applicationReason" gorm:"comment:申请理由;column:application_reason;" binding:"required"` //申请理由
QuestionnaireAnswers datatypes.JSON `json:"questionnaireAnswers" form:"questionnaireAnswers" gorm:"comment:问卷回答(JSON格式);column:questionnaire_answers;" swaggertype:"object"` //问卷回答(JSON格式)
Status *string `json:"status" form:"status" gorm:"comment:申请状态:pending-待审核,approved-已通过,rejected-已拒绝;column:status;size:20;"` //申请状态:pending-待审核,approved-已通过,rejected-已拒绝
ReviewedAt *time.Time `json:"reviewedAt" form:"reviewedAt" gorm:"comment:审核时间;column:reviewed_at;"` //审核时间
ReviewerNotes *string `json:"reviewerNotes" form:"reviewerNotes" gorm:"comment:审核备注;column:reviewer_notes;"` //审核备注
ReviewerNotes *string `json:"reviewerNotes" form:"reviewerNotes" gorm:"comment:审核备注;column:reviewer_notes;"` //审核备注
}
// TableName petAdoptionApplications表 PetAdoptionApplications自定义表名 pet_adoption_applications
return "pet_adoption_applications"
return "pet_adoption_applications"
}
+39
View File
@@ -0,0 +1,39 @@
// 自动生成模板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"
}
@@ -0,0 +1,19 @@
// 自动生成模板PetAiAssistantConversations
package pet
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
)
// petAiAssistantConversations表 结构体 PetAiAssistantConversations
type PetAiAssistantConversations struct {
global.GVA_MODEL
UserId *int `json:"userId" form:"userId" gorm:"comment:用户ID;column:user_id;size:20;" binding:"required"` //用户ID
MessageContent *string `json:"messageContent" form:"messageContent" gorm:"comment:消息内容;column:message_content;" binding:"required"` //消息内容
Role *string `json:"role" form:"role" gorm:"comment:发送者角色:user-用户,assistant-AI助手;column:role;size:20;" binding:"required"` //发送者角色:user-用户,assistant-AI助手
}
// TableName petAiAssistantConversations表 PetAiAssistantConversations自定义表名 pet_ai_assistant_conversations
func (PetAiAssistantConversations) TableName() string {
return "pet_ai_assistant_conversations"
}
+20
View File
@@ -0,0 +1,20 @@
// 自动生成模板PetAiConversations
package pet
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
)
// petAiConversations表 结构体 PetAiConversations
type PetAiConversations struct {
global.GVA_MODEL
UserId *int `json:"userId" form:"userId" gorm:"comment:用户ID;column:user_id;size:20;" binding:"required"` //用户ID
PetId *int `json:"petId" form:"petId" gorm:"comment:宠物ID;column:pet_id;size:20;" binding:"required"` //宠物ID
MessageContent *string `json:"messageContent" form:"messageContent" gorm:"comment:消息内容;column:message_content;" binding:"required"` //消息内容
Role *string `json:"role" form:"role" gorm:"comment:发送者角色:user-用户,assistant-AI助手;column:role;size:20;" binding:"required"` //发送者角色:user-用户,assistant-AI助手
}
// TableName petAiConversations表 PetAiConversations自定义表名 pet_ai_conversations
func (PetAiConversations) TableName() string {
return "pet_ai_conversations"
}
+21
View File
@@ -0,0 +1,21 @@
// 自动生成模板PetFamilies
package pet
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
)
// petFamilies表 结构体 PetFamilies
type PetFamilies struct {
global.GVA_MODEL
Name *string `json:"name" form:"name" gorm:"comment:家庭名称;column:name;size:100;"` //家庭名称
CreatorId *int `json:"creatorId" form:"creatorId" gorm:"comment:创建者用户ID;column:creator_id;size:20;" binding:"required"` //创建者用户ID
MemberCount *int `json:"memberCount" form:"memberCount" gorm:"comment:当前成员数量;column:member_count;size:10;"` //当前成员数量
MaxMembers *int `json:"maxMembers" form:"maxMembers" gorm:"comment:最大成员数量;column:max_members;size:10;"` //最大成员数量
Description *string `json:"description" form:"description" gorm:"comment:家庭描述;column:description;"` //家庭描述
}
// TableName petFamilies表 PetFamilies自定义表名 pet_families
func (PetFamilies) TableName() string {
return "pet_families"
}
@@ -0,0 +1,24 @@
// 自动生成模板PetFamilyInvitations
package pet
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"time"
)
// petFamilyInvitations表 结构体 PetFamilyInvitations
type PetFamilyInvitations struct {
global.GVA_MODEL
FamilyId *int `json:"familyId" form:"familyId" gorm:"comment:家庭ID;column:family_id;size:20;" binding:"required"` //家庭ID
InviterId *int `json:"inviterId" form:"inviterId" gorm:"comment:邀请者用户ID;column:inviter_id;size:20;" binding:"required"` //邀请者用户ID
InviteePhone *string `json:"inviteePhone" form:"inviteePhone" gorm:"comment:被邀请者手机号;column:invitee_phone;size:20;" binding:"required"` //被邀请者手机号
InvitationCode *string `json:"invitationCode" form:"invitationCode" gorm:"comment:邀请码;column:invitation_code;size:32;" binding:"required"` //邀请码
Status *string `json:"status" form:"status" gorm:"comment:邀请状态:pending-待处理,accepted-已接受,rejected-已拒绝,expired-已过期;column:status;size:20;"` //邀请状态:pending-待处理,accepted-已接受,rejected-已拒绝,expired-已过期
ExpiresAt *time.Time `json:"expiresAt" form:"expiresAt" gorm:"comment:过期时间;column:expires_at;"` //过期时间
Message *string `json:"message" form:"message" gorm:"comment:邀请留言;column:message;size:200;"` //邀请留言
}
// TableName petFamilyInvitations表 PetFamilyInvitations自定义表名 pet_family_invitations
func (PetFamilyInvitations) TableName() string {
return "pet_family_invitations"
}
+22
View File
@@ -0,0 +1,22 @@
// 自动生成模板PetFamilyMembers
package pet
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"time"
)
// petFamilyMembers表 结构体 PetFamilyMembers
type PetFamilyMembers struct {
global.GVA_MODEL
UserId *int `json:"userId" form:"userId" gorm:"comment:用户ID;column:user_id;size:20;" binding:"required"` //用户ID
FamilyId *int `json:"familyId" form:"familyId" gorm:"comment:家庭ID;column:family_id;size:20;" binding:"required"` //家庭ID
Role *string `json:"role" form:"role" gorm:"comment:角色:creator-创建者,member-成员;column:role;size:20;" binding:"required"` //角色:creator-创建者,member-成员
JoinedAt *time.Time `json:"joinedAt" form:"joinedAt" gorm:"comment:加入时间;column:joined_at;"` //加入时间
Nickname *string `json:"nickname" form:"nickname" gorm:"comment:在家庭中的昵称;column:nickname;size:50;"` //在家庭中的昵称
}
// TableName petFamilyMembers表 PetFamilyMembers自定义表名 pet_family_members
func (PetFamilyMembers) TableName() string {
return "pet_family_members"
}
+21
View File
@@ -0,0 +1,21 @@
// 自动生成模板PetFamilyPets
package pet
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"time"
)
// petFamilyPets表 结构体 PetFamilyPets
type PetFamilyPets struct {
global.GVA_MODEL
FamilyId *int `json:"familyId" form:"familyId" gorm:"comment:家庭ID;column:family_id;size:20;" binding:"required"` //家庭ID
PetId *int `json:"petId" form:"petId" gorm:"comment:宠物ID;column:pet_id;size:20;" binding:"required"` //宠物ID
AddedBy *int `json:"addedBy" form:"addedBy" gorm:"comment:添加者用户ID;column:added_by;size:20;" binding:"required"` //添加者用户ID
AddedAt *time.Time `json:"addedAt" form:"addedAt" gorm:"comment:添加时间;column:added_at;" binding:"required"` //添加时间
}
// TableName petFamilyPets表 PetFamilyPets自定义表名 pet_family_pets
func (PetFamilyPets) TableName() string {
return "pet_family_pets"
}
+29
View File
@@ -0,0 +1,29 @@
// 自动生成模板PetPets
package pet
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"time"
)
// petPets表 结构体 PetPets
type PetPets struct {
global.GVA_MODEL
AvatarUrl *string `json:"avatarUrl" form:"avatarUrl" gorm:"comment:宠物头像URL;column:avatar_url;size:500;"` //宠物头像URL
Name *string `json:"name" form:"name" gorm:"comment:宠物名字;column:name;size:100;" binding:"required"` //宠物名字
PetType *string `json:"petType" form:"petType" gorm:"comment:宠物类型:cat-猫咪,dog-狗狗;column:pet_type;size:20;"` //宠物类型:cat-猫咪,dog-狗狗
Breed *string `json:"breed" form:"breed" gorm:"comment:品种;column:breed;size:100;"` //品种
Gender *string `json:"gender" form:"gender" gorm:"comment:性别:male-公,female-母;column:gender;size:20;"` //性别:male-公,female-母
IsNeutered *bool `json:"isNeutered" form:"isNeutered" gorm:"comment:是否绝育:0-否,1-是;column:is_neutered;"` //是否绝育:0-否,1-是
BirthDate *time.Time `json:"birthDate" form:"birthDate" gorm:"comment:出生日期;column:birth_date;"` //出生日期
AdoptionDate *time.Time `json:"adoptionDate" form:"adoptionDate" gorm:"comment:到家日期;column:adoption_date;"` //到家日期
Weight *float64 `json:"weight" form:"weight" gorm:"comment:体重(单位:kg);column:weight;size:5;"` //体重(单位:kg)
Personality *string `json:"personality" form:"personality" gorm:"comment:性格描述;column:personality;"` //性格描述
Prompt *string `json:"prompt" form:"prompt" gorm:"comment:宠物提示词/个性化描述;column:prompt;"` //宠物提示词/个性化描述
CreatorId *int `json:"creatorId" form:"creatorId" gorm:"comment:创建者用户ID;column:creator_id;size:20;" binding:"required"` //创建者用户ID
}
// TableName petPets表 PetPets自定义表名 pet_pets
func (PetPets) TableName() string {
return "pet_pets"
}
+27
View File
@@ -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"
}
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetAdoptionApplicationsSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetAdoptionPostsSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetAiAssistantConversationsSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetAiConversationsSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}
+11
View File
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetFamiliesSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetFamilyInvitationsSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetFamilyMembersSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetFamilyPetsSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}
+11
View File
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetPetsSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}
+11
View File
@@ -0,0 +1,11 @@
package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"time"
)
type PetRecordsSearch struct {
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
request.PageInfo
}