relationDB

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MigrateTenantAppMenu = []SysTenantAppMenu{}
	MigrateTenantConfig  = []SysTenantConfig{
		{TenantCode: def.TenantCodeDefault, RegisterRoleID: 2},
	}
	MigrateProjectInfo = []SysProjectInfo{{TenantCode: def.TenantCodeDefault, AdminUserID: adminUserID, ProjectID: defaultProjectID, ProjectName: "默认项目"}}
	MigrateDataProject = []SysDataProject{{ProjectID: defaultProjectID, TargetType: def.TargetRole, TargetID: 1, AuthType: def.AuthAdmin}}
	MigrateTenantInfo  = []SysTenantInfo{{Code: def.TenantCodeDefault, Name: "默认租户", AdminUserID: adminUserID, DefaultProjectID: defaultProjectID}}
	MigrateUserInfo    = []SysUserInfo{
		{TenantCode: def.TenantCodeDefault, UserID: adminUserID, UserName: sql.NullString{String: "administrator", Valid: true}, Password: "4f0fded4a38abe7a3ea32f898bb82298", Role: 1, NickName: "联犀管理员", IsAllData: def.True},
	}
	MigrateUserRole = []SysUserRole{
		{TenantCode: def.TenantCodeDefault, UserID: adminUserID, RoleID: 1},
		{TenantCode: def.TenantCodeDefault, UserID: adminUserID, RoleID: 2},
		{TenantCode: def.TenantCodeDefault, UserID: adminUserID, RoleID: 3},
	}
	MigrateRoleInfo = []SysRoleInfo{
		{ID: 1, TenantCode: def.TenantCodeDefault, Name: "管理员", Code: def.RoleCodeAdmin},
		{ID: 2, TenantCode: def.TenantCodeDefault, Name: "普通用户", Code: def.RoleCodeClient, Desc: "C端用户"},
		{ID: 3, TenantCode: def.TenantCodeDefault, Name: "超级管理员", Code: def.RoleCodeSupper}}
)
View Source
var (
	MigrateDictDetailAdcode = []SysDictDetail{}/* 43435 elements not displayed */

)

Functions

func Migrate

func Migrate(c conf.Database) error

func ToSlotDo

func ToSlotDo(in *SysSlotInfo) *slot.Info

func ToSlotsDo

func ToSlotsDo(in []*SysSlotInfo) (ret slot.Infos)

Types

type AccessFilter

type AccessFilter struct {
	Name       string
	Code       string
	Codes      []string
	IsNeedAuth int64
	Group      string
	WithApis   bool
}

type AccessRepo

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

func NewAccessRepo

func NewAccessRepo(in any) *AccessRepo

func (AccessRepo) CountByFilter

func (p AccessRepo) CountByFilter(ctx context.Context, f AccessFilter) (size int64, err error)

func (AccessRepo) Delete

func (p AccessRepo) Delete(ctx context.Context, id int64) error

func (AccessRepo) DeleteByFilter

func (p AccessRepo) DeleteByFilter(ctx context.Context, f AccessFilter) error

func (AccessRepo) FindByFilter

func (p AccessRepo) FindByFilter(ctx context.Context, f AccessFilter, page *stores.PageInfo) ([]*SysAccessInfo, error)

func (AccessRepo) FindOne

func (p AccessRepo) FindOne(ctx context.Context, id int64) (*SysAccessInfo, error)

func (AccessRepo) FindOneByFilter

func (p AccessRepo) FindOneByFilter(ctx context.Context, f AccessFilter) (*SysAccessInfo, error)

func (AccessRepo) Insert

func (p AccessRepo) Insert(ctx context.Context, data *SysAccessInfo) error

func (AccessRepo) Update

func (p AccessRepo) Update(ctx context.Context, data *SysAccessInfo) error

type ApiInfoFilter

type ApiInfoFilter struct {
	ApiIDs     []int64
	Route      string
	Method     string
	Name       string
	AccessCode string
	AuthType   int64
	WithAccess bool
}

type ApiInfoRepo

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

func NewApiInfoRepo

func NewApiInfoRepo(in any) *ApiInfoRepo

func (ApiInfoRepo) CountByFilter

func (p ApiInfoRepo) CountByFilter(ctx context.Context, f ApiInfoFilter) (size int64, err error)

func (ApiInfoRepo) Delete

func (p ApiInfoRepo) Delete(ctx context.Context, id int64) error

func (ApiInfoRepo) DeleteByFilter

func (p ApiInfoRepo) DeleteByFilter(ctx context.Context, f ApiInfoFilter) error

func (ApiInfoRepo) FindByFilter

func (p ApiInfoRepo) FindByFilter(ctx context.Context, f ApiInfoFilter, page *stores.PageInfo) ([]*SysApiInfo, error)

func (ApiInfoRepo) FindOne

func (p ApiInfoRepo) FindOne(ctx context.Context, id int64) (*SysApiInfo, error)

func (ApiInfoRepo) FindOneByFilter

func (p ApiInfoRepo) FindOneByFilter(ctx context.Context, f ApiInfoFilter) (*SysApiInfo, error)

func (ApiInfoRepo) Insert

func (p ApiInfoRepo) Insert(ctx context.Context, data *SysApiInfo) error

func (ApiInfoRepo) Update

func (p ApiInfoRepo) Update(ctx context.Context, data *SysApiInfo) error

type AppInfoFilter

type AppInfoFilter struct {
	ID    int64
	Codes []string
	Code  string
	Name  string
}

type AppInfoRepo

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

func NewAppInfoRepo

func NewAppInfoRepo(in any) *AppInfoRepo

func (AppInfoRepo) CountByFilter

func (p AppInfoRepo) CountByFilter(ctx context.Context, f AppInfoFilter) (size int64, err error)

func (AppInfoRepo) Delete

func (p AppInfoRepo) Delete(ctx context.Context, id int64) error

func (AppInfoRepo) DeleteByFilter

func (p AppInfoRepo) DeleteByFilter(ctx context.Context, f AppInfoFilter) error

func (AppInfoRepo) FindByFilter

func (p AppInfoRepo) FindByFilter(ctx context.Context, f AppInfoFilter, page *stores.PageInfo) ([]*SysAppInfo, error)

func (AppInfoRepo) FindOne

func (p AppInfoRepo) FindOne(ctx context.Context, id int64) (*SysAppInfo, error)

func (AppInfoRepo) FindOneByFilter

func (p AppInfoRepo) FindOneByFilter(ctx context.Context, f AppInfoFilter) (*SysAppInfo, error)

func (AppInfoRepo) Insert

func (p AppInfoRepo) Insert(ctx context.Context, data *SysAppInfo) error

func (AppInfoRepo) MultiInsert

func (p AppInfoRepo) MultiInsert(ctx context.Context, data []*SysAppInfo) error

批量插入 LightStrategyDevice 记录

func (AppInfoRepo) Update

func (p AppInfoRepo) Update(ctx context.Context, data *SysAppInfo) error

type AppModuleFilter

type AppModuleFilter struct {
	ModuleCodes []string
	AppCodes    []string
}

type AppModuleRepo

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

func NewAppModuleRepo

func NewAppModuleRepo(in any) *AppModuleRepo

func (AppModuleRepo) CountByFilter

func (p AppModuleRepo) CountByFilter(ctx context.Context, f AppModuleFilter) (size int64, err error)

func (AppModuleRepo) Delete

func (p AppModuleRepo) Delete(ctx context.Context, id int64) error

func (AppModuleRepo) DeleteByFilter

func (p AppModuleRepo) DeleteByFilter(ctx context.Context, f AppModuleFilter) error

func (AppModuleRepo) FindByFilter

func (p AppModuleRepo) FindByFilter(ctx context.Context, f AppModuleFilter, page *stores.PageInfo) ([]*SysAppModule, error)

func (AppModuleRepo) FindOne

func (p AppModuleRepo) FindOne(ctx context.Context, id int64) (*SysAppModule, error)

func (AppModuleRepo) FindOneByFilter

func (p AppModuleRepo) FindOneByFilter(ctx context.Context, f AppModuleFilter) (*SysAppModule, error)

func (AppModuleRepo) Insert

func (p AppModuleRepo) Insert(ctx context.Context, data *SysAppModule) error

func (AppModuleRepo) MultiInsert

func (p AppModuleRepo) MultiInsert(ctx context.Context, data []*SysAppModule) error

批量插入 LightStrategyDevice 记录

func (AppModuleRepo) MultiUpdate

func (p AppModuleRepo) MultiUpdate(ctx context.Context, appCode string, moduleCodes []string) error

func (AppModuleRepo) Update

func (p AppModuleRepo) Update(ctx context.Context, data *SysAppModule) error

type AreaInfoFilter

type AreaInfoFilter struct {
	ProjectID    int64
	ParentAreaID int64
	AreaIDs      []int64
	AreaIDPath   string
	IsLeaf       int64 //是否是叶子节点
	GroupCount   *stores.Cmp
	DeviceCount  *stores.Cmp
	*AreaInfoWith
}

type AreaInfoRepo

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

func NewAreaInfoRepo

func NewAreaInfoRepo(in any) *AreaInfoRepo

func (AreaInfoRepo) CountByFilter

func (p AreaInfoRepo) CountByFilter(ctx context.Context, f AreaInfoFilter) (size int64, err error)

func (AreaInfoRepo) Delete

func (g AreaInfoRepo) Delete(ctx context.Context, areaID int64) error

func (AreaInfoRepo) DeleteByFilter

func (g AreaInfoRepo) DeleteByFilter(ctx context.Context, f AreaInfoFilter) error

func (AreaInfoRepo) FindByFilter

func (p AreaInfoRepo) FindByFilter(ctx context.Context, f AreaInfoFilter, page *stores.PageInfo) ([]*SysAreaInfo, error)

func (AreaInfoRepo) FindIDsWithChildren

func (g AreaInfoRepo) FindIDsWithChildren(ctx context.Context, areaIDs []int64) ([]int64, error)

func (AreaInfoRepo) FindOne

func (g AreaInfoRepo) FindOne(ctx context.Context, areaID int64, with *AreaInfoWith) (*SysAreaInfo, error)

func (AreaInfoRepo) FindOneByFilter

func (g AreaInfoRepo) FindOneByFilter(ctx context.Context, f AreaInfoFilter) (*SysAreaInfo, error)

func (AreaInfoRepo) Insert

func (g AreaInfoRepo) Insert(ctx context.Context, data *SysAreaInfo) error

func (AreaInfoRepo) MultiInsert

func (m AreaInfoRepo) MultiInsert(ctx context.Context, data []*SysAreaInfo) error

批量插入 LightStrategyDevice 记录

func (AreaInfoRepo) Update

func (g AreaInfoRepo) Update(ctx context.Context, data *SysAreaInfo) error

func (AreaInfoRepo) With

func (p AreaInfoRepo) With(db *gorm.DB, with *AreaInfoWith) *gorm.DB

type AreaInfoWith

type AreaInfoWith struct {
	Children bool
	Parent   bool
}

type AreaProfileFilter

type AreaProfileFilter struct {
	Codes  []string
	Code   string
	AreaID int64
}

type AreaProfileRepo

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

func NewAreaProfileRepo

func NewAreaProfileRepo(in any) *AreaProfileRepo

func (AreaProfileRepo) CountByFilter

func (p AreaProfileRepo) CountByFilter(ctx context.Context, f AreaProfileFilter) (size int64, err error)

func (AreaProfileRepo) Delete

func (p AreaProfileRepo) Delete(ctx context.Context, id int64) error

func (AreaProfileRepo) DeleteByFilter

func (p AreaProfileRepo) DeleteByFilter(ctx context.Context, f AreaProfileFilter) error

func (AreaProfileRepo) FindByFilter

func (AreaProfileRepo) FindOne

func (p AreaProfileRepo) FindOne(ctx context.Context, id int64) (*SysAreaProfile, error)

func (AreaProfileRepo) FindOneByFilter

func (p AreaProfileRepo) FindOneByFilter(ctx context.Context, f AreaProfileFilter) (*SysAreaProfile, error)

func (AreaProfileRepo) Insert

func (p AreaProfileRepo) Insert(ctx context.Context, data *SysAreaProfile) error

func (AreaProfileRepo) MultiInsert

func (p AreaProfileRepo) MultiInsert(ctx context.Context, data []*SysAreaProfile) error

批量插入 LightStrategyDevice 记录

func (AreaProfileRepo) Update

func (p AreaProfileRepo) Update(ctx context.Context, data *SysAreaProfile) error

type DataAreaFilter

type DataAreaFilter struct {
	ProjectID  int64
	AreaIDs    []int64
	Targets    []*Target
	TargetID   int64
	TargetType def.TargetType
	AuthType   def.AuthType
}

type DataAreaRepo

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

func NewDataAreaRepo

func NewDataAreaRepo(in any) *DataAreaRepo

func (DataAreaRepo) CountByFilter

func (p DataAreaRepo) CountByFilter(ctx context.Context, f DataAreaFilter) (size int64, err error)

func (DataAreaRepo) Delete

func (g DataAreaRepo) Delete(ctx context.Context, id int64) error

func (DataAreaRepo) DeleteByFilter

func (g DataAreaRepo) DeleteByFilter(ctx context.Context, f DataAreaFilter) error

func (DataAreaRepo) FindByFilter

func (p DataAreaRepo) FindByFilter(ctx context.Context, f DataAreaFilter, page *stores.PageInfo) ([]*SysDataArea, error)

func (DataAreaRepo) FindOne

func (g DataAreaRepo) FindOne(ctx context.Context, id int64) (*SysDataArea, error)

func (DataAreaRepo) FindOneByFilter

func (g DataAreaRepo) FindOneByFilter(ctx context.Context, f DataAreaFilter) (*SysDataArea, error)

func (DataAreaRepo) Insert

func (g DataAreaRepo) Insert(ctx context.Context, data *SysDataArea) error

func (DataAreaRepo) MultiInsert

func (m DataAreaRepo) MultiInsert(ctx context.Context, data []*SysDataArea) error

批量插入 LightStrategyDevice 记录

func (DataAreaRepo) MultiUpdate

func (g DataAreaRepo) MultiUpdate(ctx context.Context, target *Target, projectID int64, areas []*userDataAuth.Area) error

func (DataAreaRepo) Update

func (g DataAreaRepo) Update(ctx context.Context, data *SysDataArea) error

type DataOpenAccessFilter

type DataOpenAccessFilter struct {
	TenantCode string
	UserID     int64
	Code       string
}

type DataOpenAccessRepo

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

func NewDataOpenAccessRepo

func NewDataOpenAccessRepo(in any) *DataOpenAccessRepo

func (DataOpenAccessRepo) CountByFilter

func (p DataOpenAccessRepo) CountByFilter(ctx context.Context, f DataOpenAccessFilter) (size int64, err error)

func (DataOpenAccessRepo) Delete

func (p DataOpenAccessRepo) Delete(ctx context.Context, id int64) error

func (DataOpenAccessRepo) DeleteByFilter

func (p DataOpenAccessRepo) DeleteByFilter(ctx context.Context, f DataOpenAccessFilter) error

func (DataOpenAccessRepo) FindByFilter

func (DataOpenAccessRepo) FindOne

func (DataOpenAccessRepo) FindOneByFilter

func (DataOpenAccessRepo) Insert

func (DataOpenAccessRepo) MultiInsert

func (p DataOpenAccessRepo) MultiInsert(ctx context.Context, data []*SysDataOpenAccess) error

批量插入 LightStrategyDevice 记录

func (DataOpenAccessRepo) Update

type DataProjectFilter

type DataProjectFilter struct {
	ProjectID  int64
	Targets    []*Target
	AuthType   def.AuthType
	Target     *Target
	TargetType def.TargetType
	TargetIDs  []int64
}

type DataProjectRepo

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

func NewDataProjectRepo

func NewDataProjectRepo(in any) *DataProjectRepo

func (DataProjectRepo) CountByFilter

func (p DataProjectRepo) CountByFilter(ctx context.Context, f DataProjectFilter) (size int64, err error)

func (DataProjectRepo) Delete

func (g DataProjectRepo) Delete(ctx context.Context, targetType string, targetID int64, projectID int64) error

func (DataProjectRepo) DeleteByFilter

func (g DataProjectRepo) DeleteByFilter(ctx context.Context, f DataProjectFilter) error

func (DataProjectRepo) FindByFilter

func (DataProjectRepo) FindOne

func (g DataProjectRepo) FindOne(ctx context.Context, targetType string, targetID int64, projectID int64) (*SysDataProject, error)

func (DataProjectRepo) FindOneByFilter

func (g DataProjectRepo) FindOneByFilter(ctx context.Context, f DataProjectFilter) (*SysDataProject, error)

func (DataProjectRepo) Insert

func (g DataProjectRepo) Insert(ctx context.Context, data *SysDataProject) error

func (DataProjectRepo) MultiInsert

