暂存一下,防止丢失
This commit is contained in:
@@ -31,15 +31,39 @@ type RoleListRequest struct {
|
||||
|
||||
// RoleResponse 角色响应
|
||||
type RoleResponse struct {
|
||||
ID uint `json:"id" description:"角色ID"`
|
||||
RoleName string `json:"role_name" description:"角色名称"`
|
||||
RoleDesc string `json:"role_desc" description:"角色描述"`
|
||||
RoleType int `json:"role_type" description:"角色类型 (1:平台角色, 2:客户角色)"`
|
||||
Status int `json:"status" description:"状态 (0:禁用, 1:启用)"`
|
||||
Creator uint `json:"creator" description:"创建人ID"`
|
||||
Updater uint `json:"updater" description:"更新人ID"`
|
||||
CreatedAt string `json:"created_at" description:"创建时间"`
|
||||
UpdatedAt string `json:"updated_at" description:"更新时间"`
|
||||
ID uint `json:"id" description:"角色ID"`
|
||||
RoleName string `json:"role_name" description:"角色名称"`
|
||||
RoleDesc string `json:"role_desc" description:"角色描述"`
|
||||
RoleType int `json:"role_type" description:"角色类型 (1:平台角色, 2:客户角色)"`
|
||||
Status int `json:"status" description:"状态 (0:禁用, 1:启用)"`
|
||||
DefaultCreditEnabled bool `json:"default_credit_enabled" description:"是否启用新建代理默认信用;仅客户角色有效"`
|
||||
DefaultCreditLimit int64 `json:"default_credit_limit" description:"新建代理默认信用额度(分);仅影响未来新建店铺"`
|
||||
DefaultCreditScope string `json:"default_credit_scope" description:"模板生效范围,固定为 new_shops_only"`
|
||||
Creator uint `json:"creator" description:"创建人ID"`
|
||||
Updater uint `json:"updater" description:"更新人ID"`
|
||||
CreatedAt string `json:"created_at" description:"创建时间"`
|
||||
UpdatedAt string `json:"updated_at" description:"更新时间"`
|
||||
}
|
||||
|
||||
// UpdateRoleDefaultCreditRequest 更新角色默认信用模板请求。
|
||||
type UpdateRoleDefaultCreditRequest struct {
|
||||
CreditEnabled *bool `json:"credit_enabled" validate:"required" required:"true" description:"是否启用新建代理默认信用"`
|
||||
CreditLimit *int64 `json:"credit_limit" validate:"required,min=0" required:"true" minimum:"0" description:"新建代理默认信用额度(分);关闭时必须为0,开启时必须大于0"`
|
||||
}
|
||||
|
||||
// UpdateRoleDefaultCreditParams 更新角色默认信用模板参数。
|
||||
type UpdateRoleDefaultCreditParams struct {
|
||||
IDReq
|
||||
UpdateRoleDefaultCreditRequest
|
||||
}
|
||||
|
||||
// RoleDefaultCreditResponse 角色默认信用模板响应。
|
||||
type RoleDefaultCreditResponse struct {
|
||||
RoleID uint `json:"role_id" description:"客户角色ID"`
|
||||
CreditEnabled bool `json:"credit_enabled" description:"是否启用新建代理默认信用"`
|
||||
CreditLimit int64 `json:"credit_limit" description:"新建代理默认信用额度(分)"`
|
||||
Scope string `json:"scope" description:"模板生效范围,固定为 new_shops_only"`
|
||||
AffectsExistingWallets bool `json:"affects_existing_wallets" description:"是否影响既有钱包,固定为 false"`
|
||||
}
|
||||
|
||||
// RolePageResult 角色分页响应
|
||||
|
||||
Reference in New Issue
Block a user