创建用户
POST
/v1/user/add-to-company请求参数
Body 参数application/json
company_id
string
公司id
real_name
string
名字
nick_name
string
可选
phone
string
手机号码
ccc
string
可选
mail
string
邮箱
avatar
string
头像
头像图片地址
roles
array [object {3}]
角色
只取第一个, 优先级 name > description
name不生效,description生效 [{"name":"xiaoshou", "description":"店长"}]
description生效 [{"name":"", "description":"店长"}]
name生效 [{"name":"xiaoshou", "description":""}]
id
integer
三者不可同时为空
name
string
角色slug(不可读)
三者不可同时为空,例如:quzhang、engineer、saler
description
string
角色的中文名
三者不可同时为空,例如:区长、技术开发、销售
entry_time
integer
入职时间
shop_info
array [object {3}]
空间信息
支持多个,生效优先级 id > shop_code > shop_name
两个都生效,[{"shop_code": "xxx"}, {"shop_code":"yyyy"}]
两个都生效,[{"shop_name": "xxx"}, {"shop_name":"yyyy"}]
code生效,name不生效,[{"shop_code": "xxx"},{"shop_name":"yyyy"}]
id
string
店铺id
id,shop_name,shop_code不可同时为空
shop_name
string
店铺名称
id,shop_name,shop_code不可同时为空
shop_code
string
店铺编号
id,shop_name,shop_code不可同时为空
employee_id
string
员工编号
user_company_bind_status
integer
员工状态
0在职,1停用,2离职,3删除
示例
{
"company_id": "string",
"real_name": "string",
"nick_name": "string",
"phone": "string",
"ccc": "string",
"mail": "string",
"avatar": "string",
"roles": [
{
"id": 0,
"name": "string",
"description": "string"
}
],
"entry_time": 0,
"shop_info": [
{
"id": "string",
"shop_name": "string",
"shop_code": "string"
}
],
"employee_id": "string",
"user_company_bind_status": 0
}
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
string
必需
msg
string
必需
data
object
必需
id
string
必需
company_id
string
必需
real_name
string
必需
nick_name
string
必需
phone
string
必需
ccc
string
必需
mail
string
必需
avatar
string
必需
roles
array [object {2}]
必需
entry_time
integer
必需
shop_info
array [object {3}]
必需
employee_id
string
必需
orgs
array [object {6}]
必需
user_company_bind_status
integer
必需
示例
{
"code": "string",
"msg": "string",
"data": {
"id": "string",
"company_id": "string",
"real_name": "string",
"nick_name": "string",
"phone": "string",
"ccc": "string",
"mail": "string",
"avatar": "string",
"roles": [
{
"id": 0,
"description": "string"
}
],
"entry_time": 0,
"shop_info": [
{
"id": "string",
"shop_name": "string",
"shop_code": "string"
}
],
"employee_id": "string",
"orgs": [
{
"id": 0,
"name": "string",
"parent_id": 0,
"org_type": 0,
"shop_id": "string",
"company_id": "string"
}
],
"user_company_bind_status": 0
}
}
修改于 4 个月前