package protocol

/*修改手机号-验证旧手机验证码 */
type CheckSmsCodeRequest struct {
	Captcha string `json:"captcha" valid:"Required"`
}
type CheckSmsCodeResponse struct {
}

/*修改手机号*/
type ChangePhoneRequest struct {
	Phone   string `json:"phone" valid:"Mobile"`
	Captcha string `json:"captcha" valid:"Required"`
}
type ChangePhoneResponse struct {
}

/*ResetPassword */
type ResetPasswordRequest struct {
	NewPwd     string `json:"newPwd" valid:"Required"`
	ConfirmPwd string `json:"confirmPwd" valid:"Required"`
}
type ResetPasswordResponse struct {
}

/*ChangePassword */
type ChangePasswordRequest struct {
	NewPwd     string `json:"newPwd" valid:"Required"`
	ConfirmPwd string `json:"confirmPwd" valid:"Required"`
	OldPwd     string `json:"oldPwd" valid:"Required"`
}
type ChangePasswordResponse struct {
}

/*UserCompanys */
type UserCompanysRequest struct {
}
type UserCompanysResponse struct {
	Companys []Company `json:"companys"`
}

/*SwitchCompany */
type SwitchCompanyRequest struct {
	CompanyId int64 `json:"companyId" valid:"Required"`
}
type SwitchCompanyResponse struct {
}

/*用户信息 UserInfo */
type UserInfoRequest struct {
}
type UserInfoResponse struct {
	User User `json:"user"`
}

/*
user	object
必须
用户对象信息
备注: 用户对象信息

必须
用户名称
phone	string
必须
手机号码
image	object
非必须
用户头像
备注: 用户头像

did	integer
必须
部门ID
department	string
必须
部门名称
position	string
必须
职位名称
level	integer
必须
职位级别(员工0,老板1)
employeeAttr	object
必须
员工属性
备注: 员工属性

imToken	string
必须
网易云信IM Token
filterModule
*/
type User struct {
	UserId     int64   `json:"uid"`
	Name       string  `json:"uname"`
	Phone      string  `json:"phone"`
	Image      Picture `json:"image"`
	Department string  `json:"department"`
	Position   string  `json:"position"`
	ImToken    string  `json:"imToken"`

	//companys
	CompanyId int    `json:"companyId"`
	Company   string `json:"company"` //公司名称
}


type Company struct {
	Id     int64   `json:"id"`
	Name       string  `json:"name"`
}