Files
sundynix-plant-be/model/plant/request/my_plant.go
T
2026-02-14 11:38:59 +08:00

66 lines
2.7 KiB
Go

package request
type CarePlan struct {
Icon string `json:"icon"` // icon信息
Name string `json:"name"` // 农事名称
Period int `json:"period"` // 周期
TargetAction string `json:"targetAction"` // 触动的动作
}
type CreateCarePlan struct {
PlantId string `json:"plantId" binding:"required"`
Icon string `json:"icon"` // icon信息
Name string `json:"name"` // 农事名称
Period int `json:"period"` // 周期
TargetAction string `json:"targetAction"` // 触动的动作
}
type AddPlans struct {
CarePlan []CreateCarePlan `json:"carePlan"`
}
// CreateMyPlant 创建植物
type CreateMyPlant struct {
Name string `json:"name"` // 植物名称
PlantTime string `json:"plantTime"` // 种植时间
PotMaterial string `json:"potMaterial"` //花盆材质
PotSize string `json:"potSize"` // 花盆大小 如直径 20cm × 高度 18cm
Placement string `json:"placement"` //摆放位置
Sunlight string `json:"sunlight"` //光照条件如每日12小时
PlantingMaterial string `json:"plantingMaterial"` //植料(即土的材质)
OssIds []string `json:"ossIds"` // 图片ids
CarePlans []*CarePlan `json:"carePlans"` // 养护计划
}
type UpdatePlan struct {
Id string `json:"id" binding:"required"`
Icon string `json:"icon"` // icon信息
Name string `json:"name"` // 农事名称
Period int `json:"period"` // 周期
TargetAction string `json:"targetAction"` // 触动的动作
}
// UpdateMyPlant 修改植物
type UpdateMyPlant struct {
Id string `json:"id" binding:"required"`
Name string `json:"name"` // 植物名称
PotMaterial string `json:"potMaterial"` // 花盆材质
PotSize string `json:"potSize"` // 花盆大小 如直径 20cm × 高度 18cm
Placement string `json:"placement"` // 摆放位置
Sunlight string `json:"sunlight"` // 光照条件如每日12小时
PlantingMaterial string `json:"plantingMaterial"` // 植料(即土的材质)
CarePlans []*UpdatePlan `json:"carePlans"`
}
type CompleteTask struct {
TaskId string `json:"taskId" binding:"required"`
Remark string `json:"remark"`
}
type CreateGrowthRecord struct {
PlantId string `json:"plantId" binding:"required"`
OssIds []string `json:"ossIds"`
Name string `json:"name"`
Tag string `json:"tag"`
Desc string `json:"desc"`
Content string `json:"content"`
}