审查视图

pkg/domain/department.go 825 字节
tangxvhui authored
1 2 3 4 5 6 7 8 9 10 11 12
package domain

import "time"

type Department struct {
	Id            int64      // 组织id
	CompanyId     int64      // 公司编号
	Level         int        // 组织级别
	Name          string     // 组织名称
	ParentId      int64      // 组织父级id
	ChargeUserIds []int64    // 主管uids
	Path          string     // 组织路径
庄敏学 authored
13 14 15
	CreatedAt     time.Time  // 创建时间
	UpdatedAt     time.Time  // 更新时间
	DeletedAt     *time.Time // 删除时间
tangxvhui authored
16
}
庄敏学 authored
17
tangxvhui authored
18 19 20
type DepartmentRepository interface {
	Insert(param *Department) (*Department, error)
	Update(param *Department) (*Department, error)
tangxvhui authored
21
	Remove(ids []int64) error
tangxvhui authored
22 23
	FindOne(queryOptions map[string]interface{}) (*Department, error)
	Find(queryOptions map[string]interface{}) (int, []*Department, error)
郑周 authored
24
	FindAll(companyId int64) ([]*Department, error)
tangxvhui authored
25
}