第一版完成
This commit is contained in:
45
internal/model/partner.go
Normal file
45
internal/model/partner.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Partner 合作伙伴模型
|
||||
type Partner struct {
|
||||
Id int `json:"id" dc:"主键"`
|
||||
Name string `json:"name" dc:"合作伙伴名称"`
|
||||
Logo string `json:"logo" dc:"Logo图片"`
|
||||
Website string `json:"website" dc:"官网地址"`
|
||||
Description string `json:"description" dc:"描述"`
|
||||
Category string `json:"category" dc:"分类"`
|
||||
SortOrder int `json:"sort_order" dc:"排序"`
|
||||
IsFeatured int `json:"is_featured" dc:"是否推荐 0:否 1:是"`
|
||||
Status int `json:"status" dc:"状态 0:禁用 1:启用"`
|
||||
CreatedAt *gtime.Time `json:"created_at" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updated_at" dc:"更新时间"`
|
||||
DeletedAt int `json:"deleted_at" dc:"删除时间"`
|
||||
}
|
||||
|
||||
// CreatePartnerRequest 创建合作伙伴请求
|
||||
type CreatePartnerRequest struct {
|
||||
Name string `json:"name" v:"required|length:1,100#合作伙伴名称不能为空|名称长度不能超过100字符" dc:"合作伙伴名称"`
|
||||
Logo string `json:"logo" dc:"Logo图片"`
|
||||
Website string `json:"website" dc:"官网地址"`
|
||||
Description string `json:"description" dc:"描述"`
|
||||
Category string `json:"category" dc:"分类"`
|
||||
SortOrder int `json:"sort_order" dc:"排序"`
|
||||
IsFeatured int `json:"is_featured" dc:"是否推荐"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
}
|
||||
|
||||
// UpdatePartnerRequest 更新合作伙伴请求
|
||||
type UpdatePartnerRequest struct {
|
||||
Name string `json:"name" v:"required|length:1,100#合作伙伴名称不能为空|名称长度不能超过100字符" dc:"合作伙伴名称"`
|
||||
Logo string `json:"logo" dc:"Logo图片"`
|
||||
Website string `json:"website" dc:"官网地址"`
|
||||
Description string `json:"description" dc:"描述"`
|
||||
Category string `json:"category" dc:"分类"`
|
||||
SortOrder int `json:"sort_order" dc:"排序"`
|
||||
IsFeatured int `json:"is_featured" dc:"是否推荐"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
}
|
||||
Reference in New Issue
Block a user