审查视图

pkg/infrastructure/service_gateway/allied_creation_user/param_org.go 4.4 KB
1 2
package allied_creation_user
yangfu authored
3 4
import "time"
5 6
//创建组织
type (
7 8 9 10 11 12
	ReqOrgCreate struct {
		CompanyId int    `json:"companyId"`
		IsOrg     int    `json:"isOrg"`
		OrgCode   string `json:"orgCode"`
		OrgName   string `json:"orgName"`
		ParentId  int    `json:"parentId"`
13 14
	}
15 16
	DataOrgCreate struct {
		OrgId int `json:"orgId"`
17 18 19 20 21 22 23
	}
)

//更新组织
type (
	ReqOrgUpdate struct {
		OrgId int64
24 25 26 27 28 29 30 31
		// 组织编码
		OrgCode string `cname:"组织编码" json:"orgCode"`
		// 组织名称
		OrgName string `cname:"组织名称" json:"orgName"`
		// 是否是组织(是:1 不是:2)
		IsOrg int `cname:"是否是组织(是:1 不是:2)" json:"isOrg"`
		// 父级ID
		ParentId int64 `cname:"父级ID" json:"parentId" valid:"Required"`
32 33 34 35 36 37 38 39 40
	}

	DataOrgUpdate struct {
	}
)

//移除组织
type (
	ReqOrgRemove struct {
tangxuhui authored
41
		OrgId int64 `json:"orgId"`
42 43 44 45 46 47 48 49 50 51 52 53 54
	}

	DataOrgRemove struct {
	}
)

//获取组织的子部门(通用部门列表使用)
type (
	ReqOrgGetSubDepartment struct {
		OrgId int64
	}

	DataOrgGetSubDepartment struct {
yangfu authored
55
		Orgs []struct {
yangfu authored
56
			OrgID Int64String `json:"orgId"`
yangfu authored
57 58 59 60 61 62 63 64 65 66 67 68 69 70
			//CompanyID int       `json:"companyId"`
			//CreatedAt time.Time `json:"createdAt"`
			//UpdatedAt time.Time `json:"updatedAt"`
			//DeletedAt time.Time `json:"deletedAt"`
			//OrgCode   string    `json:"orgCode"`
			OrgName string `json:"orgName"`
			//IsOrg     int       `json:"isOrg"`
			//OrgStatus int       `json:"orgStatus"`
			//ParentID  int       `json:"parentId"`
			//Ext       struct {
			//	OrgName       string `json:"orgName"`
			//	ParentDepName string `json:"parentDepName"`
			//} `json:"ext,omitempty"`
		} `json:"orgs"`
71 72 73 74 75 76
	}
)

//设置组织启用状态
type (
	ReqOrgEnable struct {
77 78
		OrgId     int `json:"orgId"`
		OrgStatus int `json:"orgStatus"` //	组织状态 1:启用 2:禁用 3.删除
79 80 81 82 83 84 85 86 87
	}

	DataOrgEnable struct {
	}
)

//返回组织
type (
	ReqOrgGet struct {
88
		OrgId int `json:"orgId"`
yangfu authored
89 90
		// 获取标记  bit 0:获取企业数据
		FetchFlag int `json:"fetchFlag"`
91 92 93
	}

	DataOrgGet struct {
yangfu authored
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
		CompanyID int `json:"companyId"`
		Ext       struct {
			DepName       string `json:"depName"`
			OrgName       string `json:"orgName"`
			ParentDepName string `json:"parentDepName"`
			Phone         string `json:"phone"`
			UserName      string `json:"userName"`
		} `json:"ext"`
		IsOrg      int    `json:"isOrg"`
		OrgCode    string `json:"orgCode"`
		OrgID      int    `json:"orgId"`
		OrgName    string `json:"orgName"`
		OrgStatus  int    `json:"orgStatus"`
		ParentID   int    `json:"parentId"`
		ParentPath string `json:"parentPath"`
		//} `json:"org"`
yangfu authored
110 111 112 113 114 115 116 117 118 119 120
		Company *struct {
			CompanyId        int       `json:"companyId"`
			CompanyName      string    `json:"companyName"`
			Scale            string    `json:"scale"`
			IndustryCategory string    `json:"industryCategory"`
			RegisteredTime   time.Time `json:"registeredTime"`
			Status           int64     `json:"status"`
			Logo             string    `json:"logo"`
			Address          string    `json:"address"`
			SystemName       string    `json:"systemName"`
		} `json:"company,omitempty"`
121 122 123 124 125 126
	}
)

//返回组织列表
type (
	ReqOrgSearch struct {
127 128
		CompanyId int    `json:"companyId"`
		DepName   string `json:"depName"`
tangxuhui authored
129
		IsOrg     int    `json:"isOrg"` //否是组织(是:1 不是:2)
130 131 132 133
		Limit     int    `json:"limit"`
		Offset    int    `json:"offset"`
		OrgCode   string `json:"orgCode"`
		ParentId  int    `json:"parentId"`
yangfu authored
134 135
		// 模糊匹配组织名称
		MatchOrgName string `cname:"部门名称" json:"matchOrgName,omitempty"`
136 137 138
	}

	DataOrgSearch struct {
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
		Count int `json:"count"`
		Orgs  []struct {
			CompanyID int `json:"companyId"`
			Ext       struct {
				DepName       string `json:"depName"`
				OrgName       string `json:"orgName"`
				ParentDepName string `json:"parentDepName"`
				Phone         string `json:"phone"`
				UserName      string `json:"userName"`
			} `json:"ext"`
			IsOrg      int    `json:"isOrg"`
			OrgCode    string `json:"orgCode"`
			OrgID      int    `json:"orgId"`
			OrgName    string `json:"orgName"`
			OrgStatus  int    `json:"orgStatus"`
			ParentID   int    `json:"parentId"`
			ParentPath string `json:"parentPath"`
		} `json:"orgs"`
157 158
	}
)
yangfu authored
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176

type (
	ReqBatchAddOrg struct {
		OrgList []BatchAddOrgItem `json:"orgList"`
	}
	BatchAddOrgItem struct {
		// 组织编码
		OrgCode string `json:"orgCode,omitempty"`
		// 父级组织编码
		ParentOrgCode string `json:"parentOrgCode,omitempty"`
		// 组织名称
		OrgName string `json:"orgName,omitempty"`
		// 企业id
		CompanyId int64 `json:"companyId,omitempty"`
	}
	DataBatchAddOrg struct {
	}
)