department.go
825 字节
package domain
import "time"
type Department struct {
Id int64 // 组织id
CompanyId int64 // 公司编号
Level int // 组织级别
Name string // 组织名称
ParentId int64 // 组织父级id
ChargeUserIds []int64 // 主管uids
Path string // 组织路径
CreatedAt time.Time // 创建时间
UpdatedAt time.Time // 更新时间
DeletedAt *time.Time // 删除时间
}
type DepartmentRepository interface {
Insert(param *Department) (*Department, error)
Update(param *Department) (*Department, error)
Remove(ids []int64) error
FindOne(queryOptions map[string]interface{}) (*Department, error)
Find(queryOptions map[string]interface{}) (int, []*Department, error)
FindAll(companyId int64) ([]*Department, error)
}