/* * @desc:模块租户关系 * @company:云南奇讯科技有限公司 * @Author: system * @Date: 2026/1/6 */ package system import ( "gitea.com/red-future/common/beans" "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/os/gtime" commonApi "github.com/tiger1103/gfast/v3/api/v1/common" "github.com/tiger1103/gfast/v3/internal/app/system/consts" "github.com/tiger1103/gfast/v3/internal/app/system/model" "go.mongodb.org/mongo-driver/v2/bson" ) // ModuleTenantAddReq 添加模块租户关系参数 type ModuleTenantAddReq struct { g.Meta `path:"/moduleTenant/add" tags:"模块租户关系管理" method:"post" summary:"添加模块租户关系"` TenantModuleType beans.TenantModuleType `p:"tenantModuleType"` AssetSkuId *bson.ObjectID `p:"assetSkuId" v:"required#资产SKU ID不能为空"` commonApi.Author } type ModuleTenantAddRes struct { } // ModuleTenantCheckReq 检查模块开通状态请求参数 type ModuleTenantCheckReq struct { g.Meta `path:"/moduleTenant/check" tags:"模块租户关系管理" method:"get" summary:"检查模块开通状态"` ModuleKey string `p:"moduleKey" v:"required#模块Key不能为空"` TenantId uint64 `p:"tenantId" v:"required#租户ID不能为空"` commonApi.Author } // ModuleTenantCheckCertificationReq 检查模块认证状态请求参数 type ModuleTenantCheckCertificationReq struct { g.Meta `path:"/moduleTenant/check" tags:"模块租户关系管理" method:"get" summary:"检查模块认证状态"` CertificationStatus consts.CertificationStatus `p:"certificationStatus" v:"required#认证状态不能为空"` commonApi.Author } type ModuleTenantCheckRes struct { g.Meta `mime:"application/json"` Status bool `json:"status"` CertificationStatus bool `json:"certificationStatus"` Message string `json:"message"` // 状态描述 } // AddRedisByTenantIdReq 根据租户ID设置模块租户关系到redis请求参数 type AddRedisByTenantIdReq struct { g.Meta `path:"/moduleTenant/addRedisByTenantId" tags:"模块租户关系管理" method:"post" summary:"根据租户ID设置模块租户关系到redis"` TenantId interface{} `p:"tenantId" v:"required#租户ID不能为空"` commonApi.Author } type AddRedisByTenantIdRes struct { g.Meta `mime:"application/json"` List *model.ModuleTenantRes `json:"list"` } // AssetSku 资产SKU实体 type AssetSku struct { AssetId *bson.ObjectID `bson:"assetId" json:"assetId"` // 关联资产ID ExpireAt *gtime.Time `bson:"expireAt" json:"expireAt"` // 到期时间 }