520 lines
13 KiB
Go
520 lines
13 KiB
Go
package host
|
||
|
||
// SearchAgenciesCommand 描述同国家 Agency 搜索条件。
|
||
type SearchAgenciesCommand struct {
|
||
UserID int64
|
||
Keyword string
|
||
PageSize int
|
||
}
|
||
|
||
// ApplyToAgencyInput 是 gRPC/HTTP 层传入业务层的申请参数。
|
||
type ApplyToAgencyInput struct {
|
||
CommandID string
|
||
UserID int64
|
||
AgencyID int64
|
||
}
|
||
|
||
// ApplyToAgencyCommand 是持久化层事务入口需要的完整申请命令。
|
||
type ApplyToAgencyCommand struct {
|
||
CommandID string
|
||
ApplicationID int64
|
||
UserID int64
|
||
AgencyID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// ReviewAgencyApplicationInput 是申请审核的外部输入。
|
||
type ReviewAgencyApplicationInput struct {
|
||
CommandID string
|
||
ReviewerUserID int64
|
||
ApplicationID int64
|
||
Decision string
|
||
Reason string
|
||
}
|
||
|
||
// ReviewAgencyApplicationCommand 是申请审核事务所需的完整命令。
|
||
type ReviewAgencyApplicationCommand struct {
|
||
CommandID string
|
||
ReviewerUserID int64
|
||
ApplicationID int64
|
||
Decision string
|
||
Reason string
|
||
MembershipID int64
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// KickAgencyHostInput 是 Agency 踢出 Host 的外部输入。
|
||
type KickAgencyHostInput struct {
|
||
CommandID string
|
||
OperatorUserID int64
|
||
AgencyID int64
|
||
HostUserID int64
|
||
Reason string
|
||
}
|
||
|
||
// KickAgencyHostCommand 是踢出事务所需的完整命令。
|
||
type KickAgencyHostCommand struct {
|
||
CommandID string
|
||
OperatorUserID int64
|
||
AgencyID int64
|
||
HostUserID int64
|
||
Reason string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// InviteAgencyInput 是邀请用户成为 Agency 拥有者的外部输入。
|
||
type InviteAgencyInput struct {
|
||
CommandID string
|
||
InviterUserID int64
|
||
TargetUserID int64
|
||
AgencyName string
|
||
}
|
||
|
||
// InviteAgencyCommand 是 Agency 邀请事务所需的完整命令。
|
||
type InviteAgencyCommand struct {
|
||
CommandID string
|
||
InvitationID int64
|
||
InviterUserID int64
|
||
TargetUserID int64
|
||
AgencyName string
|
||
AgencyID int64
|
||
MembershipID int64
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// InviteBDInput 是 BD 负责人邀请用户成为 BD 的外部输入。
|
||
type InviteBDInput struct {
|
||
CommandID string
|
||
InviterUserID int64
|
||
TargetUserID int64
|
||
}
|
||
|
||
// InviteBDCommand 是 BD 邀请事务所需的完整命令。
|
||
type InviteBDCommand struct {
|
||
CommandID string
|
||
InvitationID int64
|
||
InviterUserID int64
|
||
TargetUserID int64
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// InviteHostInput 是 Agency owner 邀请用户成为 Host 成员的外部输入。
|
||
type InviteHostInput struct {
|
||
CommandID string
|
||
InviterUserID int64
|
||
TargetUserID int64
|
||
}
|
||
|
||
// InviteHostCommand 是 Agency 邀请 Host 事务所需的完整命令。
|
||
type InviteHostCommand struct {
|
||
CommandID string
|
||
InvitationID int64
|
||
InviterUserID int64
|
||
TargetUserID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// ListRoleInvitationsCommand 描述当前用户收件箱读取条件。
|
||
type ListRoleInvitationsCommand struct {
|
||
TargetUserID int64
|
||
Status string
|
||
PageSize int
|
||
}
|
||
|
||
// ListBDLeaderBDsCommand 描述 BD Leader 查询直属 BD 列表的条件。
|
||
type ListBDLeaderBDsCommand struct {
|
||
LeaderUserID int64
|
||
Status string
|
||
PageSize int
|
||
}
|
||
|
||
// ListBDLeaderAgenciesCommand 描述 BD Leader 查询下级 Agency 列表的条件。
|
||
type ListBDLeaderAgenciesCommand struct {
|
||
LeaderUserID int64
|
||
Status string
|
||
PageSize int
|
||
}
|
||
|
||
// ListBDAgenciesCommand 描述 BD 查询自己直属 Agency 列表的条件。
|
||
type ListBDAgenciesCommand struct {
|
||
BDUserID int64
|
||
Status string
|
||
PageSize int
|
||
}
|
||
|
||
// ListManagerTeamAgenciesCommand 描述经理查询整棵团队树 Agency 的条件;只统计 active 链路,不支持按状态放宽。
|
||
type ListManagerTeamAgenciesCommand struct {
|
||
ManagerUserID int64
|
||
PageSize int
|
||
}
|
||
|
||
// ProcessRoleInvitationInput 是处理角色邀请的外部输入。
|
||
type ProcessRoleInvitationInput struct {
|
||
CommandID string
|
||
ActorUserID int64
|
||
InvitationID int64
|
||
Action string
|
||
Reason string
|
||
}
|
||
|
||
// ProcessRoleInvitationCommand 是邀请处理事务所需的完整命令。
|
||
type ProcessRoleInvitationCommand struct {
|
||
CommandID string
|
||
ActorUserID int64
|
||
InvitationID int64
|
||
Action string
|
||
Reason string
|
||
AgencyID int64
|
||
MembershipID int64
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// CreateBDLeaderInput 是创建 BD Leader 的外部输入。
|
||
// AdminUserID 是历史字段名:后台创建时是后台管理员 ID,经理中心创建时是经理 App 用户 ID。
|
||
type CreateBDLeaderInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// CreateBDLeaderCommand 是创建 BD Leader 事务需要的完整命令。
|
||
// AdminUserID 会写入 bd_leader_profiles.created_by_user_id,用于审计和经理下级统计。
|
||
type CreateBDLeaderCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
Reason string
|
||
RequestID string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// CreateBDInput 是后台创建普通 BD 的外部输入;ParentLeaderUserID 为 0 时表示独立 BD。
|
||
type CreateBDInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
ParentLeaderUserID int64
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// CreateBDCommand 是后台创建普通 BD 事务需要的完整命令;ParentLeaderUserID 为 0 时不校验父级 Leader。
|
||
type CreateBDCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
ParentLeaderUserID int64
|
||
Reason string
|
||
RequestID string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// SetBDStatusInput 是后台调整 BD/BD Leader 状态的外部输入。
|
||
type SetBDStatusInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
Role string
|
||
Status string
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// SetBDStatusCommand 是后台调整 BD/BD Leader 状态事务需要的完整命令。
|
||
type SetBDStatusCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
Role string
|
||
Status string
|
||
Reason string
|
||
RequestID string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// CreateCoinSellerInput 是后台创建币商身份的外部输入。
|
||
type CreateCoinSellerInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
Reason string
|
||
RequestID string
|
||
CanManageSubCoinSellers *bool
|
||
}
|
||
|
||
// CreateCoinSellerCommand 是后台创建币商身份事务需要的完整命令。
|
||
type CreateCoinSellerCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
Reason string
|
||
RequestID string
|
||
CanManageSubCoinSellers *bool
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// SetCoinSellerStatusInput 是后台调整币商身份状态的外部输入。
|
||
type SetCoinSellerStatusInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
Status string
|
||
Reason string
|
||
RequestID string
|
||
CanManageSubCoinSellers *bool
|
||
}
|
||
|
||
// SetCoinSellerStatusCommand 是后台调整币商身份状态事务需要的完整命令。
|
||
type SetCoinSellerStatusCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
TargetUserID int64
|
||
Status string
|
||
Reason string
|
||
RequestID string
|
||
CanManageSubCoinSellers *bool
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// CreateSubCoinSellerInput 是父币商在 H5 通过短 ID 搜索后直开/绑定子币商的外部输入。
|
||
type CreateSubCoinSellerInput struct {
|
||
CommandID string
|
||
ParentUserID int64
|
||
ChildUserID int64
|
||
RequestID string
|
||
}
|
||
|
||
// SubmitSubCoinSellerApplicationInput 是 H5 父币商邀请子币商时提交后台审核的输入。
|
||
type SubmitSubCoinSellerApplicationInput struct {
|
||
CommandID string
|
||
ParentUserID int64
|
||
TargetUserID int64
|
||
RequestID string
|
||
}
|
||
|
||
// CreateSubCoinSellerCommand 是父子币商关系事务需要的完整命令。
|
||
type CreateSubCoinSellerCommand struct {
|
||
CommandID string
|
||
RelationID int64
|
||
ParentUserID int64
|
||
ChildUserID int64
|
||
RequestID string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// SubmitSubCoinSellerApplicationCommand 是申请落库事务需要的完整命令。
|
||
type SubmitSubCoinSellerApplicationCommand struct {
|
||
CommandID string
|
||
ApplicationID int64
|
||
ParentUserID int64
|
||
TargetUserID int64
|
||
RequestID string
|
||
NowMs int64
|
||
}
|
||
|
||
// ReviewSubCoinSellerApplicationInput 是后台审核子币商申请的外部输入。
|
||
type ReviewSubCoinSellerApplicationInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
ApplicationID int64
|
||
Decision string
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// ReviewSubCoinSellerApplicationCommand 是审核状态机事务需要的完整命令。
|
||
type ReviewSubCoinSellerApplicationCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
ApplicationID int64
|
||
Decision string
|
||
Reason string
|
||
RequestID string
|
||
RelationID int64
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// ListSubCoinSellersCommand 描述父币商读取直属子币商列表的分页条件。
|
||
type ListSubCoinSellersCommand struct {
|
||
ParentUserID int64
|
||
Page int
|
||
PageSize int
|
||
}
|
||
|
||
// CheckCoinSellerSubRelationCommand 描述父币商对子币商发起转账前的关系校验条件。
|
||
type CheckCoinSellerSubRelationCommand struct {
|
||
ParentUserID int64
|
||
ChildUserID int64
|
||
}
|
||
|
||
// CreateAgencyInput 是后台直接创建 Agency 的外部输入;ParentBDUserID 为 0 时表示独立 Agency。
|
||
type CreateAgencyInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
OwnerUserID int64
|
||
ParentBDUserID int64
|
||
Name string
|
||
JoinEnabled bool
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// CreateAgencyCommand 是后台直接创建 Agency 事务需要的完整命令;ParentBDUserID 为 0 时不校验父级 BD。
|
||
type CreateAgencyCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
OwnerUserID int64
|
||
ParentBDUserID int64
|
||
Name string
|
||
JoinEnabled bool
|
||
Reason string
|
||
RequestID string
|
||
AgencyID int64
|
||
MembershipID int64
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// CloseAgencyInput 是后台关闭 Agency 的外部输入。
|
||
type CloseAgencyInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// CloseAgencyCommand 是后台关闭 Agency 事务需要的完整命令。
|
||
type CloseAgencyCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
Reason string
|
||
RequestID string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// DeleteAgencyInput 是后台删除 Agency 身份的外部输入。
|
||
type DeleteAgencyInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// DeleteAgencyCommand 是后台删除 Agency 身份事务需要的完整命令。
|
||
type DeleteAgencyCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
Reason string
|
||
RequestID string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// SetAgencyStatusInput 是后台显式切换 Agency 状态的外部输入。
|
||
type SetAgencyStatusInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
Status string
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// SetAgencyStatusCommand 是后台显式切换 Agency 状态事务需要的完整命令。
|
||
type SetAgencyStatusCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
Status string
|
||
Reason string
|
||
RequestID string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// SetAgencyJoinEnabledInput 是后台设置 Agency 入会开关的外部输入。
|
||
type SetAgencyJoinEnabledInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
JoinEnabled bool
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// SetAgencyJoinEnabledCommand 是后台设置 Agency 入会开关事务需要的完整命令。
|
||
type SetAgencyJoinEnabledCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
JoinEnabled bool
|
||
Reason string
|
||
RequestID string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// UpdateAgencyProfileInput 是 Agency owner 修改独立组织资料的外部输入。
|
||
type UpdateAgencyProfileInput struct {
|
||
CommandID string
|
||
OperatorUserID int64
|
||
AgencyID int64
|
||
Name *string
|
||
Avatar *string
|
||
RequestID string
|
||
}
|
||
|
||
// UpdateAgencyProfileCommand 是修改 Agency 独立资料事务需要的完整命令。
|
||
type UpdateAgencyProfileCommand struct {
|
||
CommandID string
|
||
OperatorUserID int64
|
||
AgencyID int64
|
||
Name *string
|
||
Avatar *string
|
||
RequestID string
|
||
EventID int64
|
||
NowMs int64
|
||
}
|
||
|
||
// AdminAddAgencyHostInput 是后台直接添加 Agency Host 的外部输入。
|
||
type AdminAddAgencyHostInput struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
TargetUserID int64
|
||
Reason string
|
||
RequestID string
|
||
}
|
||
|
||
// AdminAddAgencyHostCommand 是后台添加 Host 事务需要的完整命令。
|
||
type AdminAddAgencyHostCommand struct {
|
||
CommandID string
|
||
AdminUserID int64
|
||
AgencyID int64
|
||
TargetUserID int64
|
||
Reason string
|
||
RequestID string
|
||
MembershipID int64
|
||
EventID int64
|
||
NowMs int64
|
||
}
|