Versions in this module Expand all Collapse all v1 v1.0.4 Mar 5, 2024 v1.0.3 Mar 4, 2024 v1.0.2 Mar 4, 2024 v1.0.1 Mar 4, 2024 Changes in this version type Dict + Extra string + Type string v1.0.0 Jan 2, 2024 Changes in this version + type Department struct + Children []*Department + Description string + Keyword string + Name string + ParentID uint32 + Path string + func (t *Department) All(ctx kratosx.Context, scopes types.Scopes) ([]*Department, error) + func (t *Department) AppendChildren(child any) + func (t *Department) ChildrenNode() []tree.Tree + func (t *Department) Create(ctx kratosx.Context) error + func (t *Department) DeleteByID(ctx kratosx.Context, id uint32) error + func (t *Department) FindByID(ctx kratosx.Context, id uint32) error + func (t *Department) FindByKeyword(ctx kratosx.Context, keyword string) error + func (t *Department) ID() uint32 + func (t *Department) Parent() uint32 + func (t *Department) Update(ctx kratosx.Context) error + type DepartmentClosure struct + Children uint32 + ChildrenDepartment *Department + ID uint32 + Parent uint32 + ParentDepartment *Department + type Dict struct + Description string + Keyword string + Name string + func (u *Dict) Create(ctx kratosx.Context) error + func (u *Dict) Creates(ctx kratosx.Context, jobs []*Dict) error + func (u *Dict) DeleteByID(ctx kratosx.Context, id uint32) error + func (u *Dict) FindByID(ctx kratosx.Context, id uint32) error + func (u *Dict) FindByKeyword(ctx kratosx.Context, email string) error + func (u *Dict) Page(ctx kratosx.Context, options *types.PageOptions) ([]*Dict, uint32, error) + func (u *Dict) Update(ctx kratosx.Context) error + type DictValue struct + Description string + Dict *Dict + DictID uint32 + Extra string + Label string + Status *bool + Type string + Value string + Weight *uint32 + func (u *DictValue) AllByDictId(ctx kratosx.Context, id uint32) ([]*DictValue, error) + func (u *DictValue) Create(ctx kratosx.Context) error + func (u *DictValue) Creates(ctx kratosx.Context, jobs []*DictValue) error + func (u *DictValue) DeleteByID(ctx kratosx.Context, id uint32) error + func (u *DictValue) Page(ctx kratosx.Context, options *types.PageOptions) ([]*DictValue, uint32, error) + func (u *DictValue) Update(ctx kratosx.Context) error + type Job struct + Description string + Keyword string + Name string + Weight *uint32 + func (u *Job) Create(ctx kratosx.Context) error + func (u *Job) Creates(ctx kratosx.Context, jobs []*Job) error + func (u *Job) DeleteByID(ctx kratosx.Context, id uint32) error + func (u *Job) FindByID(ctx kratosx.Context, id uint32) error + func (u *Job) FindByKeyword(ctx kratosx.Context, email string) error + func (u *Job) Page(ctx kratosx.Context, options *types.PageOptions) ([]*Job, uint32, error) + func (u *Job) Update(ctx kratosx.Context) error + type Menu struct + Api *string + App string + Children []*Menu + Component *string + Icon *string + IsAffix *bool + IsCache *bool + IsHidden *bool + IsHome *bool + Keyword *string + Method *string + ParentID uint32 + Path *string + Permission *string + Redirect *string + Title string + Type string + Weight *uint32 + func (m *Menu) All(ctx kratosx.Context, scopes types.Scopes) ([]*Menu, error) + func (m *Menu) AppendChildren(child any) + func (m *Menu) ChildrenNode() []tree.Tree + func (m *Menu) Create(ctx kratosx.Context) error + func (m *Menu) DeleteByIds(ctx kratosx.Context, ids []uint32) error + func (m *Menu) FindByID(ctx kratosx.Context, id uint32) error + func (m *Menu) ID() uint32 + func (m *Menu) Parent() uint32 + func (m *Menu) Tree(ctx kratosx.Context, scopes types.Scopes) (tree.Tree, error) + func (m *Menu) Update(ctx kratosx.Context) error + func (m *Menu) UseHome(ctx kratosx.Context, srvKey string, menuId uint32) error + type Role struct + Children []*Role + DataScope string + DepartmentIds *string + Description *string + Keyword string + Name string + ParentID uint32 + Path string + Status *bool + func (r *Role) All(ctx kratosx.Context, scopes types.Scopes) ([]*Role, error) + func (r *Role) AppendChildren(child any) + func (r *Role) ChildrenNode() []tree.Tree + func (r *Role) Create(ctx kratosx.Context) error + func (r *Role) DeleteByID(ctx kratosx.Context, id uint32) error + func (r *Role) FindByID(ctx kratosx.Context, id uint32) error + func (r *Role) FindManagerIds(ctx kratosx.Context) ([]uint32, error) + func (r *Role) ID() uint32 + func (r *Role) Parent() uint32 + func (r *Role) ParentStatus(ctx kratosx.Context) bool + func (r *Role) Update(ctx kratosx.Context) error + type RoleClosure struct + Children uint32 + ChildrenRole *Role + ID uint32 + Parent uint32 + ParentRole *Role + type RoleMenu struct + Menu Menu + MenuID uint32 + Role Role + RoleID uint32 + func (rm *RoleMenu) DeleteByRoleID(ctx kratosx.Context, roleId uint32) error + func (rm *RoleMenu) MenuRoles(ctx kratosx.Context, menuId uint32) ([]*RoleMenu, error) + func (rm *RoleMenu) RoleMenus(ctx kratosx.Context, roleId uint32) ([]*RoleMenu, error) + func (rm *RoleMenu) Update(ctx kratosx.Context, roleId uint32, menuIds []uint32) error + type User struct + Avatar string + Department *Department + DepartmentID uint32 + Disabled *string + Email string + Gender string + LastLogin int64 + Name string + Nickname string + Password string + Phone string + Role *Role + RoleID uint32 + Status *bool + Token string + func (u *User) Create(ctx kratosx.Context) error + func (u *User) DeleteByID(ctx kratosx.Context, id uint32) error + func (u *User) FindByEmail(ctx kratosx.Context, email string) error + func (u *User) FindByID(ctx kratosx.Context, id uint32) error + func (u *User) FindByPhone(ctx kratosx.Context, phFind string) error + func (u *User) HasRoleManagerScope(ctx kratosx.Context, rid uint32) bool + func (u *User) HasUserManagerScope(ctx kratosx.Context, mid, id uint32) bool + func (u *User) ManagerDepartment(ctx kratosx.Context, uid uint32) ([]*Department, error) + func (u *User) ManagerDepartmentIds(ctx kratosx.Context, uid uint32) ([]uint32, error) + func (u *User) Page(ctx kratosx.Context, options *types.PageOptions) ([]*User, uint32, error) + func (u *User) Update(ctx kratosx.Context) error + func (u *User) UpdateLastLogin(ctx kratosx.Context, t uint32) error + type UserJob struct + Job *Job + JobID uint32 + UserID uint32 + func (ur *UserJob) Add(ctx kratosx.Context) error + func (ur *UserJob) DeleteByID(ctx kratosx.Context, id uint32) error + func (ur *UserJob) FindByUserAndJob(ctx kratosx.Context, userId, jobId uint32) error + func (ur *UserJob) Update(ctx kratosx.Context, userId uint32, jobIds []uint32) error + func (ur *UserJob) UserJobs(ctx kratosx.Context, userId uint32) ([]*UserJob, error) + type UserRole struct + Role *Role + RoleID uint32 + UserID uint32 + func (ur *UserRole) Add(ctx kratosx.Context) error + func (ur *UserRole) DeleteByID(ctx kratosx.Context, id uint32) error + func (ur *UserRole) FindByUserAndRole(ctx kratosx.Context, userId, roleId uint32) error + func (ur *UserRole) Update(ctx kratosx.Context, userId uint32, roleIds []uint32) error + func (ur *UserRole) UserRoles(ctx kratosx.Context, userId uint32) ([]*UserRole, error)