model

package
v0.0.0-...-592b0ac Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type DmModel

type DmModel interface {
	CheckMemeberWithGoupID(MemberID1 string, MemberType1 int64, MemberID2 string, MemberType2 int64) (bool, error)
	FindByGroupInfo(page def.PageInfo) ([]*GroupInfo, error)
	FindByGroupMemberGroupID(GroupID int64, page def.PageInfo) ([]*GroupMember, error)
	FindByGroupMemberMemberID(MemberID string, page def.PageInfo) ([]*GroupMember, error)
	GetCountByGroupInfo() (size int64, err error)
	GetCountByGroupMemberGroupID(GroupID int64) (size int64, err error)
	GetCountByGroupMemberMemberID(MemberID string) (size int64, err error)
}

func NewDcModel

func NewDcModel(conn sqlx.SqlConn, c cache.CacheConf) DmModel

type GroupInfo

type GroupInfo struct {
	GroupID     int64        `db:"groupID"` // 组id
	Name        string       `db:"name"`    // 组名
	Uid         int64        `db:"uid"`     // 管理员用户id
	CreatedTime time.Time    `db:"createdTime"`
	UpdatedTime sql.NullTime `db:"updatedTime"`
	DeletedTime sql.NullTime `db:"deletedTime"`
}

type GroupInfoModel

type GroupInfoModel interface {
	Insert(data GroupInfo) (sql.Result, error)
	FindOne(groupID int64) (*GroupInfo, error)
	Update(data GroupInfo) error
	Delete(groupID int64) error
}

func NewGroupInfoModel

func NewGroupInfoModel(conn sqlx.SqlConn, c cache.CacheConf) GroupInfoModel

type GroupMember

type GroupMember struct {
	Id          int64        `db:"id"`
	GroupID     int64        `db:"groupID"`    // 组id
	MemberID    string       `db:"memberID"`   // 成员id
	MemberType  int64        `db:"memberType"` // 成员类型:1:设备 2:用户
	CreatedTime time.Time    `db:"createdTime"`
	UpdatedTime sql.NullTime `db:"updatedTime"`
	DeletedTime sql.NullTime `db:"deletedTime"`
}

type GroupMemberModel

type GroupMemberModel interface {
	Insert(data GroupMember) (sql.Result, error)
	FindOne(id int64) (*GroupMember, error)
	FindOneByGroupIDMemberIDMemberType(groupID int64, memberID string, memberType int64) (*GroupMember, error)
	Update(data GroupMember) error
	Delete(id int64) error
}

func NewGroupMemberModel

func NewGroupMemberModel(conn sqlx.SqlConn, c cache.CacheConf) GroupMemberModel

Jump to

Keyboard shortcuts

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