Files
gfast/app/system/dao/sys_dept.go
T
2021-07-20 11:11:30 +08:00

59 lines
2.0 KiB
Go

// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"gfast/app/system/dao/internal"
"gfast/app/system/model"
)
// sysDeptDao is the manager for logic model data accessing and custom defined data operations functions management.
// You can define custom methods on it to extend its functionality as you wish.
type sysDeptDao struct {
*internal.SysDeptDao
}
var (
// SysDept is globally public accessible object for table sys_dept operations.
SysDept sysDeptDao
)
func init() {
SysDept = sysDeptDao{
internal.NewSysDeptDao(),
}
}
// Fill with you ideas below.
type SysDeptSearchParams struct {
ExcludeId int64 `p:"excludeId"`
DeptName string `p:"deptName"`
Status string `p:"status"`
}
type SysDeptTreeRes struct {
*model.SysDept
Children []*SysDeptTreeRes `json:"children"`
}
type SysDeptAddParams struct {
ParentID int `json:"parentId" orm:"parent_id" p:"parentId" v:"required#父级不能为空"`
DeptName string `json:"deptName" orm:"dept_name" p:"deptName" v:"required#部门名称不能为空"`
OrderNum int `json:"orderNum" orm:"order_num" p:"orderNum" v:"required#排序不能为空"`
Leader string `json:"leader" orm:"leader" p:"leader" v:"required#负责人不能为空"`
Phone string `json:"phone" orm:"Phone" p:"phone" v:"required#电话不能为空"`
Email string `json:"email" orm:"email" p:"email" v:"required#邮箱不能为空"`
Status string `json:"status" orm:"status" p:"status" v:"required#状态必须"`
Ancestors string `json:"ancestors" p:"ancestors" orm:"ancestors"`
CreatedBy uint64 `json:"CreatedBy" orm:"created_by"`
}
type EditParams struct {
DeptID int64 `json:"deptId" orm:"dept_id" p:"id" v:"integer|min:1#ID只能为整数|ID只能为正数"`
SysDeptAddParams
UpdatedBy uint64 `json:"updatedBy" orm:"updated_by"`
}