func (m DataProjectRepo) MultiInsert(ctx context.Context, data []*SysDataProject) error

批量插入 LightStrategyDevice 记录

func (DataProjectRepo) MultiUpdate

func (g DataProjectRepo) MultiUpdate(ctx context.Context, userID int64, projects []*userDataAuth.Project) error

func (DataProjectRepo) Update

func (g DataProjectRepo) Update(ctx context.Context, data *SysDataProject) error

type DateRange

type DateRange struct {
	Start string
	End   string
}

type DeptInfoFilter added in v1.0.1

type DeptInfoFilter struct {
	ID           int64
	IDs          []int64
	WithChildren bool
	IDPath       string
	ParentID     int64
	Status       int64
	Name         string
	Names        []string
}

type DeptInfoRepo added in v1.0.1

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

func NewDeptInfoRepo added in v1.0.1

func NewDeptInfoRepo(in any) *DeptInfoRepo

func (DeptInfoRepo) CountByFilter added in v1.0.1

func (p DeptInfoRepo) CountByFilter(ctx context.Context, f DeptInfoFilter) (size int64, err error)

func (DeptInfoRepo) Delete added in v1.0.1

func (p DeptInfoRepo) Delete(ctx context.Context, id int64) error

func (DeptInfoRepo) DeleteByFilter added in v1.0.1

func (p DeptInfoRepo) DeleteByFilter(ctx context.Context, f DeptInfoFilter) error

func (DeptInfoRepo) FindByFilter added in v1.0.1

func (p DeptInfoRepo) FindByFilter(ctx context.Context, f DeptInfoFilter, page *stores.PageInfo) ([]*SysDeptInfo, error)

func (DeptInfoRepo) FindOne added in v1.0.1

func (p DeptInfoRepo) FindOne(ctx context.Context, id int64) (*SysDeptInfo, error)

func (DeptInfoRepo) FindOneByFilter added in v1.0.1

func (p DeptInfoRepo) FindOneByFilter(ctx context.Context, f DeptInfoFilter) (*SysDeptInfo, error)

func (DeptInfoRepo) Insert added in v1.0.1

func (p DeptInfoRepo) Insert(ctx context.Context, data *SysDeptInfo) error

func (DeptInfoRepo) MultiInsert added in v1.0.1

func (p DeptInfoRepo) MultiInsert(ctx context.Context, data []*SysDeptInfo) error

批量插入 LightStrategyDevice 记录

func (DeptInfoRepo) Update added in v1.0.1

func (p DeptInfoRepo) Update(ctx context.Context, data *SysDeptInfo) error

type DeptUserFilter added in v1.0.1

type DeptUserFilter struct {
	UserID   int64
	DeptID   int64
	WithUser bool
}

type DeptUserRepo added in v1.0.1

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

func NewDeptUserRepo added in v1.0.1

func NewDeptUserRepo(in any) *DeptUserRepo

func (DeptUserRepo) CountByFilter added in v1.0.1

func (p DeptUserRepo) CountByFilter(ctx context.Context, f DeptUserFilter) (size int64, err error)

func (DeptUserRepo) Delete added in v1.0.1

func (p DeptUserRepo) Delete(ctx context.Context, id int64) error

func (DeptUserRepo) DeleteByFilter added in v1.0.1

func (p DeptUserRepo) DeleteByFilter(ctx context.Context, f DeptUserFilter) error

func (DeptUserRepo) FindByFilter added in v1.0.1

func (p DeptUserRepo) FindByFilter(ctx context.Context, f DeptUserFilter, page *stores.PageInfo) ([]*SysDeptUser, error)

func (DeptUserRepo) FindOne added in v1.0.1

func (p DeptUserRepo) FindOne(ctx context.Context, id int64) (*SysDeptUser, error)

func (DeptUserRepo) FindOneByFilter added in v1.0.1

func (p DeptUserRepo) FindOneByFilter(ctx context.Context, f DeptUserFilter) (*SysDeptUser, error)

func (DeptUserRepo) Insert added in v1.0.1

func (p DeptUserRepo) Insert(ctx context.Context, data *SysDeptUser) error

func (DeptUserRepo) MultiInsert added in v1.0.1

func (p DeptUserRepo) MultiInsert(ctx context.Context, data []*SysDeptUser) error

批量插入 LightStrategyDevice 记录

func (DeptUserRepo) MultiUpdate added in v1.0.1

func (p DeptUserRepo) MultiUpdate(ctx context.Context, userID int64, roleIDs []int64) error

func (DeptUserRepo) Update added in v1.0.1

func (p DeptUserRepo) Update(ctx context.Context, data *SysDeptUser) error

type DictDetailFilter

type DictDetailFilter struct {
	ID           int64
	IDs          []int64
	DictCode     string
	WithChildren bool
	IDPath       string
	ParentID     int64
	Status       int64
	Label        string
	Value        string
}

type DictDetailRepo

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

func NewDictDetailRepo

func NewDictDetailRepo(in any) *DictDetailRepo

func (DictDetailRepo) CountByFilter

func (p DictDetailRepo) CountByFilter(ctx context.Context, f DictDetailFilter) (size int64, err error)

func (DictDetailRepo) Delete

func (p DictDetailRepo) Delete(ctx context.Context, id int64) error

func (DictDetailRepo) DeleteByFilter

func (p DictDetailRepo) DeleteByFilter(ctx context.Context, f DictDetailFilter) error

func (DictDetailRepo) FindByFilter

func (p DictDetailRepo) FindByFilter(ctx context.Context, f DictDetailFilter, page *stores.PageInfo) ([]*SysDictDetail, error)

func (DictDetailRepo) FindOne

func (p DictDetailRepo) FindOne(ctx context.Context, id int64) (*SysDictDetail, error)

func (DictDetailRepo) FindOneByFilter

func (p DictDetailRepo) FindOneByFilter(ctx context.Context, f DictDetailFilter) (*SysDictDetail, error)

func (DictDetailRepo) Insert

func (p DictDetailRepo) Insert(ctx context.Context, data *SysDictDetail) error

func (DictDetailRepo) MultiInsert

func (p DictDetailRepo) MultiInsert(ctx context.Context, data []*SysDictDetail) error

批量插入 LightStrategyDevice 记录

func (DictDetailRepo) Update

func (p DictDetailRepo) Update(ctx context.Context, data *SysDictDetail) error

type DictInfoFilter

type DictInfoFilter struct {
	ID    int64
	Name  string
	Group string
	Code  string
}

type DictInfoRepo

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

func NewDictInfoRepo

func NewDictInfoRepo(in any) *DictInfoRepo

func (DictInfoRepo) CountByFilter

func (p DictInfoRepo) CountByFilter(ctx context.Context, f DictInfoFilter) (size int64, err error)

func (DictInfoRepo) Delete

func (p DictInfoRepo) Delete(ctx context.Context, id int64) error

func (DictInfoRepo) DeleteByFilter

func (p DictInfoRepo) DeleteByFilter(ctx context.Context, f DictInfoFilter) error

func (DictInfoRepo) FindByFilter

func (p DictInfoRepo) FindByFilter(ctx context.Context, f DictInfoFilter, page *stores.PageInfo) ([]*SysDictInfo, error)

func (DictInfoRepo) FindOne

func (p DictInfoRepo) FindOne(ctx context.Context, id int64) (*SysDictInfo, error)

func (DictInfoRepo) FindOneByFilter

func (p DictInfoRepo) FindOneByFilter(ctx context.Context, f DictInfoFilter) (*SysDictInfo, error)

func (DictInfoRepo) Insert

func (p DictInfoRepo) Insert(ctx context.Context, data *SysDictInfo) error

func (DictInfoRepo) MultiInsert

func (p DictInfoRepo) MultiInsert(ctx context.Context, data []*SysDictInfo) error

批量插入 LightStrategyDevice 记录

func (DictInfoRepo) Update

func (p DictInfoRepo) Update(ctx context.Context, data *SysDictInfo) error

type ExampleFilter

type ExampleFilter struct {
}

type ExampleRepo

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

func NewExampleRepo

func NewExampleRepo(in any) *ExampleRepo

func (ExampleRepo) CountByFilter

func (p ExampleRepo) CountByFilter(ctx context.Context, f ExampleFilter) (size int64, err error)

func (ExampleRepo) Delete

func (p ExampleRepo) Delete(ctx context.Context, id int64) error

func (ExampleRepo) DeleteByFilter

func (p ExampleRepo) DeleteByFilter(ctx context.Context, f ExampleFilter) error

func (ExampleRepo) FindByFilter

func (p ExampleRepo) FindByFilter(ctx context.Context, f ExampleFilter, page *stores.PageInfo) ([]*SysExample, error)

func (ExampleRepo) FindOne

func (p ExampleRepo) FindOne(ctx context.Context, id int64) (*SysExample, error)

func (ExampleRepo) FindOneByFilter

func (p ExampleRepo) FindOneByFilter(ctx context.Context, f ExampleFilter) (*SysExample, error)

func (ExampleRepo) Insert

func (p ExampleRepo) Insert(ctx context.Context, data *SysExample) error

func (ExampleRepo) MultiInsert

func (p ExampleRepo) MultiInsert(ctx context.Context, data []*SysExample) error

批量插入 LightStrategyDevice 记录

func (ExampleRepo) Update

func (p ExampleRepo) Update(ctx context.Context, data *SysExample) error

func (ExampleRepo) UpdateWithField

func (d ExampleRepo) UpdateWithField(ctx context.Context, f ExampleFilter, updates map[string]any) error

type LoginLogFilter

type LoginLogFilter struct {
	IpAddr        string
	LoginLocation string
	Data          *DateRange
}

type LoginLogRepo

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

func NewLoginLogRepo

func NewLoginLogRepo(in any) *LoginLogRepo

func (LoginLogRepo) CountByFilter

func (p LoginLogRepo) CountByFilter(ctx context.Context, f LoginLogFilter) (size int64, err error)

func (LoginLogRepo) Delete

func (p LoginLogRepo) Delete(ctx context.Context, id int64) error

func (LoginLogRepo) DeleteByFilter

func (p LoginLogRepo) DeleteByFilter(ctx context.Context, f LoginLogFilter) error

func (LoginLogRepo) FindByFilter

func (p LoginLogRepo) FindByFilter(ctx context.Context, f LoginLogFilter, page *stores.PageInfo) ([]*SysLoginLog, error)

func (LoginLogRepo) FindOne

func (p LoginLogRepo) FindOne(ctx context.Context, id int64) (*SysLoginLog, error)

func (LoginLogRepo) FindOneByFilter

func (p LoginLogRepo) FindOneByFilter(ctx context.Context, f LoginLogFilter) (*SysLoginLog, error)

func (LoginLogRepo) Insert

func (p LoginLogRepo) Insert(ctx context.Context, data *SysLoginLog) error

func (LoginLogRepo) Update

func (p LoginLogRepo) Update(ctx context.Context, data *SysLoginLog) error
type MenuInfoFilter struct {
	ModuleCode string
	Name       string
	Path       string
	MenuIDs    []int64
	IsCommon   int64
}
type MenuInfoRepo struct {
	// contains filtered or unexported fields
}

func NewMenuInfoRepo

func NewMenuInfoRepo(in any) *MenuInfoRepo
func (p MenuInfoRepo) CountByFilter(ctx context.Context, f MenuInfoFilter) (size int64, err error)
func (p MenuInfoRepo) Delete(ctx context.Context, id int64) error
func (p MenuInfoRepo) DeleteByFilter(ctx context.Context, f MenuInfoFilter) error
func (p MenuInfoRepo) FindByFilter(ctx context.Context, f MenuInfoFilter, page *stores.PageInfo) ([]*SysModuleMenu, error)
func (p MenuInfoRepo) FindOne(ctx context.Context, id int64) (*SysModuleMenu, error)
func (p MenuInfoRepo) FindOneByFilter(ctx context.Context, f MenuInfoFilter) (*SysModuleMenu, error)
func (p MenuInfoRepo) Insert(ctx context.Context, data *SysModuleMenu) error
func (p MenuInfoRepo) Update(ctx context.Context, data *SysModuleMenu) error

type MessageInfoFilter

type MessageInfoFilter struct {
	NotifyCode       string
	Group            string
	IsGlobal         int64
	IsDirectNotify   int64 //是否是发送通知消息创建
	NotifyTime       *stores.Cmp
	WithNotifyConfig bool
}

type MessageInfoRepo

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

func NewMessageInfoRepo

func NewMessageInfoRepo(in any) *MessageInfoRepo

func (MessageInfoRepo) CountByFilter

func (p MessageInfoRepo) CountByFilter(ctx context.Context, f MessageInfoFilter) (size int64, err error)

func (MessageInfoRepo) Delete

func (p MessageInfoRepo) Delete(ctx context.Context, id int64) error

func (MessageInfoRepo) DeleteByFilter

func (p MessageInfoRepo) DeleteByFilter(ctx context.Context, f MessageInfoFilter) error

func (MessageInfoRepo) FindByFilter

func (MessageInfoRepo) FindOne

func (p MessageInfoRepo) FindOne(ctx context.Context, id int64) (*SysMessageInfo, error)

func (MessageInfoRepo) FindOneByFilter

func (p MessageInfoRepo) FindOneByFilter(ctx context.Context, f MessageInfoFilter) (*SysMessageInfo, error)

func (MessageInfoRepo) Insert

func (p MessageInfoRepo) Insert(ctx context.Context, data *SysMessageInfo) error

func (MessageInfoRepo) MultiInsert

func (p MessageInfoRepo) MultiInsert(ctx context.Context, data []*SysMessageInfo) error

批量插入 LightStrategyDevice 记录

func (MessageInfoRepo) Update

func (p MessageInfoRepo) Update(ctx context.Context, data *SysMessageInfo) error

type ModuleInfoFilter

type ModuleInfoFilter struct {
	ID        int64
	Codes     []string
	Code      string
	Name      string
	WithMenus bool
	Type      int64
}

type ModuleInfoRepo

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

func NewModuleInfoRepo

func NewModuleInfoRepo(in any) *ModuleInfoRepo

func (ModuleInfoRepo) CountByFilter

func (p ModuleInfoRepo) CountByFilter(ctx context.Context, f ModuleInfoFilter) (size int64, err error)

func (ModuleInfoRepo) Delete

func (p ModuleInfoRepo) Delete(ctx context.Context, id int64) error

func (ModuleInfoRepo) DeleteByFilter

func (p ModuleInfoRepo) DeleteByFilter(ctx context.Context, f ModuleInfoFilter) error

func (ModuleInfoRepo) FindByFilter

func (p ModuleInfoRepo) FindByFilter(ctx context.Context, f ModuleInfoFilter, page *stores.PageInfo) ([]*SysModuleInfo, error)

func (ModuleInfoRepo) FindOne

func (p ModuleInfoRepo) FindOne(ctx context.Context, id int64) (*SysModuleInfo, error)

func (ModuleInfoRepo) FindOneByFilter

func (p ModuleInfoRepo) FindOneByFilter(ctx context.Context, f ModuleInfoFilter) (*SysModuleInfo, error)

func (ModuleInfoRepo) Insert

func (p ModuleInfoRepo) Insert(ctx context.Context, data *SysModuleInfo) error

func (ModuleInfoRepo) MultiInsert

func (p ModuleInfoRepo) MultiInsert(ctx context.Context, data []*SysModuleInfo) error

批量插入 LightStrategyDevice 记录

func (ModuleInfoRepo) Update

func (p ModuleInfoRepo) Update(ctx context.Context, data *SysModuleInfo) error

type NotifyChannelFilter

type NotifyChannelFilter struct {
	Name string
	Type string
}

type NotifyChannelRepo

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

func NewNotifyChannelRepo

func NewNotifyChannelRepo(in any) *NotifyChannelRepo

func (NotifyChannelRepo) CountByFilter

func (p NotifyChannelRepo) CountByFilter(ctx context.Context, f NotifyChannelFilter) (size int64, err error)

func (NotifyChannelRepo) Delete

func (p NotifyChannelRepo) Delete(ctx context.Context, id int64) error

func (NotifyChannelRepo) DeleteByFilter

func (p NotifyChannelRepo) DeleteByFilter(ctx context.Context, f NotifyChannelFilter) error

func (NotifyChannelRepo) FindByFilter

func (NotifyChannelRepo) FindOne

func (NotifyChannelRepo) FindOneByFilter

func (NotifyChannelRepo) Insert

func (NotifyChannelRepo) MultiInsert

func (p NotifyChannelRepo) MultiInsert(ctx context.Context, data []*SysNotifyChannel) error

批量插入 LightStrategyDevice 记录

func (NotifyChannelRepo) Update

type NotifyConfigFilter

type NotifyConfigFilter struct {
	ID            int64
	Code          string
	Group         string
	Name          string
	WithTemplates bool
}

type NotifyConfigRepo

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

func NewNotifyConfigRepo

func NewNotifyConfigRepo(in any) *NotifyConfigRepo

func (NotifyConfigRepo) CountByFilter

func (p NotifyConfigRepo) CountByFilter(ctx context.Context, f NotifyConfigFilter) (size int64, err error)

func (NotifyConfigRepo) Delete

func (p NotifyConfigRepo) Delete(ctx context.Context, id int64) error

func (NotifyConfigRepo) DeleteByFilter

func (p NotifyConfigRepo) DeleteByFilter(ctx context.Context, f NotifyConfigFilter) error

func (NotifyConfigRepo) FindByFilter

func (NotifyConfigRepo) FindOne

func (p NotifyConfigRepo) FindOne(ctx context.Context, id int64) (*SysNotifyConfig, error)

func (NotifyConfigRepo) FindOneByFilter

func (NotifyConfigRepo) Insert

func (p NotifyConfigRepo) Insert(ctx context.Context, data *SysNotifyConfig) error

func (NotifyConfigRepo) MultiInsert

func (p NotifyConfigRepo) MultiInsert(ctx context.Context, data []*SysNotifyConfig) error

批量插入 LightStrategyDevice 记录

func (NotifyConfigRepo) Update

func (p NotifyConfigRepo) Update(ctx context.Context, data *SysNotifyConfig) error

func (NotifyConfigRepo) UpdateWithField

func (d NotifyConfigRepo) UpdateWithField(ctx context.Context, f NotifyConfigFilter, updates map[string]any) error

type NotifyConfigTemplateFilter

type NotifyConfigTemplateFilter struct {
	NotifyCode string
	Type       string
}

type NotifyConfigTemplateRepo

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

func NewNotifyConfigTemplateRepo

func NewNotifyConfigTemplateRepo(in any) *NotifyConfigTemplateRepo

func (NotifyConfigTemplateRepo) CountByFilter

func (p NotifyConfigTemplateRepo) CountByFilter(ctx context.Context, f NotifyConfigTemplateFilter) (size int64, err error)

func (NotifyConfigTemplateRepo) Delete

func (NotifyConfigTemplateRepo) DeleteByFilter

func (NotifyConfigTemplateRepo) FindByFilter

func (NotifyConfigTemplateRepo) FindOne

func (NotifyConfigTemplateRepo) FindOneByFilter

func (NotifyConfigTemplateRepo) Insert

func (NotifyConfigTemplateRepo) MultiInsert

批量插入 LightStrategyDevice 记录

func (NotifyConfigTemplateRepo) MultiUpdate

func (NotifyConfigTemplateRepo) Save

批量插入 LightStrategyDevice 记录

func (NotifyConfigTemplateRepo) Update

type NotifyTemplateFilter

type NotifyTemplateFilter struct {
	Name       string
	NotifyCode string
	Type       string
}

type NotifyTemplateRepo

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

func NewNotifyTemplateRepo

func NewNotifyTemplateRepo(in any) *NotifyTemplateRepo

func (NotifyTemplateRepo) CountByFilter

func (p NotifyTemplateRepo) CountByFilter(ctx context.Context, f NotifyTemplateFilter) (size int64, err error)

func (NotifyTemplateRepo) Delete

func (p NotifyTemplateRepo) Delete(ctx context.Context, id int64) error

func (NotifyTemplateRepo) DeleteByFilter

func (p NotifyTemplateRepo) DeleteByFilter(ctx context.Context, f NotifyTemplateFilter) error

func (NotifyTemplateRepo) FindByFilter

func (NotifyTemplateRepo) FindOne

func (NotifyTemplateRepo) FindOneByFilter

func (NotifyTemplateRepo) Insert

func (NotifyTemplateRepo) MultiInsert

func (p NotifyTemplateRepo) MultiInsert(ctx context.Context, data []*SysNotifyTemplate) error

批量插入 LightStrategyDevice 记录

func (NotifyTemplateRepo) Save

批量插入 LightStrategyDevice 记录

func (NotifyTemplateRepo) Update

type OperLogFilter

type OperLogFilter struct {
	OperName     string
	OperUserName string
	BusinessType int64
}

type OperLogRepo

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

func NewOperLogRepo

func NewOperLogRepo(in any) *OperLogRepo

func (OperLogRepo) CountByFilter

func (p OperLogRepo) CountByFilter(ctx context.Context, f OperLogFilter) (size int64, err error)

func (OperLogRepo) Delete

func (p OperLogRepo) Delete(ctx context.Context, id int64) error

func (OperLogRepo) DeleteByFilter

func (p OperLogRepo) DeleteByFilter(ctx context.Context, f OperLogFilter) error

func (OperLogRepo) FindByFilter

func (p OperLogRepo) FindByFilter(ctx context.Context, f OperLogFilter, page *stores.PageInfo) ([]*SysOperLog, error)

func (OperLogRepo) FindOne

func (p OperLogRepo) FindOne(ctx context.Context, id int64) (*SysOperLog, error)

func (OperLogRepo) FindOneByFilter

func (p OperLogRepo) FindOneByFilter(ctx context.Context, f OperLogFilter) (*SysOperLog, error)

func (OperLogRepo) Insert

func (p OperLogRepo) Insert(ctx context.Context, data *SysOperLog) error

func (OperLogRepo) Update

func (p OperLogRepo) Update(ctx context.Context, data *SysOperLog) error

type OpsFeedbackFilter

type OpsFeedbackFilter struct {
	TenantCode string
	ProjectID  int64
	Type       string
	Status     ops.WorkOrderStatus
}

type OpsFeedbackRepo

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

func NewOpsFeedbackRepo

func NewOpsFeedbackRepo(in any) *OpsFeedbackRepo

func (OpsFeedbackRepo) CountByFilter

func (p OpsFeedbackRepo) CountByFilter(ctx context.Context, f OpsFeedbackFilter) (size int64, err error)

func (OpsFeedbackRepo) Delete

func (p OpsFeedbackRepo) Delete(ctx context.Context, id int64) error

func (OpsFeedbackRepo) DeleteByFilter

func (p OpsFeedbackRepo) DeleteByFilter(ctx context.Context, f OpsFeedbackFilter) error

func (OpsFeedbackRepo) FindByFilter

func (OpsFeedbackRepo) FindOne

func (p OpsFeedbackRepo) FindOne(ctx context.Context, id int64) (*SysOpsFeedback, error)

func (OpsFeedbackRepo) FindOneByFilter

func (p OpsFeedbackRepo) FindOneByFilter(ctx context.Context, f OpsFeedbackFilter) (*SysOpsFeedback, error)

func (OpsFeedbackRepo) Insert

func (p OpsFeedbackRepo) Insert(ctx context.Context, data *SysOpsFeedback) error

func (OpsFeedbackRepo) MultiInsert

func (p OpsFeedbackRepo) MultiInsert(ctx context.Context, data []*SysOpsFeedback) error

批量插入 LightStrategyDevice 记录

func (OpsFeedbackRepo) Update

func (p OpsFeedbackRepo) Update(ctx context.Context, data *SysOpsFeedback) error

type OpsWorkOrderFilter

type OpsWorkOrderFilter struct {
	Status    ops.WorkOrderStatus
	Type      string
	StartTime time.Time
	EndTime   time.Time
	AreaID    int64
	Number    string
}

type OpsWorkOrderRepo

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

func NewOpsWorkOrderRepo

func NewOpsWorkOrderRepo(in any) *OpsWorkOrderRepo

func (OpsWorkOrderRepo) CountByFilter

func (p OpsWorkOrderRepo) CountByFilter(ctx context.Context, f OpsWorkOrderFilter) (size int64, err error)

func (OpsWorkOrderRepo) Delete

func (p OpsWorkOrderRepo) Delete(ctx context.Context, id int64) error

func (OpsWorkOrderRepo) DeleteByFilter

func (p OpsWorkOrderRepo) DeleteByFilter(ctx context.Context, f OpsWorkOrderFilter) error

func (OpsWorkOrderRepo) FindByFilter

func (OpsWorkOrderRepo) FindOne

func (p OpsWorkOrderRepo) FindOne(ctx context.Context, id int64) (*SysOpsWorkOrder, error)

func (OpsWorkOrderRepo) FindOneByFilter

func (OpsWorkOrderRepo) Insert

func (p OpsWorkOrderRepo) Insert(ctx context.Context, data *SysOpsWorkOrder) error

func (OpsWorkOrderRepo) MultiInsert

func (p OpsWorkOrderRepo) MultiInsert(ctx context.Context, data []*SysOpsWorkOrder) error

批量插入 LightStrategyDevice 记录

func (OpsWorkOrderRepo) Update

func (p OpsWorkOrderRepo) Update(ctx context.Context, data *SysOpsWorkOrder) error

type ProjectInfoFilter

type ProjectInfoFilter struct {
	ProjectIDs   []int64
	ProjectName  string
	AdminUserID  int64
	WithTopAreas bool `json:"withTopAreas,optional"` //同时返回顶层的区域列表
}

type ProjectInfoRepo

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

func NewProjectInfoRepo

func NewProjectInfoRepo(in any) *ProjectInfoRepo

func (ProjectInfoRepo) CountByFilter

func (p ProjectInfoRepo) CountByFilter(ctx context.Context, f ProjectInfoFilter) (size int64, err error)

func (ProjectInfoRepo) Delete

func (g ProjectInfoRepo) Delete(ctx context.Context, projectID int64) error

func (ProjectInfoRepo) DeleteByFilter

func (g ProjectInfoRepo) DeleteByFilter(ctx context.Context, f ProjectInfoFilter) error

func (ProjectInfoRepo) FindByFilter

func (ProjectInfoRepo) FindOne

func (g ProjectInfoRepo) FindOne(ctx context.Context, projectID int64) (*SysProjectInfo, error)

func (ProjectInfoRepo) FindOneByFilter

func (g ProjectInfoRepo) FindOneByFilter(ctx context.Context, f ProjectInfoFilter) (*SysProjectInfo, error)

func (ProjectInfoRepo) Insert

func (g ProjectInfoRepo) Insert(ctx context.Context, data *SysProjectInfo) error

func (ProjectInfoRepo) MultiInsert

func (m ProjectInfoRepo) MultiInsert(ctx context.Context, data []*SysProjectInfo) error

批量插入 LightStrategyDevice 记录

func (ProjectInfoRepo) Update

func (g ProjectInfoRepo) Update(ctx context.Context, data *SysProjectInfo, columns ...string) error

type ProjectProfileFilter

type ProjectProfileFilter struct {
	Codes     []string
	Code      string
	ProjectID int64
}

type ProjectProfileRepo

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

func NewProjectProfileRepo

func NewProjectProfileRepo(in any) *ProjectProfileRepo

func (ProjectProfileRepo) CountByFilter

func (p ProjectProfileRepo) CountByFilter(ctx context.Context, f ProjectProfileFilter) (size int64, err error)

func (ProjectProfileRepo) Delete

func (p ProjectProfileRepo) Delete(ctx context.Context, id int64) error

func (ProjectProfileRepo) DeleteByFilter

func (p ProjectProfileRepo) DeleteByFilter(ctx context.Context, f ProjectProfileFilter) error

func (ProjectProfileRepo) FindByFilter

func (ProjectProfileRepo) FindOne

func (ProjectProfileRepo) FindOneByFilter

func (ProjectProfileRepo) Insert

func (ProjectProfileRepo) MultiInsert

func (p ProjectProfileRepo) MultiInsert(ctx context.Context, data []*SysProjectProfile) error

批量插入 LightStrategyDevice 记录

func (ProjectProfileRepo) Update

type RoleAccessFilter

type RoleAccessFilter struct {
	TenantCode  string
	RoleIDs     []int64
	AccessCodes []string
}

type RoleApiRepo

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

func NewRoleAccessRepo

func NewRoleAccessRepo(in any) *RoleApiRepo

func (RoleApiRepo) CountByFilter

func (p RoleApiRepo) CountByFilter(ctx context.Context, f RoleAccessFilter) (size int64, err error)

func (RoleApiRepo) Delete

func (p RoleApiRepo) Delete(ctx context.Context, id int64) error

func (RoleApiRepo) DeleteByFilter

func (p RoleApiRepo) DeleteByFilter(ctx context.Context, f RoleAccessFilter) error

func (RoleApiRepo) FindByFilter

func (p RoleApiRepo) FindByFilter(ctx context.Context, f RoleAccessFilter, page *stores.PageInfo) ([]*SysRoleAccess, error)

func (RoleApiRepo) FindOne

func (p RoleApiRepo) FindOne(ctx context.Context, id int64) (*SysRoleAccess, error)

func (RoleApiRepo) FindOneByFilter

func (p RoleApiRepo) FindOneByFilter(ctx context.Context, f RoleAccessFilter) (*SysRoleAccess, error)

func (RoleApiRepo) Insert

func (p RoleApiRepo) Insert(ctx context.Context, data *SysRoleAccess) error

func (RoleApiRepo) MultiInsert

func (p RoleApiRepo) MultiInsert(ctx context.Context, data []*SysRoleAccess) error

批量插入 LightStrategyDevice 记录

func (RoleApiRepo) MultiUpdate

func (p RoleApiRepo) MultiUpdate(ctx context.Context, roleID int64, AccessCodes []string) error

func (RoleApiRepo) Update

func (p RoleApiRepo) Update(ctx context.Context, data *SysRoleAccess) error

type RoleAppFilter

type RoleAppFilter struct {
	RoleID     int64
	RoleIDs    []int64
	TenantCode string
	AppCode    string
}

type RoleAppRepo

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

func NewRoleAppRepo

func NewRoleAppRepo(in any) *RoleAppRepo

func (RoleAppRepo) CountByFilter

func (p RoleAppRepo) CountByFilter(ctx context.Context, f RoleAppFilter) (size int64, err error)

func (RoleAppRepo) Delete

func (p RoleAppRepo) Delete(ctx context.Context, id int64) error

func (RoleAppRepo) DeleteByFilter

func (p RoleAppRepo) DeleteByFilter(ctx context.Context, f RoleAppFilter) error

func (RoleAppRepo) FindByFilter

func (p RoleAppRepo) FindByFilter(ctx context.Context, f RoleAppFilter, page *stores.PageInfo) ([]*SysRoleApp, error)

func (RoleAppRepo) FindOne

func (p RoleAppRepo) FindOne(ctx context.Context, id int64) (*SysRoleApp, error)

func (RoleAppRepo) FindOneByFilter

func (p RoleAppRepo) FindOneByFilter(ctx context.Context, f RoleAppFilter) (*SysRoleApp, error)

func (RoleAppRepo) Insert

func (p RoleAppRepo) Insert(ctx context.Context, data *SysRoleApp) error

func (RoleAppRepo) MultiInsert

func (p RoleAppRepo) MultiInsert(ctx context.Context, data []*SysRoleApp) error

批量插入 LightStrategyDevice 记录

func (RoleAppRepo) MultiUpdate

func (p RoleAppRepo) MultiUpdate(ctx context.Context, roleID int64, appCodes []string) error

func (RoleAppRepo) Update

func (p RoleAppRepo) Update(ctx context.Context, data *SysRoleApp) error

type RoleInfoFilter

type RoleInfoFilter struct {
	IDs         []int64
	WithAppInfo bool
	AppCode     string
	Name        string
	Status      int64
	TenantCode  string
	Codes       []string
}

type RoleInfoRepo

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

func NewRoleInfoRepo

func NewRoleInfoRepo(in any) *RoleInfoRepo

func (RoleInfoRepo) CountByFilter

func (p RoleInfoRepo) CountByFilter(ctx context.Context, f RoleInfoFilter) (size int64, err error)

func (RoleInfoRepo) Delete

func (p RoleInfoRepo) Delete(ctx context.Context, id int64) error

func (RoleInfoRepo) DeleteByFilter

func (p RoleInfoRepo) DeleteByFilter(ctx context.Context, f RoleInfoFilter) error

func (RoleInfoRepo) FindByFilter

func (p RoleInfoRepo) FindByFilter(ctx context.Context, f RoleInfoFilter, page *stores.PageInfo) ([]*SysRoleInfo, error)

func (RoleInfoRepo) FindOne

func (p RoleInfoRepo) FindOne(ctx context.Context, id int64) (*SysRoleInfo, error)

func (RoleInfoRepo) FindOneByFilter

func (p RoleInfoRepo) FindOneByFilter(ctx context.Context, f RoleInfoFilter) (*SysRoleInfo, error)

func (RoleInfoRepo) Insert

func (p RoleInfoRepo) Insert(ctx context.Context, data *SysRoleInfo) error

func (RoleInfoRepo) MultiInsert

func (p RoleInfoRepo) MultiInsert(ctx context.Context, data []*SysRoleInfo) error

func (RoleInfoRepo) Update

func (p RoleInfoRepo) Update(ctx context.Context, data *SysRoleInfo) error

type RoleMenuFilter

type RoleMenuFilter struct {
	TenantCode string
	RoleIDs    []int64
	RoleID     int64
	AppCode    string
	ModuleCode string
}

