Documentation
¶
Index ¶
- Variables
- func GetUserDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- func GetUsertagDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- type SchemaUser
- type SchemaUsertag
- type User
- type UserRepo
- func (a *UserRepo) CountByMemberID(ctx context.Context, ds []uint64) []*schema.AgentOrderStatistic
- func (a *UserRepo) Create(ctx context.Context, item schema.User) error
- func (a *UserRepo) Delete(ctx context.Context, id uint64) error
- func (a *UserRepo) Get(ctx context.Context, id uint64, opts ...schema.UserQueryOptions) (*schema.User, error)
- func (a *UserRepo) GetByTeethlinkID(ctx context.Context, id uint64) (*schema.User, error)
- func (a *UserRepo) Query(ctx context.Context, params schema.UserQueryParam, ...) (*schema.UserQueryResult, error)
- func (a *UserRepo) Update(ctx context.Context, id uint64, item schema.User) error
- func (a *UserRepo) UpdateStatus(ctx context.Context, id uint64, status int) error
- type Users
- type Usertag
- type UsertagRepo
- func (a *UsertagRepo) Create(ctx context.Context, item schema.Usertag) error
- func (a *UsertagRepo) Delete(ctx context.Context, id uint64) error
- func (a *UsertagRepo) Get(ctx context.Context, id uint64, opts ...schema.UsertagQueryOptions) (*schema.Usertag, error)
- func (a *UsertagRepo) Query(ctx context.Context, params schema.UsertagQueryParam, ...) (*schema.UsertagQueryResult, error)
- func (a *UsertagRepo) Update(ctx context.Context, id uint64, item schema.Usertag) error
- func (a *UsertagRepo) UpdateStatus(ctx context.Context, id uint64, status int) error
- type Usertags
Constants ¶
This section is empty.
Variables ¶
View Source
var UsertagSet = wire.NewSet(wire.Struct(new(UsertagRepo), "*"))
Functions ¶
Types ¶
type SchemaUser ¶
func (SchemaUser) ToUser ¶
func (a SchemaUser) ToUser() *User
type SchemaUsertag ¶
func (SchemaUsertag) ToUsertag ¶
func (a SchemaUsertag) ToUsertag() *Usertag
type User ¶
type User struct { util.Model UserName string `gorm:"size:64;uniqueIndex;default:'';not null;"` // 用户名 RealName string `gorm:"size:64;index;default:'';"` // 真实姓名 Password string `gorm:"size:40;default:'';"` // 密码 Salt string `gorm:"size:4;default:'';"` // 密码加盐 TeethlinkID uint64 `gorm:""` // 在teethlink 那边的id MemberID uint64 `gorm:""` // 该用户与哪位成员(经销商)绑定 Address string `gorm:"size:50;default:'';"` // 地址 Email *string `gorm:"size:255;"` // 邮箱 Phone *string `gorm:"size:20;"` // 手机号 Status int `gorm:"index;"` // 状态(1:启用 0:停用) Creator uint64 `gorm:""` // 创建者 TotalMoney *float32 `gorm:"default:0;"` // 总充值金额 LeftMoney *float32 `gorm:"default:0;"` // 剩余金额 UsebleStorage *uint64 `gorm:""` // 可用存储 UsedStorage *uint64 `gorm:""` // 已用存储 MemberNumber *uint64 `gorm:"default:0;"` // 子账户数量 UsertagID uint64 `gorm:"default:0;"` // usertag唯一标识 }
func (User) ToSchemaUser ¶
type UserRepo ¶
func (*UserRepo) CountByMemberID ¶
func (*UserRepo) GetByTeethlinkID ¶
func (*UserRepo) Query ¶
func (a *UserRepo) Query(ctx context.Context, params schema.UserQueryParam, opts ...schema.UserQueryOptions) (*schema.UserQueryResult, error)
type Usertag ¶
type Usertag struct { util.Model TagName string `gorm:"size:64;uniqueIndex;default:'';not null;"` // 用户名 Memo string `gorm:""` // 备注 Status int `gorm:"index;"` // 状态(1:启用 0:停用) Creator uint64 `gorm:""` // 创建者 }
func (Usertag) ToSchemaUsertag ¶
type UsertagRepo ¶
func (*UsertagRepo) Get ¶
func (a *UsertagRepo) Get(ctx context.Context, id uint64, opts ...schema.UsertagQueryOptions) (*schema.Usertag, error)
func (*UsertagRepo) Query ¶
func (a *UsertagRepo) Query(ctx context.Context, params schema.UsertagQueryParam, opts ...schema.UsertagQueryOptions) (*schema.UsertagQueryResult, error)
func (*UsertagRepo) UpdateStatus ¶
Click to show internal directories.
Click to hide internal directories.