groupusers

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type GroupUsers

type GroupUsers struct {
	Id         int64     `db:"id"`
	GroupId    int64     `db:"group_id"`
	UserId     int64     `db:"user_id"`
	ChannelId  string    `db:"channel_id"`
	IsManager  int64     `db:"is_manager"`
	CreateTime time.Time `db:"create_time"`
	UpdateTime time.Time `db:"update_time"`
}

type GroupUsersModel

type GroupUsersModel interface {
	TranCreate(ctx context.Context, session sqlx.Session, groupUserItem *GroupUsers) error
	TranDeleteByGroupId(ctx context.Context, session sqlx.Session, groupId int64) error
	IsInGroup(ctx context.Context, id, userId int64) (*GroupUsers, error)
	InGroups(ctx context.Context, id int64) ([]GroupUsers, error)
	FindUsersByChannelId(channelId string) ([]GroupUsers, error)
	// contains filtered or unexported methods
}

GroupUsersModel is an interface to be customized, add more methods here, and implement the added methods in customGroupUsersModel.

func NewGroupUsersModel

func NewGroupUsersModel(conn sqlx.SqlConn) GroupUsersModel

NewGroupUsersModel returns a model for the database table.

Jump to

Keyboard shortcuts

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