type RoleMenuRepo

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

func NewRoleMenuRepo

func NewRoleMenuRepo(in any) *RoleMenuRepo

func (RoleMenuRepo) CountByFilter

func (p RoleMenuRepo) CountByFilter(ctx context.Context, f RoleMenuFilter) (size int64, err error)

func (RoleMenuRepo) Delete

func (p RoleMenuRepo) Delete(ctx context.Context, id int64) error

func (RoleMenuRepo) DeleteByFilter

func (p RoleMenuRepo) DeleteByFilter(ctx context.Context, f RoleMenuFilter) error

func (RoleMenuRepo) FindByFilter

func (p RoleMenuRepo) FindByFilter(ctx context.Context, f RoleMenuFilter, page *stores.PageInfo) ([]*SysRoleMenu, error)

func (RoleMenuRepo) FindOne

func (p RoleMenuRepo) FindOne(ctx context.Context, id int64) (*SysRoleMenu, error)

func (RoleMenuRepo) FindOneByFilter

func (p RoleMenuRepo) FindOneByFilter(ctx context.Context, f RoleMenuFilter) (*SysRoleMenu, error)

func (RoleMenuRepo) Insert

func (p RoleMenuRepo) Insert(ctx context.Context, data *SysRoleMenu) error

func (RoleMenuRepo) MultiInsert

func (p RoleMenuRepo) MultiInsert(ctx context.Context, data []*SysRoleMenu) error

批量插入 LightStrategyDevice 记录

func (RoleMenuRepo) MultiUpdate

func (p RoleMenuRepo) MultiUpdate(ctx context.Context, roleID int64, appCode string, moduleCode string, menuIDs []int64) error

func (RoleMenuRepo) Update

func (p RoleMenuRepo) Update(ctx context.Context, data *SysRoleMenu) error

type RoleModuleFilter

type RoleModuleFilter struct {
	TenantCode string
	RoleIDs    []int64
	RoleID     int64
	AppCode    string
}

type RoleModuleRepo

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

func NewRoleModuleRepo

func NewRoleModuleRepo(in any) *RoleModuleRepo

func (RoleModuleRepo) CountByFilter

func (p RoleModuleRepo) CountByFilter(ctx context.Context, f RoleModuleFilter) (size int64, err error)

func (RoleModuleRepo) Delete

func (p RoleModuleRepo) Delete(ctx context.Context, id int64) error

func (RoleModuleRepo) DeleteByFilter

func (p RoleModuleRepo) DeleteByFilter(ctx context.Context, f RoleModuleFilter) error

func (RoleModuleRepo) FindByFilter

func (p RoleModuleRepo) FindByFilter(ctx context.Context, f RoleModuleFilter, page *stores.PageInfo) ([]*SysRoleModule, error)

func (RoleModuleRepo) FindOne

func (p RoleModuleRepo) FindOne(ctx context.Context, id int64) (*SysRoleModule, error)

func (RoleModuleRepo) FindOneByFilter

func (p RoleModuleRepo) FindOneByFilter(ctx context.Context, f RoleModuleFilter) (*SysRoleModule, error)

func (RoleModuleRepo) Insert

func (p RoleModuleRepo) Insert(ctx context.Context, data *SysRoleModule) error

func (RoleModuleRepo) MultiInsert

func (p RoleModuleRepo) MultiInsert(ctx context.Context, data []*SysRoleModule) error

批量插入 LightStrategyDevice 记录

func (RoleModuleRepo) MultiUpdate

func (p RoleModuleRepo) MultiUpdate(ctx context.Context, roleID int64, appCode string, moduleCodes []string) error

func (RoleModuleRepo) Update

func (p RoleModuleRepo) Update(ctx context.Context, data *SysRoleModule) error

type ServiceInfoFilter added in v1.0.1

type ServiceInfoFilter struct {
	Code string
}

type ServiceInfoRepo added in v1.0.1

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

func NewServiceInfoRepo added in v1.0.1

func NewServiceInfoRepo(in any) *ServiceInfoRepo

func (ServiceInfoRepo) CountByFilter added in v1.0.1

func (p ServiceInfoRepo) CountByFilter(ctx context.Context, f ServiceInfoFilter) (size int64, err error)

func (ServiceInfoRepo) Delete added in v1.0.1

func (p ServiceInfoRepo) Delete(ctx context.Context, id int64) error

func (ServiceInfoRepo) DeleteByFilter added in v1.0.1

func (p ServiceInfoRepo) DeleteByFilter(ctx context.Context, f ServiceInfoFilter) error

func (ServiceInfoRepo) FindByFilter added in v1.0.1

func (ServiceInfoRepo) FindOne added in v1.0.1

func (p ServiceInfoRepo) FindOne(ctx context.Context, id int64) (*SysServiceInfo, error)

func (ServiceInfoRepo) FindOneByFilter added in v1.0.1

func (p ServiceInfoRepo) FindOneByFilter(ctx context.Context, f ServiceInfoFilter) (*SysServiceInfo, error)

func (ServiceInfoRepo) Insert added in v1.0.1

func (p ServiceInfoRepo) Insert(ctx context.Context, data *SysServiceInfo) error

func (ServiceInfoRepo) MultiInsert added in v1.0.1

func (p ServiceInfoRepo) MultiInsert(ctx context.Context, data []*SysServiceInfo) error

批量插入 LightStrategyDevice 记录

func (ServiceInfoRepo) Update added in v1.0.1

func (p ServiceInfoRepo) Update(ctx context.Context, data *SysServiceInfo) error

type SlotInfoFilter

type SlotInfoFilter struct {
	SlotCode string
	Code     string
	SubCode  string
}

type SlotInfoRepo

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

func NewSlotInfoRepo

func NewSlotInfoRepo(in any) *SlotInfoRepo

func (SlotInfoRepo) CountByFilter

func (p SlotInfoRepo) CountByFilter(ctx context.Context, f SlotInfoFilter) (size int64, err error)

func (SlotInfoRepo) Delete

func (p SlotInfoRepo) Delete(ctx context.Context, id int64) error

func (SlotInfoRepo) DeleteByFilter

func (p SlotInfoRepo) DeleteByFilter(ctx context.Context, f SlotInfoFilter) error

func (SlotInfoRepo) FindByFilter

func (p SlotInfoRepo) FindByFilter(ctx context.Context, f SlotInfoFilter, page *stores.PageInfo) ([]*SysSlotInfo, error)

func (SlotInfoRepo) FindOne

func (p SlotInfoRepo) FindOne(ctx context.Context, id int64) (*SysSlotInfo, error)

func (SlotInfoRepo) FindOneByFilter

func (p SlotInfoRepo) FindOneByFilter(ctx context.Context, f SlotInfoFilter) (*SysSlotInfo, error)

func (SlotInfoRepo) Insert

func (p SlotInfoRepo) Insert(ctx context.Context, data *SysSlotInfo) error

func (SlotInfoRepo) MultiInsert

func (p SlotInfoRepo) MultiInsert(ctx context.Context, data []*SysSlotInfo) error

批量插入 LightStrategyDevice 记录

func (SlotInfoRepo) Update

func (p SlotInfoRepo) Update(ctx context.Context, data *SysSlotInfo) error

type SysAccessInfo

type SysAccessInfo struct {
	ID         int64           `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`             // 编号
	Name       string          `gorm:"column:name;type:VARCHAR(100);NOT NULL"`                       // 请求名称
	Module     string          `gorm:"column:module;type:VARCHAR(100);default:'系统管理'"`               //所属模块
	Code       string          `gorm:"column:code;type:VARCHAR(100);uniqueIndex:app_route;NOT NULL"` // 请求名称
	Group      string          `gorm:"column:group;type:VARCHAR(100);NOT NULL"`                      // 接口组
	IsNeedAuth int64           `gorm:"column:is_need_auth;type:BIGINT;default:1;NOT NULL"`           // 是否需要认证(1是 2否)
	AuthType   access.AuthType `gorm:"column:is_auth_tenant;type:BIGINT;default:1;NOT NULL"`         // 1(all) 全部人可以操作 2(admin) 默认授予租户管理员权限 3(superAdmin,supper) default租户才可以操作(超管是跨租户的)
	Desc       string          `gorm:"column:desc;type:VARCHAR(500);NOT NULL"`                       // 备注
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:app_route"`
	Apis        []*SysApiInfo      `gorm:"foreignKey:AccessCode;references:Code"`
}

功能权限范围

func (*SysAccessInfo) TableName

func (m *SysAccessInfo) TableName() string

type SysApiInfo

type SysApiInfo struct {
	ID           int64  `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`          // 编号
	AccessCode   string `gorm:"column:access_code;type:VARCHAR(50);NOT NULL"`              // 范围编码
	Method       string `gorm:"column:method;uniqueIndex:route;type:VARCHAR(50);NOT NULL"` // 请求方式(1 GET 2 POST 3 HEAD 4 OPTIONS 5 PUT 6 DELETE 7 TRACE 8 CONNECT 9 其它)
	Route        string `gorm:"column:route;uniqueIndex:route;type:VARCHAR(100);NOT NULL"` // 路由
	Name         string `gorm:"column:name;type:VARCHAR(100);NOT NULL"`                    // 请求名称
	BusinessType int64  `gorm:"column:business_type;type:BIGINT;NOT NULL"`                 // 业务类型(1(add)新增 2修改(modify) 3删除(delete) 4查询(find) 5其它(other)
	Desc         string `gorm:"column:desc;type:VARCHAR(500);NOT NULL"`                    // 备注
	//AuthType     int64  `gorm:"column:is_auth_tenant;type:BIGINT;default:1;NOT NULL"`      // 1(all) 全部人可以操作 2(admin) 默认授予租户管理员权限 3(superAdmin,supper) default租户才可以操作(超管是跨租户的)
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:route"`
	Access      *SysAccessInfo     `gorm:"foreignKey:Code;references:AccessCode"`
}

接口管理

func (*SysApiInfo) TableName

func (m *SysApiInfo) TableName() string

type SysAppInfo

type SysAppInfo struct {
	ID      int64          `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`        // id编号
	Code    string         `gorm:"column:code;uniqueIndex:code;type:VARCHAR(100);NOT NULL"` // 应用编码
	Name    string         `gorm:"column:name;uniqueIndex:name;type:VARCHAR(100);NOT NULL"` //应用名称
	Type    def.AppType    `gorm:"column:type;type:VARCHAR(100);default:web;NOT NULL"`      //应用类型 web:web页面  app:应用  mini:小程序
	SubType def.AppSubType `gorm:"column:sub_type;type:VARCHAR(100);default:wx;NOT NULL"`   // 类型  wx:微信小程序  ding:钉钉小程序
	Desc    string         `gorm:"column:desc;type:VARCHAR(100);NOT NULL"`                  //应用描述
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:code;uniqueIndex:name"`
}

应用信息

func (*SysAppInfo) TableName

func (m *SysAppInfo) TableName() string

type SysAppModule

type SysAppModule struct {
	ID         int64  `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	AppCode    string `gorm:"column:app_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"`    // 应用编码 这里只关联主应用,主应用授权,子应用也授权了
	ModuleCode string `gorm:"column:module_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"` // 模块编码
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_ac"`
	Module      *SysModuleInfo     `gorm:"foreignKey:Code;references:ModuleCode"`
	App         *SysAppInfo        `gorm:"foreignKey:Code;references:AppCode"`
}

应用默认绑定的模块

func (*SysAppModule) TableName

func (m *SysAppModule) TableName() string

type SysAreaInfo

type SysAreaInfo struct {
	TenantCode      stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL"`                   // 租户编码
	ProjectID       stores.ProjectID  `gorm:"column:project_id;type:bigint;NOT NULL"`                         // 所属项目ID(雪花ID)
	AreaID          stores.AreaID     `gorm:"column:area_id;type:bigint;primary_key;AUTO_INCREMENT;NOT NULL"` // 区域ID(雪花ID)
	ParentAreaID    int64             `gorm:"column:parent_area_id;index;type:bigint;default:1"`              // 上级区域ID(雪花ID)
	AreaIDPath      string            `gorm:"column:area_id_path;index;type:varchar(1024);NOT NULL"`          // 1-2-3-的格式记录顶级区域到当前区域的路径
	AreaNamePath    string            `gorm:"column:area_name_path;type:varchar(1024);NOT NULL"`              // 1-2-3-的格式记录顶级区域到当前区域的路径
	AreaName        string            `gorm:"column:area_name;index;type:varchar(100);NOT NULL"`              // 区域名称
	AreaImg         string            `gorm:"column:area_img;type:varchar(1024);NOT NULL"`
	Position        stores.Point      `gorm:"column:position;NOT NULL"`                                // 区域定位(默认火星坐标系)
	Desc            string            `gorm:"column:desc;type:varchar(100);NOT NULL"`                  // 区域备注
	LowerLevelCount int64             `gorm:"column:lower_level_count;type:bigint;default:0;NOT NULL"` //下级区域的数量统计
	DeviceCount     int64             `gorm:"column:device_count;type:bigint;default:0;"`
	GroupCount      int64             `gorm:"column:group_count;type:bigint;default:0;"`
	IsLeaf          int64             `gorm:"column:is_leaf;type:bigint;default:1;NOT NULL"`        //是否是叶子节点
	UseBy           string            `gorm:"column:use_by;type:varchar(100);default:''"`           //用途
	ChildrenAreaIDs []int64           `gorm:"column:children_area_ids;type:json;serializer:json"`   //所有的子区域的id列表
	IsSysCreated    int64             `gorm:"column:is_sys_created;type:bigint;default:2;NOT NULL"` //是否是系统创建的,系统创建的只有管理员可以删除
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;index"`
	Children    []*SysAreaInfo     `gorm:"foreignKey:ParentAreaID;references:AreaID"`
	Parent      *SysAreaInfo       `gorm:"foreignKey:AreaID;references:ParentAreaID"`
}

区域信息表

func (*SysAreaInfo) TableName

func (m *SysAreaInfo) TableName() string

type SysAreaProfile

type SysAreaProfile struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`                // 编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL;uniqueIndex:tc_un;"` // 租户编码
	ProjectID  stores.ProjectID  `gorm:"column:project_id;uniqueIndex:tc_un;type:bigint;NOT NULL"`        // 所属项目ID(雪花ID)
	AreaID     stores.AreaID     `gorm:"column:area_id;uniqueIndex:tc_un;type:bigint;NOT NULL"`           // 区域ID(雪花ID)
	Code       string            `gorm:"column:code;type:VARCHAR(50);uniqueIndex:tc_un;NOT NULL"`         //配置code
	Params     string            `gorm:"column:params;type:text;NOT NULL"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_un;"`
}

区域配置表

func (*SysAreaProfile) TableName

func (m *SysAreaProfile) TableName() string

type SysConfig

type SysConfig struct {
	Sms *SysConfigSms `gorm:"embedded;embeddedPrefix:sms_"` //短信配置,全租户共用
}

全局配置

type SysConfigSms

type SysConfigSms struct {
	From     string `gorm:"column:from;type:VARCHAR(50);default:'';NOT NULL"`     // 发件人  你自己要发邮件的邮箱
	Host     string `gorm:"column:host;type:VARCHAR(50);default:'';NOT NULL"`     // 服务器地址 例如 smtp.qq.com  请前往QQ或者你要发邮件的邮箱查看其smtp协议
	Secret   string `gorm:"column:secret;type:VARCHAR(50);default:'';NOT NULL"`   // 密钥    用于登录的密钥 最好不要用邮箱密码 去邮箱smtp申请一个用于登录的密钥
	Nickname string `gorm:"column:nickname;type:VARCHAR(50);default:'';NOT NULL"` // 昵称    发件人昵称 通常为自己的邮箱
	Port     int64  `gorm:"column:port;type:int;default:465"`                     // 端口     请前往QQ或者你要发邮件的邮箱查看其smtp协议 大多为 465
	IsSSL    int64  `gorm:"column:is_ssl;type:int;default:2"`                     // 是否SSL   是否开启SSL
}

type SysDataArea

type SysDataArea struct {
	ID             int64             `gorm:"column:id;type:bigint;primary_key;AUTO_INCREMENT"`
	TenantCode     stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` // 租户编码
	TargetType     def.TargetType    `gorm:"column:target_type;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"`
	TargetID       int64             `gorm:"column:target_id;uniqueIndex:ri_mi;type:bigint;NOT NULL"`          // 授权对象的id,角色id,用户id
	ProjectID      stores.ProjectID  `gorm:"column:project_id;uniqueIndex:ri_mi;type:bigint;NOT NULL"`         // 所属项目ID(雪花ID)
	AreaID         int64             `gorm:"column:area_id;uniqueIndex:ri_mi;type:bigint;NOT NULL"`            // 区域ID(雪花ID)
	AreaIDPath     string            `gorm:"column:area_id_path;uniqueIndex:ri_mi;type:VARCHAR(256);NOT NULL"` // 区域ID(雪花ID)
	AuthType       def.AuthType      `gorm:"column:auth_type;type:bigint;NOT NULL"`                            // 授权类型 1 管理员(可以调整本区域及旗下区域的设备区域规划)  2 读写授权(可以对该区域及旗下区域的设备进行管理) 3 只读授权()
	IsAuthChildren int64             `gorm:"column:is_auth_children;type:bigint;default:2;NOT NULL"`           //是否同时授权子节点
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
}

用户区域权限表

func (*SysDataArea) TableName

func (m *SysDataArea) TableName() string

type SysDataOpenAccess

type SysDataOpenAccess struct {
	ID           int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode   stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"` // 租户编码
	UserID       int64             `gorm:"column:user_id;uniqueIndex:tc_ac;type:bigint;NOT NULL"`
	Code         string            `gorm:"column:code;type:VARCHAR(50);uniqueIndex:tc_ac;NOT NULL"` //用来标识用来干嘛的
	AccessSecret string            `gorm:"column:access_secret;type:VARCHAR(256);NOT NULL"`
	Desc         string            `gorm:"column:desc;type:VARCHAR(100);NOT NULL"`     //应用描述
	IpRange      []string          `gorm:"column:ip_range;type:json;serializer:json;"` //ip白名单
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_ac"`
}

租户开放认证

func (*SysDataOpenAccess) TableName

func (m *SysDataOpenAccess) TableName() string

type SysDataProject

type SysDataProject struct {
	ID         int64             `gorm:"column:id;type:bigint;primary_key;AUTO_INCREMENT"`
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:ri_mi;type:VARCHAR(50);default:default"` // 租户编码
	ProjectID  int64             `gorm:"column:project_id;uniqueIndex:ri_mi;type:bigint;NOT NULL"`              // 所属项目ID(雪花ID)
	TargetType def.TargetType    `gorm:"column:target_type;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"`
	TargetID   int64             `gorm:"column:target_id;uniqueIndex:ri_mi;type:bigint;NOT NULL"` // 授权对象的id,角色id,用户id
	AuthType   def.AuthType      `gorm:"column:auth_type;type:bigint;NOT NULL"`                   // 授权类型 1 管理员(可以修改本项目的状态,同时拥有所有区域权限)  2 读授权(可以对项目下的区域进行操作,但是不能修改项目) 2 读写授权(可以对项目下的区域进行操作,同时可以对项目进行修改)
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
}

用户项目权限表

func (*SysDataProject) TableName

func (m *SysDataProject) TableName() string

type SysDeptInfo added in v1.0.1

type SysDeptInfo struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`                  // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL"`                      // 租户编码
	ParentID   int64             `gorm:"column:parent_id;uniqueIndex:name;type:BIGINT"`                     // id编号
	Name       string            `gorm:"column:name;type:VARCHAR(50);uniqueIndex:name;default:'';NOT NULL"` // 部门名称
	Status     int64             `gorm:"column:status;type:SMALLINT;default:1"`                             // 状态  1:启用,2:禁用
	Sort       int64             `gorm:"column:sort;comment:排序标记"`                                          // 排序标记
	Desc       string            `gorm:"column:desc;comment:描述"`                                            // 描述
	IDPath     string            `gorm:"column:id_path;type:varchar(100);NOT NULL"`                         // 1-2-3-的格式记录顶级区域到当前id的路径
	DingTalkID int64             `gorm:"column:ding_talk_id;default:0;"`                                    //钉钉的部门ID
	Children   []*SysDeptInfo    `gorm:"foreignKey:parent_id;references:id"`
	Parent     *SysDeptInfo      `gorm:"foreignKey:ID;references:ParentID"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:name"`
}

func (SysDeptInfo) TableName added in v1.0.1

func (SysDeptInfo) TableName() string

type SysDeptUser added in v1.0.1

type SysDeptUser struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`      // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL;"`         // 租户编码
	UserID     int64             `gorm:"column:user_id;uniqueIndex:ri_mi;NOT NULL;type:BIGINT"` // 用户ID
	DeptID     int64             `gorm:"column:dept_id;uniqueIndex:ri_mi;NOT NULL;type:BIGINT"` // 角色ID
	Dept       *SysDeptInfo      `gorm:"foreignKey:ID;references:DeptID"`
	User       *SysUserInfo      `gorm:"foreignKey:UserID;references:UserID"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
}

func (*SysDeptUser) TableName added in v1.0.1

func (m *SysDeptUser) TableName() string

type SysDictDetail

type SysDictDetail struct {
	ID       int64            `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`      // id编号
	DictCode string           `gorm:"column:dict_code;type:VARCHAR(50);default:'';NOT NULL"` // 关联标记
	Label    string           `gorm:"column:label;comment:展示值"`                              // 展示值
	Value    string           `gorm:"column:value;comment:字典值"`                              // 字典值
	Status   int64            `gorm:"column:status;type:SMALLINT;default:1"`                 // 状态  1:启用,2:禁用
	Sort     int64            `gorm:"column:sort;comment:排序标记"`                              // 排序标记
	Desc     string           `gorm:"column:desc;comment:描述"`                                // 描述
	Body     string           `gorm:"column:body;type:VARCHAR(1024)"`                        // 自定义数据
	IDPath   string           `gorm:"column:id_path;type:varchar(100);NOT NULL"`             // 1-2-3-的格式记录顶级区域到当前id的路径
	ParentID int64            `gorm:"column:parent_id;type:BIGINT"`                          // id编号
	Children []*SysDictDetail `gorm:"foreignKey:parent_id;references:id"`
	Parent   *SysDictDetail   `gorm:"foreignKey:ID;references:ParentID"`

	stores.SoftTime
}

func (SysDictDetail) TableName

func (SysDictDetail) TableName() string

type SysDictInfo

type SysDictInfo struct {
	ID         int64            `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`                  // id编号
	Name       string           `gorm:"column:name;uniqueIndex:name;comment:字典名"`                          // 字典名(中)
	Code       string           `gorm:"column:code;uniqueIndex:code;type:VARCHAR(50);default:'';NOT NULL"` //编码
	Group      string           `gorm:"column:group;type:VARCHAR(50);default:'';NOT NULL"`                 //字典分组
	Desc       string           `gorm:"column:desc;comment:描述"`                                            // 描述
	Body       string           `gorm:"column:body;type:VARCHAR(1024)"`                                    // 自定义数据
	StructType int64            `gorm:"column:struct_type;type:BIGINT;default:1"`                          //结构类型(不可修改) 1:列表(默认) 2:树型
	Details    []*SysDictDetail `gorm:"foreignKey:DictCode;references:Code"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:code;uniqueIndex:name"`
}

func (SysDictInfo) TableName

func (SysDictInfo) TableName() string

type SysExample

type SysExample struct {
	ID int64 `gorm:"column:id;type:bigint;primary_key;AUTO_INCREMENT"` // id编号
}

示例

type SysLoginLog

type SysLoginLog struct {
	ID            int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`       // 编号
	TenantCode    stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL"`           // 租户编码
	AppCode       string            `gorm:"column:app_code;NOT NULL;type:VARCHAR(50)"`              // 应用ID
	UserID        int64             `gorm:"column:user_id;type:BIGINT;NOT NULL"`                    // 用户id
	UserName      string            `gorm:"column:user_name;type:VARCHAR(50)"`                      // 登录账号
	IpAddr        string            `gorm:"column:ip_addr;type:VARCHAR(50)"`                        // 登录IP地址
	LoginLocation string            `gorm:"column:login_location;type:VARCHAR(100)"`                // 登录地点
	Browser       string            `gorm:"column:browser;type:VARCHAR(50)"`                        // 浏览器类型
	Os            string            `gorm:"column:os;type:VARCHAR(50)"`                             // 操作系统
	Code          int64             `gorm:"column:code;type:BIGINT;default:200;NOT NULL"`           // 登录状态(200成功 其它失败)
	Msg           string            `gorm:"column:msg;type:VARCHAR(255)"`                           // 提示消息
	CreatedTime   time.Time         `gorm:"column:created_time;default:CURRENT_TIMESTAMP;NOT NULL"` // 登录时间
}

登录日志管理

func (*SysLoginLog) TableName

func (m *SysLoginLog) TableName() string

type SysMessageInfo

type SysMessageInfo struct {
	ID             int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`         // id编号
	TenantCode     stores.TenantCode `gorm:"column:tenant_code;index:ri_mi;type:VARCHAR(50);NOT NULL"` // 租户编码
	Group          string            `gorm:"column:group;type:VARCHAR(50);"`                           //消息分类
	NotifyCode     string            `gorm:"column:notify_code;type:VARCHAR(50);"`                     //对应的配置Code
	Subject        string            `gorm:"column:subject;type:VARCHAR(256);"`                        //消息主题
	Body           string            `gorm:"column:body;type:text;"`                                   //消息内容
	Str1           string            `gorm:"column:str1;index:ri_mi;type:VARCHAR(50);"`                //自定义字段(用来添加搜索索引),如产品id
	Str2           string            `gorm:"column:str2;index:ri_mi;type:VARCHAR(50);"`                //自定义字段(用来添加搜索索引),如设备id
	Str3           string            `gorm:"column:str3;index:ri_mi;type:VARCHAR(50);"`
	IsGlobal       int64             `gorm:"column:is_global;index;type:bigint;default:2"`                //是否是全局消息,是的话所有用户都能看到
	IsDirectNotify int64             `gorm:"column:is_direct_notify;index;type:bigint;default:2"`         //是否是发送通知消息创建
	NotifyTime     time.Time         `gorm:"column:notify_time;index;default:CURRENT_TIMESTAMP;NOT NULL"` //通知时间
	stores.NoDelTime
	DeletedTime  stores.DeletedTime `gorm:"column:deleted_time;default:0;"`
	NotifyConfig *SysNotifyConfig   `gorm:"foreignKey:Code;references:NotifyCode"`
}

func (*SysMessageInfo) TableName

func (m *SysMessageInfo) TableName() string

type SysModuleInfo

type SysModuleInfo struct {
	ID         int64            `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`       // 编号
	Code       string           `gorm:"column:code;uniqueIndex:code;NOT NULL;type:VARCHAR(50)"` // 编码
	Type       int64            `gorm:"column:type;type:BIGINT;default:1;NOT NULL"`             // 类型   1:web页面  2:应用  3:小程序
	SubType    int64            `gorm:"column:sub_type;type:BIGINT;default:1;NOT NULL"`         // 类型   1:微应用   2:iframe内嵌 3: 原生菜单
	Order      int64            `gorm:"column:order;type:BIGINT;default:1;NOT NULL"`            // 左侧table排序序号
	Name       string           `gorm:"column:name;type:VARCHAR(50);NOT NULL"`                  // 菜单名称
	Path       string           `gorm:"column:path;type:VARCHAR(64);NOT NULL"`                  // 系统的path
	Url        string           `gorm:"column:url;type:VARCHAR(200);NOT NULL"`                  // 页面
	Icon       string           `gorm:"column:icon;type:VARCHAR(64);NOT NULL"`                  // 图标
	Body       string           `gorm:"column:body;type:VARCHAR(1024)"`                         // 菜单自定义数据
	HideInMenu int64            `gorm:"column:hide_in_menu;type:BIGINT;default:2;NOT NULL"`     // 是否隐藏菜单 1-是 2-否
	Desc       string           `gorm:"column:desc;type:VARCHAR(100);NOT NULL"`                 // 备注
	Tag        int64            `gorm:"column:tag;type:BIGINT;default:1;NOT NULL"`              //标签: 1:通用 2:选配
	Menus      []*SysModuleMenu `gorm:"foreignKey:ModuleCode;references:Code"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:code"`
}

模块管理表 模块是菜单和接口的集合体

func (*SysModuleInfo) TableName

func (m *SysModuleInfo) TableName() string

type SysModuleMenu

type SysModuleMenu struct {
	ID         int64            `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`   // 编号
	ModuleCode string           `gorm:"column:module_code;type:VARCHAR(50);NOT NULL"`       // 模块编码
	ParentID   int64            `gorm:"column:parent_id;type:BIGINT;default:1;NOT NULL"`    // 父菜单ID,一级菜单为1
	Type       int64            `gorm:"column:type;type:BIGINT;default:1;NOT NULL"`         // 类型   1:菜单或者页面   2:iframe嵌入   3:外链跳转
	Order      int64            `gorm:"column:order;type:BIGINT;default:1;NOT NULL"`        // 左侧table排序序号
	Name       string           `gorm:"column:name;type:VARCHAR(50);NOT NULL"`              // 菜单名称
	Path       string           `gorm:"column:path;type:VARCHAR(64);NOT NULL"`              // 系统的path
	Component  string           `gorm:"column:component;type:VARCHAR(1024);NOT NULL"`       // 页面
	Icon       string           `gorm:"column:icon;type:VARCHAR(64);NOT NULL"`              // 图标
	Redirect   string           `gorm:"column:redirect;type:VARCHAR(64);NOT NULL"`          // 路由重定向
	Body       string           `gorm:"column:body;type:VARCHAR(1024)"`                     // 菜单自定义数据
	HideInMenu int64            `gorm:"column:hide_in_menu;type:BIGINT;default:2;NOT NULL"` // 是否隐藏菜单 1-是 2-否
	IsCommon   int64            `gorm:"column:is_common;type:BIGINT;default:2;"`            // 是否常用菜单 1-是 2-否
	Children   []*SysModuleMenu `gorm:"foreignKey:ID;references:ParentID"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;index"`
}

菜单管理表

func (*SysModuleMenu) TableName

func (m *SysModuleMenu) TableName() string

type SysNotifyChannel

type SysNotifyChannel struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`        // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL"`            // 租户编码,为common是公共的
	Type       def.NotifyType    `gorm:"column:type;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` //对应的配置类型 sms email
	Email      *SysTenantEmail   `gorm:"embedded;embeddedPrefix:email_"`                          //邮箱配置
	AppCode    string            `gorm:"column:app_code;type:VARCHAR(50);"`                       //微信小程序推送
	App        *SysTenantThird   `gorm:"embedded;embeddedPrefix:app_"`                            //钉钉消息
	Sms        *SysSms           `gorm:"embedded;embeddedPrefix:sms_"`                            //短信
	WebHook    string            `gorm:"column:webhook;type:VARCHAR(256)"`                        //钉钉webhook模式及企业微信webhook方式
	Name       string            `gorm:"column:name;uniqueIndex:ri_mi;type:VARCHAR(100);NOT NULL"`
	Desc       string            `gorm:"column:desc;type:VARCHAR(100);NOT NULL"` //应用描述
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
}

租户下的通道配置

func (*SysNotifyChannel) TableName

func (m *SysNotifyChannel) TableName() string

type SysNotifyConfig

type SysNotifyConfig struct {
	ID           int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`                     // id编号
	Group        string            `gorm:"column:group;type:VARCHAR(50);NOT NULL"`                               //分组
	Code         string            `gorm:"column:code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"`              // 通知类型编码
	Name         string            `gorm:"column:name;type:VARCHAR(50);NOT NULL"`                                //通知的命名
	SupportTypes []def.NotifyType  `gorm:"column:support_types;type:json;serializer:json;NOT NULL;default:'[]'"` //支持的通知类型
	EnableTypes  []def.NotifyType  `gorm:"column:enable_types;type:json;serializer:json;NOT NULL;default:'[]'"`  //已选的通知类型
	Desc         string            `gorm:"column:desc;type:varchar(100);NOT NULL"`                               // 项目备注
	IsRecord     int64             `gorm:"column:is_record;type:BIGINT"`                                         //是否记录该消息,是的情况下会将消息存一份到消息中心
	Params       map[string]string `gorm:"column:params;type:json;serializer:json;NOT NULL;default:'{}'"`        //变量属性 key是参数,value是描述
	stores.NoDelTime
	Templates   []*SysNotifyConfigTemplate `gorm:"foreignKey:NotifyCode;references:Code"`
	DeletedTime stores.DeletedTime         `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi;"`
}

SysNotifyConfig 通知类型配置

func (*SysNotifyConfig) TableName

func (m *SysNotifyConfig) TableName() string

type SysNotifyConfigTemplate

type SysNotifyConfigTemplate struct {
	ID         int64              `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode stores.TenantCode  `gorm:"column:tenant_code;type:VARCHAR(50);uniqueIndex:ri_mi;NOT NULL"` // 租户编码
	NotifyCode string             `gorm:"column:notify_code;type:VARCHAR(50);uniqueIndex:ri_mi;NOT NULL"` //对应的配置Code
	Type       def.NotifyType     `gorm:"column:type;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"`        //对应的类型
	TemplateID int64              `gorm:"column:template_id;type:BIGINT;default:1"`                       //绑定的模板id,1为默认
	Template   *SysNotifyTemplate `gorm:"foreignKey:ID;references:TemplateID"`
	Config     *SysNotifyConfig   `gorm:"foreignKey:Code;references:NotifyCode"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
}

