organization

package
v0.0.0-...-d9cd954 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 (o *Department) GetMaxOrder(ctx context.Context, parentID string) (int32, error)

func (*Department) GetParent

func (o *Department) GetParent(ctx context.Context, parentID string) ([]*table.Department, error)

func (*Department) IncrOrder

func (o *Department) IncrOrder(ctx context.Context, parentDepartmentID string, order int32) error

func (*Department) InitUngroupedName

func (o *Department) InitUngroupedName(ctx context.Context, id string, name string) error

func (*Department) Search

func (o *Department) Search(ctx context.Context, keyword string) ([]string, error)

func (*Department) Update

func (o *Department) Update(ctx context.Context, departmentID string, data map[string]any) error

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 (*DepartmentMember) Creates

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 (*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

func (o *DepartmentMember) GetMaxOrder(ctx context.Context, departmentID string) (int32, error)

func (*DepartmentMember) GetNum

func (o *DepartmentMember) GetNum(ctx context.Context, departmentIDs []string) (int64, error)

func (*DepartmentMember) IncrOrder

func (o *DepartmentMember) IncrOrder(ctx context.Context, departmentID string, order int32) error

func (*DepartmentMember) Move

func (o *DepartmentMember) Move(ctx context.Context, userID string, oldDepartmentID string, newDepartmentID string) error

func (*DepartmentMember) Search

func (o *DepartmentMember) Search(ctx context.Context, keyword string, departmentIDs []string) ([]string, error)

func (*DepartmentMember) Update

func (o *DepartmentMember) Update(ctx context.Context, departmentID string, userID string, update map[string]any) error

type Organization

type Organization struct {
	// contains filtered or unexported fields
}

func NewOrganization

func NewOrganization(db *gorm.DB) *Organization

func (*Organization) BeginTransaction

func (o *Organization) BeginTransaction(ctx context.Context) (*gorm.DB, error)

func (*Organization) Get

func (*Organization) Init

func (o *Organization) Init(ctx context.Context) error

func (*Organization) Set

func (o *Organization) Set(ctx context.Context, update map[string]any) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL