1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-04 23:13:53 +08:00
parent 7589306faa
commit e65b50dd33
2 changed files with 19 additions and 16 deletions

View File

@@ -12,13 +12,14 @@ const (
type PetFusion struct {
*cool.Model // 嵌入通用ModelID/创建时间/更新时间等)
MainPetID int32 `gorm:"not null;comment:'主宠物ID尼尔'" json:"main_pet_id"`
SubPetID int32 `gorm:"not null;comment:'副宠物ID闪皮'" json:"sub_pet_id"`
Probability int32 `gorm:"not null;comment:'融合成功率百分比如80代表80%'" json:"probability"`
ResultPetID int32 `gorm:"not null;comment:'融合结果宠物ID卡鲁、闪尼'" json:"result_pet_id"`
Remark string `gorm:"type:varchar(255);default:'';comment:'融合配方备注(如:尼尔+闪皮=闪尼)'" json:"remark"`
IsEnable int32 `gorm:"not null;default:1;comment:'是否启用1:启用0:禁用'" json:"is_enable"`
IsDefault int32 `gorm:"not null;default:0;comment:'是否默认配方1:默认配方0:非默认;所有配方不匹配时随机选默认配方'" json:"is_default"`
MainPetID int32 `gorm:"not null;comment:'主宠物ID尼尔'" json:"main_pet_id"`
SubPetID int32 `gorm:"not null;comment:'副宠物ID闪皮'" json:"sub_pet_id"`
SubPetIDs []int32 `gorm:"type:int[];comment:'副宠物IDs1,2,3'" json:"sub_pet_ids"`
Probability int32 `gorm:"not null;comment:'融合成功率百分比如80代表80%'" json:"probability"`
ResultPetID int32 `gorm:"not null;comment:'融合结果宠物ID卡鲁、闪尼)'" json:"result_pet_id"`
Remark string `gorm:"type:varchar(255);default:'';comment:'融合配方备注(如:尼尔+闪皮=闪尼'" json:"remark"`
IsEnable int32 `gorm:"not null;default:1;comment:'是否启用1:启用0:禁用'" json:"is_enable"`
IsDefault int32 `gorm:"not null;default:0;comment:'是否默认配方1:默认配方0:非默认;所有配方不匹配时随机选默认配方)'" json:"is_default"`
// 关联一个配方对应多个材料gorm 一对多关联,查询时可预加载)
//Materials []*PetFusionMaterial `gorm:"foreignKey:PetFusionID;references:ID" json:"materials,omitempty"`