租户下的通知配置

func (*SysNotifyConfigTemplate) TableName

func (m *SysNotifyConfigTemplate) TableName() string

type SysNotifyTemplate

type SysNotifyTemplate struct {
	ID           int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`     // id编号
	TenantCode   stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);default:'common'"` //限定租户,不填是通用的
	Name         string            `gorm:"column:name;type:VARCHAR(50);NOT NULL"`                //通知的命名
	NotifyCode   string            `gorm:"column:notify_code;type:VARCHAR(50);NOT NULL"`         //对应的配置Code
	Type         def.NotifyType    `gorm:"column:type;type:VARCHAR(50);NOT NULL"`                //对应的配置类型 sms email
	TemplateCode string            `gorm:"column:code;type:VARCHAR(50);NOT NULL"`                // 短信通知模版编码
	SignName     string            `gorm:"column:sign_name;type:VARCHAR(50);default:''"`         //签名(短信)
	Subject      string            `gorm:"column:subject;type:VARCHAR(256);NOT NULL"`            //默认消息主题
	Body         string            `gorm:"column:body;type:VARCHAR(512);default:''"`             //默认模版内容
	Desc         string            `gorm:"column:desc;type:varchar(100)"`                        // 备注
	ChannelID    int64             `gorm:"column:channel_id;type:BIGINT;"`
	Channel      *SysNotifyChannel `gorm:"foreignKey:ID;references:ChannelID"`
	Config       *SysNotifyConfig  `gorm:"foreignKey:Code;references:NotifyCode"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;"`
}

通知配置

func (*SysNotifyTemplate) TableName

func (m *SysNotifyTemplate) TableName() string

type SysOperLog

type SysOperLog struct {
	ID           int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`       // 编号
	TenantCode   stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL"`           // 租户编码
	AppCode      string            `gorm:"column:app_code;NOT NULL;type:VARCHAR(50)"`              // 应用ID
	OperUserID   int64             `gorm:"column:oper_user_id;type:BIGINT;NOT NULL"`               // 用户id
	OperUserName string            `gorm:"column:oper_user_name;type:VARCHAR(50)"`                 // 操作人员名称
	OperName     string            `gorm:"column:oper_name;type:VARCHAR(50)"`                      // 操作名称
	BusinessType int64             `gorm:"column:business_type;type:BIGINT;NOT NULL"`              // 业务类型(1新增 2修改 3删除 4查询 5其它)
	Uri          string            `gorm:"column:uri;type:VARCHAR(100)"`                           // 请求地址
	OperIpAddr   string            `gorm:"column:oper_ip_addr;type:VARCHAR(50)"`                   // 主机地址
	OperLocation string            `gorm:"column:oper_location;type:VARCHAR(255)"`                 // 操作地点
	Req          sql.NullString    `gorm:"column:req;type:TEXT"`                                   // 请求参数
	Resp         sql.NullString    `gorm:"column:resp;type:TEXT"`                                  // 返回参数
	Code         int64             `gorm:"column:code;type:BIGINT;default:200;NOT NULL"`           // 返回状态(200成功 其它失败)
	Msg          string            `gorm:"column:msg;type:VARCHAR(255)"`                           // 提示消息
	CreatedTime  time.Time         `gorm:"column:created_time;default:CURRENT_TIMESTAMP;NOT NULL"` // 操作时间
}

操作日志管理

func (*SysOperLog) TableName

func (m *SysOperLog) TableName() string

type SysOpsFeedback

type SysOpsFeedback struct {
	ID                 int64               `gorm:"column:id;type:bigint;primary_key;AUTO_INCREMENT"`
	TenantCode         stores.TenantCode   `gorm:"column:tenant_code;index;type:VARCHAR(50);NOT NULL"`   // 租户编码
	RaiseUserID        int64               `gorm:"column:raise_user_id;type:BIGINT;NOT NULL"`            // 问题提出的用户
	ProjectID          stores.ProjectID    `gorm:"column:project_id;type:bigint;default:0;NOT NULL"`     // 项目ID(雪花ID)
	Type               string              `gorm:"column:type;type:VARCHAR(50);NOT NULL"`                //问题类型 设备问题:thingsDevice 智能场景:thingsScene 体验问题: experience 其他: other
	Status             ops.WorkOrderStatus `gorm:"column:status;type:BIGINT;default:1"`                  //状态 1:待处理 2:处理中 3:已完成
	ContactInformation string              `gorm:"column:contact_information;type:VARCHAR(50);NOT NULL"` //联系信息
	IssueDesc          string              `gorm:"column:issue_desc;type:varchar(2000);NOT NULL"`
	stores.SoftTime
}

帮助与反馈

func (*SysOpsFeedback) TableName

func (m *SysOpsFeedback) TableName() string

type SysOpsWorkOrder

type SysOpsWorkOrder struct {
	ID           int64               `gorm:"column:id;type:bigint;primary_key;AUTO_INCREMENT"`
	TenantCode   stores.TenantCode   `gorm:"column:tenant_code;index;type:VARCHAR(50);NOT NULL"` // 租户编码
	RaiseUserID  int64               `gorm:"column:raise_user_id;type:BIGINT;NOT NULL"`          // 问题提出的用户
	ProjectID    stores.ProjectID    `gorm:"column:project_id;type:bigint;default:0;NOT NULL"`   // 项目ID(雪花ID)
	AreaID       stores.AreaID       `gorm:"column:area_id;type:bigint;default:0;NOT NULL"`      // 项目区域ID(雪花ID)
	Number       string              `gorm:"column:number;unique;type:VARCHAR(50);NOT NULL"`     //编号
	Params       map[string]string   `gorm:"column:params;type:json;serializer:json;"`           // 参数 json格式
	Type         string              `gorm:"column:type;type:varchar(100);NOT NULL"`             // 工单类型: deviceMaintenance:设备维修工单
	IssueDesc    string              `gorm:"column:issue_desc;type:varchar(2000);NOT NULL"`
	Status       ops.WorkOrderStatus `gorm:"column:status;type:BIGINT;default:1"` //状态 1:待处理 2:处理中 3:已完成
	HandleTime   sql.NullTime        `gorm:"column:handle_time;default:null"`     //处理时间
	FinishedTime sql.NullTime        `gorm:"column:finished_time;default:null"`   //处理完成时间
	stores.SoftTime
}

设备维护工单 device Maintenance Work Order

func (*SysOpsWorkOrder) TableName

func (m *SysOpsWorkOrder) TableName() string

type SysProjectInfo

type SysProjectInfo struct {
	TenantCode  stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL"`                      // 租户编码
	AdminUserID int64             `gorm:"column:admin_user_id;type:BIGINT;NOT NULL"`                         // 超级管理员id,拥有全部权限,默认是创建者
	ProjectID   stores.ProjectID  `gorm:"column:project_id;type:bigint;primary_key;AUTO_INCREMENT;NOT NULL"` // 项目ID(雪花ID)
	ProjectImg  string            `gorm:"column:project_img;type:varchar(1024);default:''"`
	ProjectName string            `gorm:"column:project_name;type:varchar(100);NOT NULL"` // 项目名称
	//Region      string            `gorm:"column:region;type:varchar(100);NOT NULL"`      // 项目省市区县
	Address      string         `gorm:"column:address;type:varchar(512);"`                // 项目详细地址
	AreaCount    int64          `gorm:"column:area_count;type:bigint;default:0;NOT NULL"` //所属区域的数量统计
	Position     stores.Point   `gorm:"column:position;NOT NULL"`                         // 项目地址
	DeviceCount  int64          `gorm:"column:device_count;type:bigint;default:0"`
	Area         float32        `gorm:"column:area;default:0"`
	Ppsm         int64          `gorm:"column:ppsm;type:bigint;default:0"`                    //w.h/m2 每平方米功耗 建筑定额能耗 Power per square meter
	Desc         string         `gorm:"column:desc;type:varchar(100);NOT NULL"`               // 项目备注
	IsSysCreated int64          `gorm:"column:is_sys_created;type:bigint;default:2;NOT NULL"` //是否是系统创建的,系统创建的只有管理员可以删除
	Areas        []*SysAreaInfo `gorm:"foreignKey:ProjectID;references:ProjectID"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0"`
}

SysProjectInfo 项目信息表,在智能家居中一个项目是一个家庭,一个区域是一个房间

func (*SysProjectInfo) TableName

func (m *SysProjectInfo) TableName() string

type SysProjectProfile

type SysProjectProfile struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`                // 编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL;uniqueIndex:tc_un;"` // 租户编码
	ProjectID  stores.ProjectID  `gorm:"column:project_id;uniqueIndex:tc_un;type:bigint;NOT NULL"`        // 所属项目ID(雪花ID)
	Code       string            `gorm:"column:code;type:VARCHAR(50);uniqueIndex:tc_un;NOT NULL"`         //配置code
	Params     string            `gorm:"column:params;type:text;NOT NULL"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_un;"`
}

区域配置表

func (*SysProjectProfile) TableName

func (m *SysProjectProfile) TableName() string

type SysRoleAccess

type SysRoleAccess struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` // 角色所属租户编码
	RoleID     int64             `gorm:"column:role_id;uniqueIndex:ri_mi;NOT NULL;type:BIGINT"`          // 角色ID
	AccessCode string            `gorm:"column:access_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` // 范围编码
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
	Api         *SysAccessInfo     `gorm:"foreignKey:AccessCode;references:Code"`
}

api权限管理

func (*SysRoleAccess) TableName

func (m *SysRoleAccess) TableName() string

type SysRoleApp

type SysRoleApp struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"` // 角色所属租户编码
	RoleID     int64             `gorm:"column:role_id;uniqueIndex:tc_ac;NOT NULL;type:BIGINT"`          // 角色ID
	AppCode    string            `gorm:"column:app_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"`    // 应用编码
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_ac"`
}

应用菜单关联表

func (*SysRoleApp) TableName

func (m *SysRoleApp) TableName() string

type SysRoleInfo

type SysRoleInfo struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"` // 角色所属租户编码
	Name       string            `gorm:"column:name;uniqueIndex:tc_ac;type:VARCHAR(100);NOT NULL"`       // 角色名称
	Desc       string            `gorm:"column:desc;type:VARCHAR(100);NOT NULL"`                         //描述
	Code       string            `gorm:"column:code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"`        // 编码
	Status     int64             `gorm:"column:status;type:SMALLINT;default:1"`                          // 状态  1:启用,2:禁用
	Apps       []*SysRoleApp     `gorm:"foreignKey:RoleID;references:ID"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_ac"`
}

角色管理表

func (*SysRoleInfo) TableName

func (m *SysRoleInfo) TableName() string

type SysRoleMenu

type SysRoleMenu struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` // 角色所属租户编码
	RoleID     int64             `gorm:"column:role_id;uniqueIndex:ri_mi;NOT NULL;type:BIGINT"`          // 角色ID
	AppCode    string            `gorm:"column:app_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"`    // 应用编码
	ModuleCode string            `gorm:"column:module_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` // 模块编码
	MenuID     int64             `gorm:"column:menu_id;uniqueIndex:ri_mi;NOT NULL;type:BIGINT"`          // 菜单ID
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
}

应用菜单关联表

func (*SysRoleMenu) TableName

func (m *SysRoleMenu) TableName() string

type SysRoleModule

type SysRoleModule struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"` // 角色所属租户编码
	RoleID     int64             `gorm:"column:role_id;uniqueIndex:tc_ac;NOT NULL;type:BIGINT"`          // 角色ID
	AppCode    string            `gorm:"column:app_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"`    // 应用编码
	ModuleCode string            `gorm:"column:module_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"` // 模块编码
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_ac"`
}

应用菜单关联表

func (*SysRoleModule) TableName

func (m *SysRoleModule) TableName() string

type SysServiceInfo added in v1.0.1

type SysServiceInfo struct {
	ID      int64  `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"` // id编号
	Code    string `gorm:"column:code;unique;type:VARCHAR(100);NOT NULL"`    // 服务编码
	Name    string `gorm:"column:name;type:VARCHAR(100);NOT NULL"`           // 服务名
	Version string `gorm:"column:version;type:VARCHAR(100);NOT NULL"`        //服务版本
	Desc    string `gorm:"column:desc;type:VARCHAR(500);"`                   // 备注
	stores.NoDelTime
}

func (*SysServiceInfo) TableName added in v1.0.1

func (m *SysServiceInfo) TableName() string

type SysSlotInfo

type SysSlotInfo struct {
	ID       int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`                        // id编号
	Code     string            `gorm:"column:code;uniqueIndex:code_slot;type:VARCHAR(100);NOT NULL"`            // 鉴权的编码
	SubCode  string            `gorm:"column:sub_code;uniqueIndex:code_slot;type:VARCHAR(100);NOT NULL"`        // 鉴权的编码
	SlotCode string            `gorm:"column:slot_code;uniqueIndex:code_slot;type:VARCHAR(100);NOT NULL"`       //slot的编码
	Method   string            `gorm:"column:method;type:VARCHAR(50);NOT NULL"`                                 // 请求方式 GET  POST
	Uri      string            `gorm:"column:uri;type:VARCHAR(100);NOT NULL"`                                   // 参考: /api/v1/system/user/self/captcha?fwefwf=gwgweg&wefaef=gwegwe
	Hosts    []string          `gorm:"column:hosts;type:json;serializer:json;NOT NULL;default:'[]';NOT NULL"`   //访问的地址 host or host:port
	Body     string            `gorm:"column:body;type:VARCHAR(100);NOT NULL"`                                  // body 参数模板
	Handler  map[string]string `gorm:"column:handler;type:json;serializer:json;NOT NULL;default:'{}';NOT NULL"` //http头
	AuthType string            `gorm:"column:auth_type;type:VARCHAR(100);NOT NULL"`                             //鉴权类型 core
	Desc     string            `gorm:"column:desc;type:VARCHAR(500);"`                                          // 备注
	stores.SoftTime
}

func (*SysSlotInfo) TableName

func (m *SysSlotInfo) TableName() string

type SysSms

type SysSms struct {
	Type            conf.SmsType `gorm:"column:type;type:VARCHAR(256);default:'';"`
	AccessKeyID     string       `gorm:"column:accessKeyID;type:VARCHAR(256);default:'';"`
	AccessKeySecret string       `gorm:"column:accessKeySecret;type:VARCHAR(256);default:'';"`
	AppID           string       `gorm:"column:appID;type:VARCHAR(256);default:'';"`
	AppKey          string       `gorm:"column:appKey;type:VARCHAR(256);default:'';"`
}

type SysTenantAccess

type SysTenantAccess struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`                       // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:tenant_scope;type:VARCHAR(50);NOT NULL;"` // 租户编码
	AccessCode string            `gorm:"column:access_code;uniqueIndex:tenant_scope;type:VARCHAR(50);NOT NULL"`  // 范围编码
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tenant_scope"`
}

应用菜单关联表

func (*SysTenantAccess) TableName

func (m *SysTenantAccess) TableName() string

type SysTenantAgreement

type SysTenantAgreement struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"` // 租户编码
	Code       string            `gorm:"column:code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"`        // 协议编码
	Name       string            `gorm:"column:name;type:VARCHAR(50);NOT NULL"`                          //协议名称
	Title      string            `gorm:"column:title;type:VARCHAR(50);"`
	Content    string            `gorm:"column:content;type:MEDIUMTEXT;"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_ac"`
}

func (*SysTenantAgreement) TableName

func (m *SysTenantAgreement) TableName() string

type SysTenantApp

type SysTenantApp struct {
	ID             int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode     stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"` // 租户编码
	AppCode        string            `gorm:"column:app_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"`    // 应用编码 这里只关联主应用,主应用授权,子应用也授权了
	DingMini       *SysTenantThird   `gorm:"embedded;embeddedPrefix:ding_mini_"`                             //钉钉企业应用接入
	Android        *SysThirdApp      `gorm:"embedded;embeddedPrefix:android_"`                               //安卓应用
	WxMini         *SysTenantThird   `gorm:"embedded;embeddedPrefix:wx_mini_"`                               //微信小程序接入
	WxOpen         *SysTenantThird   `gorm:"embedded;embeddedPrefix:wx_open_"`                               //微信公众号接入
	LoginTypes     []users.RegType   `gorm:"column:login_types;type:json;serializer:json"`                   //支持的登录类型(不填支持全部登录方式):  	 "email":邮箱 "phone":手机号  "wxMiniP":微信小程序  "wxOfficial": 微信公众号登录   "dingApp":钉钉应用(包含小程序,h5等方式)  "pwd":账号密码注册
	IsAutoRegister int64             `gorm:"column:is_auto_register;type:BIGINT;default:1"`                  //登录未注册是否自动注册
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_ac"`
}

租户下的应用列表

func (*SysTenantApp) TableName

func (m *SysTenantApp) TableName() string

