Documentation ¶
Index ¶
- type Department
- func (o *Department) Create(ctx context.Context, departments ...*table.Department) error
- func (o *Department) Delete(ctx context.Context, departmentIDList []string) error
- func (o *Department) FindOne(ctx context.Context, departmentID string) (*table.Department, error)
- func (o *Department) GetByName(ctx context.Context, name, parentID string) (*table.Department, error)
- func (o *Department) GetDepartment(ctx context.Context, departmentId string) (*table.Department, error)
- func (o *Department) GetList(ctx context.Context, departmentIdList []string) ([]*table.Department, error)
- func (o *Department) GetMaxOrder(ctx context.Context, parentID string) (int32, error)
- func (o *Department) GetParent(ctx context.Context, parentID string) ([]*table.Department, error)
- func (o *Department) IncrOrder(ctx context.Context, parentDepartmentID string, order int32) error
- func (o *Department) InitUngroupedName(ctx context.Context, id string, name string) error
- func (o *Department) Search(ctx context.Context, keyword string) ([]string, error)
- func (o *Department) Update(ctx context.Context, departmentID string, data map[string]any) error
- func (o *Department) UpdateParentID(ctx context.Context, oldParentID, newParentID string) error
- type DepartmentMember
- func (o *DepartmentMember) Create(ctx context.Context, m *table.DepartmentMember) error
- func (o *DepartmentMember) Creates(ctx context.Context, m []*table.DepartmentMember) error
- func (o *DepartmentMember) DeleteByKey(ctx context.Context, userID, departmentID string) error
- func (o *DepartmentMember) DeleteDepartmentIDList(ctx context.Context, departmentIDList []string) error
- func (o *DepartmentMember) FindByDepartmentID(ctx context.Context, departmentIDList []string) ([]*table.DepartmentMember, error)
- func (o *DepartmentMember) FindByUserID(ctx context.Context, userIDList []string) ([]*table.DepartmentMember, error)
- func (o *DepartmentMember) Get(ctx context.Context, userID string) ([]*table.DepartmentMember, error)
- func (o *DepartmentMember) GetByDepartmentID(ctx context.Context, departmentID string) ([]*table.DepartmentMember, error)
- func (o *DepartmentMember) GetByKey(ctx context.Context, userID, departmentID string) (*table.DepartmentMember, error)
- func (o *DepartmentMember) GetMaxOrder(ctx context.Context, departmentID string) (int32, error)
- func (o *DepartmentMember) GetNum(ctx context.Context, departmentIDs []string) (int64, error)
- func (o *DepartmentMember) IncrOrder(ctx context.Context, departmentID string, order int32) error
- func (o *DepartmentMember) Move(ctx context.Context, userID string, oldDepartmentID string, ...) error
- func (o *DepartmentMember) Search(ctx context.Context, keyword string, departmentIDs []string) ([]string, error)
- func (o *DepartmentMember) Update(ctx context.Context, departmentID string, userID string, update map[string]any) error
- type Organization
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Department ¶
type Department struct {
// contains filtered or unexported fields
}
func NewDepartment ¶
func NewDepartment(db *gorm.DB) *Department
func (*Department) Create ¶
func (o *Department) Create(ctx context.Context, departments ...*table.Department) error
func (*Department) Delete ¶
func (o *Department) Delete(ctx context.Context, departmentIDList []string) error
func (*Department) FindOne ¶
func (o *Department) FindOne(ctx context.Context, departmentID string) (*table.Department, error)
func (*Department) GetByName ¶
func (o *Department) GetByName(ctx context.Context, name, parentID string) (*table.Department, error)
func (*Department) GetDepartment ¶
func (o *Department) GetDepartment(ctx context.Context, departmentId string) (*table.Department, error)
func (*Department) GetList ¶
func (o *Department) GetList(ctx context.Context, departmentIdList []string) ([]*table.Department, error)
func (*Department) GetMaxOrder ¶
func (*Department) GetParent ¶
func (o *Department) GetParent(ctx context.Context, parentID string) ([]*table.Department, error)
func (*Department) InitUngroupedName ¶
func (*Department) UpdateParentID ¶
func (o *Department) UpdateParentID(ctx context.Context, oldParentID, newParentID string) error
type DepartmentMember ¶
type DepartmentMember struct {
// contains filtered or unexported fields
}
func NewDepartmentMember ¶
func NewDepartmentMember(db *gorm.DB) *DepartmentMember
func (*DepartmentMember) Create ¶
func (o *DepartmentMember) Create(ctx context.Context, m *table.DepartmentMember) error
func (*DepartmentMember) Creates ¶
func (o *DepartmentMember) Creates(ctx context.Context, m []*table.DepartmentMember) error
func (*DepartmentMember) DeleteByKey ¶
func (o *DepartmentMember) DeleteByKey(ctx context.Context, userID, departmentID string) error
func (*DepartmentMember) DeleteDepartmentIDList ¶
func (o *DepartmentMember) DeleteDepartmentIDList(ctx context.Context, departmentIDList []string) error
func (*DepartmentMember) FindByDepartmentID ¶
func (o *DepartmentMember) FindByDepartmentID(ctx context.Context, departmentIDList []string) ([]*table.DepartmentMember, error)
func (*DepartmentMember) FindByUserID ¶
func (o *DepartmentMember) FindByUserID(ctx context.Context, userIDList []string) ([]*table.DepartmentMember, error)
func (*DepartmentMember) Get ¶
func (o *DepartmentMember) Get(ctx context.Context, userID string) ([]*table.DepartmentMember, error)
func (*DepartmentMember) GetByDepartmentID ¶
func (o *DepartmentMember) GetByDepartmentID(ctx context.Context, departmentID string) ([]*table.DepartmentMember, error)
func (*DepartmentMember) GetByKey ¶
func (o *DepartmentMember) GetByKey(ctx context.Context, userID, departmentID string) (*table.DepartmentMember, error)
func (*DepartmentMember) GetMaxOrder ¶
type Organization ¶
type Organization struct {
// contains filtered or unexported fields
}
func NewOrganization ¶
func NewOrganization(db *gorm.DB) *Organization
func (*Organization) BeginTransaction ¶
func (*Organization) Get ¶
func (o *Organization) Get(ctx context.Context) (*table.Organization, error)
Click to show internal directories.
Click to hide internal directories.