daShangDao_psiServer/models/request/Employee.go

90 lines
4.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package request
// LoginRequest 登录请求
type LoginRequest struct {
Username string `form:"username" binding:"required"` // 用户名
Password string `form:"password" binding:"required"` // 密码
AboutID int64 `form:"about_id"` // 租户ID从ERP关联
Type int64 `form:"type"` // 类型 1web 2pda
Code string `form:"code"` // 机械码
}
// GetEmployeeListRequest 获取员工列表请求
type GetEmployeeListRequest struct {
Page int `form:"page"` // 页码
PageSize int `form:"page_size"` // 页大小
Fid int64 `form:"fid"` // 仓库ID
Status string `form:"status"` // 状态
Keyword string `form:"keyword"` // 关键词
}
// AddEmployeeRequest 添加员工请求
type AddEmployeeRequest struct {
Name string `form:"name" binding:"required"` // 员工姓名
UserName string `form:"username"` // 员工用户名
AboutId int64 `form:"about_id"` // 租户ID
Fid int64 `form:"fid"` // 仓库ID
Phone string `form:"phone"` // 手机号
Password string `form:"password" binding:"required,min=6"` // 密码
From string `form:"from"` // 来源
ExpireTime int64 `form:"expire_time"` // 过期时间
}
// UpdatePasswordEmployeeRequest 修改员工密码请求
type UpdatePasswordEmployeeRequest struct {
Id int64 `form:"id" binding:"required"` // 员工ID
AboutId int64 `form:"about_id"` // 租户ID
Password string `form:"password" binding:"required,min=6"` // 密码
}
// UpdateExpireTimeEmployeeRequest 修改员工过期时间请求
type UpdateExpireTimeEmployeeRequest struct {
Id int64 `form:"id" binding:"required"` // 员工ID
AboutId int64 `form:"about_id"` // 租户ID
ExpireTime int64 `form:"expire_time" binding:"required"` // 过期时间
}
// CheckCodeEmployeeRequest 校验员工机械码
type CheckCodeEmployeeRequest struct {
UserName string `form:"username" binding:"required"` // 员工用户名
}
// ClearCodeEmployeeRequest 清除员工机械码请求
type ClearCodeEmployeeRequest struct {
UserName string `form:"username" binding:"required"` // 员工用户名
}
// SetEmployeeLevelRequest 设置员工等级
type SetEmployeeLevelRequest struct {
EmpId int64 `form:"emp_id" binding:"required"` // 员工ID
Level int8 `form:"level" binding:"required,min=1,max=5"` // 等级(1-5)
PayTime int64 `form:"pay_time" binding:"required"` // 支付时间
OperationType int8 `form:"operation_type" binding:"required,oneof=1 2 3"` // 操作类型(1:开通,2:升级,3:续费)
Duration int64 `form:"duration" binding:"required,min=1"` // 时长(月数)按30天/月计算
}
// GetUserListRequest 获取用户列表请求
type GetUserListRequest struct {
Page int `form:"page"` // 页码
PageSize int `form:"page_size"` // 页大小
Username string `form:"username"` // 用户名
Tel string `form:"tel"` // 手机号
//Keyword string `form:"keyword"` // 关键词 注释将keyword改为 username 和 tel
Status string `form:"status"` // 状态
}
// GetUserListRequest 获取用户列表请求
/*type GetUserListRequest struct {
Page int `form:"page"` // 页码
PageSize int `form:"page_size"` // 页大小
Username string `form:"username"` // 用户名
Tel string `form:"tel"` // 手机号
Status string `form:"status"` // 状态
}*/
// UpdateEmployeeSplitAccountConfigRequest 根据about_id更新员工分账配置请求
type UpdateEmployeeSplitAccountConfigRequest struct {
AboutId int64 `form:"about_id" binding:"required"` // 租户ID
SplitAccountConfigId int64 `form:"split_account_config_id" binding:"required"` // 员工分账配置ID
}