type SysTenantAppMenu

type SysTenantAppMenu struct {
	TempLateID int64             `gorm:"column:template_id;type:BIGINT;NOT NULL"`      // 模板id
	TenantCode stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL"` // 租户编码
	AppCode    string            `gorm:"column:app_code;type:VARCHAR(50);NOT NULL"`    // 应用编码 这里只关联主应用,主应用授权,子应用也授权了
	SysModuleMenu
}

菜单管理表

func (*SysTenantAppMenu) TableName

func (m *SysTenantAppMenu) TableName() string

type SysTenantAppModule

type SysTenantAppModule struct {
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"` // 租户编码
	SysAppModule
}

租户下的应用列表

func (*SysTenantAppModule) TableName

func (m *SysTenantAppModule) TableName() string

type SysTenantConfig

type SysTenantConfig struct {
	ID                        int64                               `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode                stores.TenantCode                   `gorm:"column:tenant_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` // 租户编码
	RegisterRoleID            int64                               `gorm:"column:register_role_id;type:BIGINT;NOT NULL"`                   //注册分配的角色id
	DeviceLimit               int64                               `gorm:"column:device_limit;type:BIGINT;default:0"`                      // 租户下的设备数量限制,0为不限制
	CheckUserDelete           int64                               `gorm:"column:check_user_delete;type:BIGINT;default:2"`                 // 1(禁止项目管理员注销账号) 2(不禁止项目管理员注销账号)
	WeatherKey                string                              `gorm:"column:weather_key;type:VARCHAR(50);default:'';"`                //参考: https://dev.qweather.com/
	RegisterAutoCreateProject []*tenant.RegisterAutoCreateProject `gorm:"column:register_auto_create_project;type:json;serializer:json;default:'[]'"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
}

租户下的邮箱配置

func (*SysTenantConfig) TableName

func (m *SysTenantConfig) TableName() string

type SysTenantEmail

type SysTenantEmail struct {
	From     string `gorm:"column:from;type:VARCHAR(50);default:'';NOT NULL"`     // 发件人  你自己要发邮件的邮箱
	Host     string `gorm:"column:host;type:VARCHAR(50);default:'';NOT NULL"`     // 服务器地址 例如 smtp.qq.com  请前往QQ或者你要发邮件的邮箱查看其smtp协议
	Secret   string `gorm:"column:secret;type:VARCHAR(50);default:'';NOT NULL"`   // 密钥    用于登录的密钥 最好不要用邮箱密码 去邮箱smtp申请一个用于登录的密钥
	Nickname string `gorm:"column:nickname;type:VARCHAR(50);default:'';NOT NULL"` // 昵称    发件人昵称 通常为自己的邮箱
	Port     int64  `gorm:"column:port;type:int;default:465"`                     // 端口     请前往QQ或者你要发邮件的邮箱查看其smtp协议 大多为 465
	IsSSL    int64  `gorm:"column:is_ssl;type:int;default:2"`                     // 是否SSL   是否开启SSL
}

type SysTenantInfo

type SysTenantInfo struct {
	ID               int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`        // id编号
	Code             stores.TenantCode `gorm:"column:code;uniqueIndex:code;type:VARCHAR(100);NOT NULL"` // 租户编码
	Name             string            `gorm:"column:name;uniqueIndex:name;type:VARCHAR(100);NOT NULL"` // 租户名称
	AdminUserID      int64             `gorm:"column:admin_user_id;type:BIGINT;NOT NULL"`               // 超级管理员id
	AdminRoleID      int64             `gorm:"column:admin_role_id;type:BIGINT;NOT NULL"`               // 超级角色
	Desc             string            `gorm:"column:desc;type:VARCHAR(100);NOT NULL"`                  //应用描述
	DefaultProjectID int64             `gorm:"column:default_project_id;type:BIGINT;NOT NULL"`
	DefaultAreaID    int64             `gorm:"column:default_area_id;type:BIGINT;NOT NULL"`
	UserCount        int64             `gorm:"column:user_count;type:bigint;default:0;"` //租户下用户统计
	SysTenantOem
	Status int64 `gorm:"column:status;type:BIGINT;NOT NULL;default:1"` //租戶状态: 1启用 2禁用
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:code;uniqueIndex:name"`
}

租户信息表

func (*SysTenantInfo) TableName

func (m *SysTenantInfo) TableName() string

type SysTenantOem

type SysTenantOem struct {
	BackgroundColour string `gorm:"column:background_colour;type:VARCHAR(54);"` //背景颜色
	BackgroundDesc   string `gorm:"column:background_desc;type:VARCHAR(54);"`   //背景描述
	BackgroundImg    string `gorm:"column:background_img;type:VARCHAR(512);"`   //背景图片
	LogoImg          string `gorm:"column:logo_img;type:VARCHAR(512);"`         //租户logo地址
	Title            string `gorm:"column:title;type:VARCHAR(100);"`            //中文标题
	TitleEn          string `gorm:"column:title_en;type:VARCHAR(100);"`         //英文标题
	Footer           string `gorm:"column:footer;type:text;"`                   //页尾
}

type SysTenantOpenWebhook

type SysTenantOpenWebhook struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`                        // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:tc_ac;type:VARCHAR(50);NOT NULL"`          // 租户编码
	Code       string            `gorm:"column:code;type:VARCHAR(50);uniqueIndex:tc_ac;NOT NULL"`                 //业务里定义的,推送的内容
	Uri        string            `gorm:"column:uri;type:VARCHAR(100);NOT NULL"`                                   // 参考: /api/v1/system/user/self/captcha?fwefwf=gwgweg&wefaef=gwegwe
	Hosts      []string          `gorm:"column:hosts;type:json;serializer:json;NOT NULL;default:'[]';NOT NULL"`   //访问的地址 host or host:port
	Desc       string            `gorm:"column:desc;type:VARCHAR(500);"`                                          // 备注
	Handler    map[string]string `gorm:"column:handler;type:json;serializer:json;NOT NULL;default:'{}';NOT NULL"` //http头
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_ac"`
}

租户开放认证

func (*SysTenantOpenWebhook) TableName

func (m *SysTenantOpenWebhook) TableName() string

type SysTenantThird

type SysTenantThird struct {
	AppID string `gorm:"column:app_id;type:VARCHAR(50);default:'';"`
	//MiniAppID string `gorm:"column:mini_app_id;type:VARCHAR(50);default:”;"`
	AppKey    string `gorm:"column:app_key;type:VARCHAR(50);default:'';"`
	AppSecret string `gorm:"column:app_secret;type:VARCHAR(200);default:'';"`
}

第三方app配置

type SysThirdApp

type SysThirdApp struct {
	Version     string `gorm:"column:version;type:varchar(64);"`       // 应用版本
	FilePath    string `gorm:"column:file_path;type:varchar(256);"`    // 文件路径,拿来下载文件
	VersionDesc string `gorm:"column:version_desc;type:VARCHAR(100);"` //版本说明
}

第三方app配置

type SysUserAreaApply

type SysUserAreaApply struct {
	ID         int64             `gorm:"column:id;type:bigint;primary_key;AUTO_INCREMENT"`
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` // 租户编码
	UserID     int64             `gorm:"column:user_id;uniqueIndex:ri_mi;type:bigint;NOT NULL"`          // 用户ID(雪花id)
	ProjectID  stores.ProjectID  `gorm:"column:project_id;uniqueIndex:ri_mi;type:bigint;NOT NULL"`       // 所属项目ID(雪花ID)
	AreaID     stores.AreaID     `gorm:"column:area_id;uniqueIndex:ri_mi;type:bigint;NOT NULL"`          // 区域ID(雪花ID)
	AuthType   def.AuthType      `gorm:"column:auth_type;type:bigint;NOT NULL"`                          // 授权类型 1 管理员(可以调整本区域及旗下区域的设备区域规划)  2 读授权(可以对区域下的设备进行操作,但是不能修改区域) 2 读写授权(可以对区域下的设备进行操作,同时可以对区域进行修改,但是不能新增或删除)
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
}

用户区域权限授权表

func (*SysUserAreaApply) TableName

func (m *SysUserAreaApply) TableName() string

type SysUserInfo

type SysUserInfo struct {
	TenantCode stores.TenantCode `` // 租户编码
	/* 168-byte string literal not displayed */
	UserID         int64             `gorm:"column:user_id;primary_key;AUTO_INCREMENT;type:BIGINT;NOT NULL"` // 用户id
	UserName       sql.NullString    `gorm:"column:user_name;uniqueIndex:tc_un;type:VARCHAR(20)"`            // 登录用户名
	NickName       string            `gorm:"column:nick_name;type:VARCHAR(60);NOT NULL"`                     // 用户的昵称
	Password       string            `gorm:"column:password;type:CHAR(32);NOT NULL"`                         // 登录密码
	Email          sql.NullString    `gorm:"column:email;uniqueIndex:tc_email;type:VARCHAR(255)"`            // 邮箱
	Phone          sql.NullString    `gorm:"column:phone;uniqueIndex:tc_phone;type:VARCHAR(20)"`             // 手机号
	WechatUnionID  sql.NullString    `gorm:"column:wechat_union_id;uniqueIndex:tc_wui;type:VARCHAR(128)"`    // 微信union id
	WechatOpenID   sql.NullString    `gorm:"column:wechat_open_id;uniqueIndex:tc_woi;type:VARCHAR(128)"`     // 微信union id
	DingTalkUserID sql.NullString    `gorm:"column:ding_talk_user_id;uniqueIndex:tc_doi;type:VARCHAR(128)"`
	LastIP         string            `gorm:"column:last_ip;type:VARCHAR(128);NOT NULL"`                   // 最后登录ip
	RegIP          string            `gorm:"column:reg_ip;type:VARCHAR(128);NOT NULL"`                    // 注册ip
	Sex            int64             `gorm:"column:sex;type:SMALLINT;default:3;NOT NULL"`                 // 用户的性别,值为1时是男性,值为2时是女性,其他值为未知
	City           string            `gorm:"column:city;type:VARCHAR(50);NOT NULL"`                       // 用户所在城市
	Country        string            `gorm:"column:country;type:VARCHAR(50);NOT NULL"`                    // 用户所在国家
	Province       string            `gorm:"column:province;type:VARCHAR(50);NOT NULL"`                   // 用户所在省份
	Language       string            `gorm:"column:language;type:VARCHAR(50);NOT NULL"`                   // 用户的语言,简体中文为zh_CN
	HeadImg        string            `gorm:"column:head_img;type:VARCHAR(256);NOT NULL"`                  // 用户头像
	Role           int64             `gorm:"column:role;type:BIGINT;NOT NULL"`                            // 用户默认角色(默认使用该角色)
	Tags           map[string]string `gorm:"column:tags;type:json;serializer:json;NOT NULL;default:'{}'"` // 产品标签
	IsAllData      int64             `gorm:"column:is_all_data;type:SMALLINT;default:1;NOT NULL"`         // 是否所有数据权限(1是,2否)
	Roles          []*SysUserRole    `gorm:"foreignKey:UserID;references:UserID"`
	Tenant         *SysTenantInfo    `gorm:"foreignKey:Code;references:TenantCode"`
	Status         int64             `gorm:"column:status;type:BIGINT;NOT NULL;default:1"` //租戶状态: 1启用 2禁用
	stores.NoDelTime
	DeletedTime stores.DeletedTime `` /* 153-byte string literal not displayed */
}

用户登录信息表

func (*SysUserInfo) TableName

func (m *SysUserInfo) TableName() string

type SysUserMessage

type SysUserMessage struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`               // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` // 租户编码
	UserID     int64             `gorm:"column:user_id;uniqueIndex:ri_mi;NOT NULL;type:BIGINT"`          // 用户ID
	Group      string            `gorm:"column:group;type:VARCHAR(50);NOT NULL"`                         //消息分类
	MessageID  int64             `gorm:"column:message_id;uniqueIndex:ri_mi;NOT NULL;type:BIGINT"`       //消息id
	IsRead     int64             `gorm:"column:is_read;NOT NULL;type:BIGINT;default:2"`                  //是否已读
	Message    *SysMessageInfo   `gorm:"foreignKey:ID;references:MessageID"`
	stores.Time
}

func (*SysUserMessage) TableName

func (m *SysUserMessage) TableName() string

type SysUserProfile

type SysUserProfile struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`                // 编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL;uniqueIndex:tc_un;"` // 租户编码
	UserID     int64             `gorm:"column:user_id;uniqueIndex:tc_un;type:BIGINT;NOT NULL"`           // 用户id
	Code       string            `gorm:"column:code;type:VARCHAR(50);uniqueIndex:tc_un;NOT NULL"`         //配置code
	Params     string            `gorm:"column:params;type:text;NOT NULL"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:tc_un;"`
}

用户配置表

func (*SysUserProfile) TableName

func (m *SysUserProfile) TableName() string

type SysUserRole

type SysUserRole struct {
	ID         int64             `gorm:"column:id;type:BIGINT;primary_key;AUTO_INCREMENT"`      // id编号
	TenantCode stores.TenantCode `gorm:"column:tenant_code;type:VARCHAR(50);NOT NULL;"`         // 租户编码
	UserID     int64             `gorm:"column:user_id;uniqueIndex:ri_mi;NOT NULL;type:BIGINT"` // 用户ID
	RoleID     int64             `gorm:"column:role_id;uniqueIndex:ri_mi;NOT NULL;type:BIGINT"` // 角色ID
	Role       *SysRoleInfo      `gorm:"foreignKey:ID;references:RoleID"`
	stores.NoDelTime
	DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;uniqueIndex:ri_mi"`
}

应用菜单关联表

func (*SysUserRole) TableName

func (m *SysUserRole) TableName() string

type Target

type Target struct {
	Type def.TargetType
	ID   int64
}

type TenantAccessFilter

type TenantAccessFilter struct {
	TenantCode  string
	AppCode     string
	Route       string
	Method      string
	Group       string
	Name        string
	ModuleCode  string
	WithRoles   bool
	IsNeedAuth  int64
	AccessCodes []string
}

type TenantAgreementFilter

type TenantAgreementFilter struct {
	ID   int64
	Code string
}

type TenantAgreementRepo

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

func NewTenantAgreementRepo

func NewTenantAgreementRepo(in any) *TenantAgreementRepo

func (TenantAgreementRepo) CountByFilter

func (p TenantAgreementRepo) CountByFilter(ctx context.Context, f TenantAgreementFilter) (size int64, err error)

func (TenantAgreementRepo) Delete

func (p TenantAgreementRepo) Delete(ctx context.Context, id int64) error

func (TenantAgreementRepo) DeleteByFilter

func (TenantAgreementRepo) FindByFilter

func (TenantAgreementRepo) FindOne

func (TenantAgreementRepo) FindOneByFilter

func (TenantAgreementRepo) Insert

func (TenantAgreementRepo) MultiInsert

func (p TenantAgreementRepo) MultiInsert(ctx context.Context, data []*SysTenantAgreement) error

批量插入 LightStrategyDevice 记录

func (TenantAgreementRepo) Update

func (TenantAgreementRepo) UpdateWithField

func (d TenantAgreementRepo) UpdateWithField(ctx context.Context, f TenantAgreementFilter, updates map[string]any) error

type TenantApiRepo

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

func NewTenantAccessRepo

func NewTenantAccessRepo(in any) *TenantApiRepo

func (TenantApiRepo) CountByFilter

func (p TenantApiRepo) CountByFilter(ctx context.Context, f TenantAccessFilter) (size int64, err error)

func (TenantApiRepo) Delete

func (p TenantApiRepo) Delete(ctx context.Context, id int64) error

func (TenantApiRepo) DeleteByFilter

func (p TenantApiRepo) DeleteByFilter(ctx context.Context, f TenantAccessFilter) error

func (TenantApiRepo) FindByFilter

func (TenantApiRepo) FindOne

func (p TenantApiRepo) FindOne(ctx context.Context, id int64) (*SysTenantAccess, error)

func (TenantApiRepo) FindOneByFilter

func (p TenantApiRepo) FindOneByFilter(ctx context.Context, f TenantAccessFilter) (*SysTenantAccess, error)

func (TenantApiRepo) Insert

func (p TenantApiRepo) Insert(ctx context.Context, data *SysTenantAccess) error

func (TenantApiRepo) MultiInsert

func (p TenantApiRepo) MultiInsert(ctx context.Context, data []*SysTenantAccess) error

批量插入 LightStrategyDevice 记录

func (TenantApiRepo) MultiUpdate

func (p TenantApiRepo) MultiUpdate(ctx context.Context, tenantCode string, AccessCodes []string) error

func (TenantApiRepo) Update

func (p TenantApiRepo) Update(ctx context.Context, data *SysTenantAccess) error

type TenantAppFilter

type TenantAppFilter struct {
	TenantCode string
	IDs        []int64
	AppCodes   []string
	Type       string
	SubType    string
	AppID      string
}

type TenantAppMenuFilter

type TenantAppMenuFilter struct {
	ModuleCode string
	Name       string
	TenantCode string
	AppCode    string
	Path       string
	MenuIDs    []int64
	TempLateID int64
	IsCommon   int64
}

type TenantAppMenuRepo

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

func NewTenantAppMenuRepo

func NewTenantAppMenuRepo(in any) *TenantAppMenuRepo

func (TenantAppMenuRepo) CountByFilter

func (p TenantAppMenuRepo) CountByFilter(ctx context.Context, f TenantAppMenuFilter) (size int64, err error)

func (TenantAppMenuRepo) Delete

func (p TenantAppMenuRepo) Delete(ctx context.Context, id int64) error

func (TenantAppMenuRepo) DeleteByFilter

func (p TenantAppMenuRepo) DeleteByFilter(ctx context.Context, f TenantAppMenuFilter) error

func (TenantAppMenuRepo) FindByFilter

func (TenantAppMenuRepo) FindOne

func (TenantAppMenuRepo) FindOneByFilter

func (TenantAppMenuRepo) Insert

func (TenantAppMenuRepo) MultiInsert

func (p TenantAppMenuRepo) MultiInsert(ctx context.Context, data []*SysTenantAppMenu) error

批量插入 LightStrategyDevice 记录

func (TenantAppMenuRepo) Update

func (TenantAppMenuRepo) UpdateByFilter

只更新非零值的字段

type TenantAppModuleFilter

type TenantAppModuleFilter struct {
	ID          int64
	AppCodes    []string
	AppCode     string
	ModuleCodes []string
	TenantCode  string
	WithModule  bool
}

type TenantAppModuleRepo

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

func NewTenantAppModuleRepo

func NewTenantAppModuleRepo(in any) *TenantAppModuleRepo

func (TenantAppModuleRepo) CountByFilter

func (p TenantAppModuleRepo) CountByFilter(ctx context.Context, f TenantAppModuleFilter) (size int64, err error)

func (TenantAppModuleRepo) Delete

func (p TenantAppModuleRepo) Delete(ctx context.Context, id int64) error

func (TenantAppModuleRepo) DeleteByFilter

func (TenantAppModuleRepo) FindByFilter

func (TenantAppModuleRepo) FindOne

func (TenantAppModuleRepo) FindOneByFilter

func (TenantAppModuleRepo) Insert

func (TenantAppModuleRepo) MultiInsert

func (p TenantAppModuleRepo) MultiInsert(ctx context.Context, data []*SysTenantAppModule) error

批量插入 LightStrategyDevice 记录

func (TenantAppModuleRepo) Update

type TenantAppRepo

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

func NewTenantAppRepo

func NewTenantAppRepo(in any) *TenantAppRepo

func (TenantAppRepo) CountByFilter

func (p TenantAppRepo) CountByFilter(ctx context.Context, f TenantAppFilter) (size int64, err error)

func (TenantAppRepo) Delete

func (p TenantAppRepo) Delete(ctx context.Context, id int64) error

func (TenantAppRepo) DeleteByFilter

func (p TenantAppRepo) DeleteByFilter(ctx context.Context, f TenantAppFilter) error

func (TenantAppRepo) FindByFilter

func (p TenantAppRepo) FindByFilter(ctx context.Context, f TenantAppFilter, page *stores.PageInfo) ([]*SysTenantApp, error)

func (TenantAppRepo) FindOne

func (p TenantAppRepo) FindOne(ctx context.Context, id int64) (*SysTenantApp, error)

func (TenantAppRepo) FindOneByFilter

func (p TenantAppRepo) FindOneByFilter(ctx context.Context, f TenantAppFilter) (*SysTenantApp, error)

func (TenantAppRepo) Insert

func (p TenantAppRepo) Insert(ctx context.Context, data *SysTenantApp) error

func (TenantAppRepo) MultiInsert

func (p TenantAppRepo) MultiInsert(ctx context.Context, data []*SysTenantApp) error

批量插入 LightStrategyDevice 记录

func (TenantAppRepo) MultiUpdate

func (p TenantAppRepo) MultiUpdate(ctx context.Context, tenantCode string, appCodes []string) error

func (TenantAppRepo) Update

func (p TenantAppRepo) Update(ctx context.Context, data *SysTenantApp) error

type TenantConfigFilter

type TenantConfigFilter struct {
	TenantCode string
}

type TenantConfigRepo

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

func NewTenantConfigRepo

func NewTenantConfigRepo(in any) *TenantConfigRepo

func (TenantConfigRepo) CountByFilter

func (p TenantConfigRepo) CountByFilter(ctx context.Context, f TenantConfigFilter) (size int64, err error)

func (TenantConfigRepo) Delete

func (p TenantConfigRepo) Delete(ctx context.Context, id int64) error

func (TenantConfigRepo) DeleteByFilter

func (p TenantConfigRepo) DeleteByFilter(ctx context.Context, f TenantConfigFilter) error

func (TenantConfigRepo) FindByFilter

func (TenantConfigRepo) FindOne

func (TenantConfigRepo) FindOneByFilter

func (TenantConfigRepo) Insert

func (p TenantConfigRepo) Insert(ctx context.Context, data *SysTenantConfig) error

func (TenantConfigRepo) MultiInsert

func (p TenantConfigRepo) MultiInsert(ctx context.Context, data []*SysTenantConfig) error

批量插入 LightStrategyDevice 记录

func (TenantConfigRepo) Update

func (p TenantConfigRepo) Update(ctx context.Context, data *SysTenantConfig) error

func (TenantConfigRepo) UpdateWithField

func (d TenantConfigRepo) UpdateWithField(ctx context.Context, f TenantConfigFilter, updates map[string]any) error

type TenantInfoFilter

type TenantInfoFilter struct {
	ID      int64
	Codes   []string
	Code    string
	Name    string
	AppCode string
}

type TenantInfoRepo

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

func NewTenantInfoRepo

func NewTenantInfoRepo(in any) *TenantInfoRepo

func (TenantInfoRepo) CountByFilter

func (p TenantInfoRepo) CountByFilter(ctx context.Context, f TenantInfoFilter) (size int64, err error)

func (TenantInfoRepo) Delete

func (p TenantInfoRepo) Delete(ctx context.Context, id int64) error

func (TenantInfoRepo) DeleteByFilter

func (p TenantInfoRepo) DeleteByFilter(ctx context.Context, f TenantInfoFilter) error

func (TenantInfoRepo) FindByFilter

func (p TenantInfoRepo) FindByFilter(ctx context.Context, f TenantInfoFilter, page *stores.PageInfo) ([]*SysTenantInfo, error)

func (TenantInfoRepo) FindOne

func (p TenantInfoRepo) FindOne(ctx context.Context, id int64) (*SysTenantInfo, error)

func (TenantInfoRepo) FindOneByFilter

func (p TenantInfoRepo) FindOneByFilter(ctx context.Context, f TenantInfoFilter) (*SysTenantInfo, error)

func (TenantInfoRepo) Insert

func (p TenantInfoRepo) Insert(ctx context.Context, data *SysTenantInfo) error

func (TenantInfoRepo) MultiInsert

func (p TenantInfoRepo) MultiInsert(ctx context.Context, data []*SysTenantInfo) error

批量插入 LightStrategyDevice 记录

func (TenantInfoRepo) Update

func (p TenantInfoRepo) Update(ctx context.Context, data *SysTenantInfo) error

func (TenantInfoRepo) UpdateUserCount

func (p TenantInfoRepo) UpdateUserCount(ctx context.Context, tenantCode string) error

type TenantOpenWebhookFilter

type TenantOpenWebhookFilter struct {
	Code string
}

type TenantOpenWebhookRepo

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

func NewTenantOpenWebhookRepo

func NewTenantOpenWebhookRepo(in any) *TenantOpenWebhookRepo

func (TenantOpenWebhookRepo) CountByFilter

func (p TenantOpenWebhookRepo) CountByFilter(ctx context.Context, f TenantOpenWebhookFilter) (size int64, err error)

func (TenantOpenWebhookRepo) Delete

func (p TenantOpenWebhookRepo) Delete(ctx context.Context, id int64) error

func (TenantOpenWebhookRepo) DeleteByFilter

func (TenantOpenWebhookRepo) FindByFilter

func (TenantOpenWebhookRepo) FindOne

func (TenantOpenWebhookRepo) FindOneByFilter

func (TenantOpenWebhookRepo) Insert

func (TenantOpenWebhookRepo) MultiInsert

func (p TenantOpenWebhookRepo) MultiInsert(ctx context.Context, data []*SysTenantOpenWebhook) error

批量插入 LightStrategyDevice 记录

func (TenantOpenWebhookRepo) Update

type UserAreaApplyFilter

type UserAreaApplyFilter struct {
	ProjectID int64
	AuthTypes []int64
	IDs       []int64
	AreaIDs   []int64
	AreaID    int64
}

type UserAreaApplyRepo

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

func NewUserAreaApplyRepo

func NewUserAreaApplyRepo(in any) *UserAreaApplyRepo

func (UserAreaApplyRepo) CountByFilter

func (p UserAreaApplyRepo) CountByFilter(ctx context.Context, f UserAreaApplyFilter) (size int64, err error)

func (UserAreaApplyRepo) Delete

func (p UserAreaApplyRepo) Delete(ctx context.Context, id int64) error

func (UserAreaApplyRepo) DeleteByFilter

func (p UserAreaApplyRepo) DeleteByFilter(ctx context.Context, f UserAreaApplyFilter) error

func (UserAreaApplyRepo) FindByFilter

func (UserAreaApplyRepo) FindOne

func (UserAreaApplyRepo) FindOneByFilter

func (UserAreaApplyRepo) Insert

func (UserAreaApplyRepo) MultiInsert

func (p UserAreaApplyRepo) MultiInsert(ctx context.Context, data []*SysUserAreaApply) error

批量插入 LightStrategyDevice 记录

func (UserAreaApplyRepo) Update

type UserInfoFilter

type UserInfoFilter struct {
	UserIDs        []int64
	HasAccessAreas []int64
	TenantCode     string
	UserNames      []string
	UserName       string
	Phone          string
	Phones         []string
	Email          string
	Emails         []string
	WechatOpenIDs  []string
	Accounts       []string //账号查询 非模糊查询
	WechatUnionID  string
	WechatOpenID   string
	DingTalkUserID string
	WithRoles      bool
	WithTenant     bool
	RoleCode       string
}

type UserInfoRepo

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

func NewUserInfoRepo

func NewUserInfoRepo(in any) *UserInfoRepo

func (UserInfoRepo) CountByFilter

func (p UserInfoRepo) CountByFilter(ctx context.Context, f UserInfoFilter) (size int64, err error)

func (UserInfoRepo) Delete

func (p UserInfoRepo) Delete(ctx context.Context, userID int64) error

func (UserInfoRepo) DeleteByFilter

func (p UserInfoRepo) DeleteByFilter(ctx context.Context, f UserInfoFilter) error

func (UserInfoRepo) FindByFilter

func (p UserInfoRepo) FindByFilter(ctx context.Context, f UserInfoFilter, page *stores.PageInfo) ([]*SysUserInfo, error)

func (UserInfoRepo) FindOne

func (p UserInfoRepo) FindOne(ctx context.Context, userID int64) (*SysUserInfo, error)

func (UserInfoRepo) FindOneByFilter

func (p UserInfoRepo) FindOneByFilter(ctx context.Context, f UserInfoFilter) (*SysUserInfo, error)

func (UserInfoRepo) FindUserCore

func (p UserInfoRepo) FindUserCore(ctx context.Context, f UserInfoFilter) (ret []*SysUserInfo, err error)

func (UserInfoRepo) Insert

func (p UserInfoRepo) Insert(ctx context.Context, data *SysUserInfo) error

func (UserInfoRepo) Update

func (p UserInfoRepo) Update(ctx context.Context, data *SysUserInfo) error

type UserMessageFilter

type UserMessageFilter struct {
	MessageID   int64
	WithMessage bool
	Group       string
	NotifyCode  string
	IsRead      int64
	Str1        string
	Str2        string
	Str3        string
}

type UserMessageRepo

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

func NewUserMessageRepo

func NewUserMessageRepo(in any) *UserMessageRepo

func (UserMessageRepo) CountByFilter

func (p UserMessageRepo) CountByFilter(ctx context.Context, f UserMessageFilter) (size int64, err error)

func (UserMessageRepo) CountNotRead

func (p UserMessageRepo) CountNotRead(ctx context.Context, userID int64) (map[string]int64, error)

func (UserMessageRepo) Delete

func (p UserMessageRepo) Delete(ctx context.Context, id int64) error

func (UserMessageRepo) DeleteByFilter

func (p UserMessageRepo) DeleteByFilter(ctx context.Context, f UserMessageFilter) error

func (UserMessageRepo) FindByFilter

func (UserMessageRepo) FindOne

func (p UserMessageRepo) FindOne(ctx context.Context, id int64) (*SysUserMessage, error)

func (UserMessageRepo) FindOneByFilter

func (p UserMessageRepo) FindOneByFilter(ctx context.Context, f UserMessageFilter) (*SysUserMessage, error)

func (UserMessageRepo) Insert

func (p UserMessageRepo) Insert(ctx context.Context, data *SysUserMessage) error

func (UserMessageRepo) MultiInsert

func (p UserMessageRepo) MultiInsert(ctx context.Context, data []*SysUserMessage) error

批量插入 LightStrategyDevice 记录

func (UserMessageRepo) MultiIsRead

func (p UserMessageRepo) MultiIsRead(ctx context.Context, userID int64, ids []int64) error

func (UserMessageRepo) Update

func (p UserMessageRepo) Update(ctx context.Context, data *SysUserMessage) error

type UserProfileFilter

type UserProfileFilter struct {
	Codes  []string
	Code   string
	UserID int64
}

type UserProfileRepo

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

func NewUserProfileRepo

func NewUserProfileRepo(in any) *UserProfileRepo

func (UserProfileRepo) CountByFilter

func (p UserProfileRepo) CountByFilter(ctx context.Context, f UserProfileFilter) (size int64, err error)

func (UserProfileRepo) Delete

func (p UserProfileRepo) Delete(ctx context.Context, id int64) error

func (UserProfileRepo) DeleteByFilter

func (p UserProfileRepo) DeleteByFilter(ctx context.Context, f UserProfileFilter) error

func (UserProfileRepo) FindByFilter

func (UserProfileRepo) FindOne

func (p UserProfileRepo) FindOne(ctx context.Context, id int64) (*SysUserProfile, error)

func (UserProfileRepo) FindOneByFilter

func (p UserProfileRepo) FindOneByFilter(ctx context.Context, f UserProfileFilter) (*SysUserProfile, error)

func (UserProfileRepo) Insert

func (p UserProfileRepo) Insert(ctx context.Context, data *SysUserProfile) error

func (UserProfileRepo) MultiInsert

func (p UserProfileRepo) MultiInsert(ctx context.Context, data []*SysUserProfile) error

批量插入 LightStrategyDevice 记录

func (UserProfileRepo) Update

func (p UserProfileRepo) Update(ctx context.Context, data *SysUserProfile) error

type UserRoleFilter

type UserRoleFilter struct {
	UserID int64
}

type UserRoleRepo

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

func NewUserRoleRepo

func NewUserRoleRepo(in any) *UserRoleRepo

func (UserRoleRepo) CountByFilter

func (p UserRoleRepo) CountByFilter(ctx context.Context, f UserRoleFilter) (size int64, err error)

func (UserRoleRepo) Delete

func (p UserRoleRepo) Delete(ctx context.Context, id int64) error

func (UserRoleRepo) DeleteByFilter

func (p UserRoleRepo) DeleteByFilter(ctx context.Context, f UserRoleFilter) error

func (UserRoleRepo) FindByFilter

func (p UserRoleRepo) FindByFilter(ctx context.Context, f UserRoleFilter, page *stores.PageInfo) ([]*SysUserRole, error)

func (UserRoleRepo) FindOne

func (p UserRoleRepo) FindOne(ctx context.Context, id int64) (*SysUserRole, error)

func (UserRoleRepo) FindOneByFilter

func (p UserRoleRepo) FindOneByFilter(ctx context.Context, f UserRoleFilter) (*SysUserRole, error)

func (UserRoleRepo) Insert

func (p UserRoleRepo) Insert(ctx context.Context, data *SysUserRole) error

func (UserRoleRepo) MultiInsert

func (p UserRoleRepo) MultiInsert(ctx context.Context, data []*SysUserRole) error

批量插入 LightStrategyDevice 记录

func (UserRoleRepo) MultiUpdate

func (p UserRoleRepo) MultiUpdate(ctx context.Context, userID int64, roleIDs []int64) error

func (UserRoleRepo) Update

func (p UserRoleRepo) Update(ctx context.Context, data *SysUserRole) error

Jump to

Keyboard shortcuts

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