db

package
v0.0.0-...-b89eba7 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID        int64     `json:"id"`
	UserID    int64     `json:"user_id"`
	Name      string    `json:"name"`
	Avatar    string    `json:"avatar"`
	Gender    Gender    `json:"gender"`
	Signature string    `json:"signature"`
	CreateAt  time.Time `json:"create_at"`
}

type Application

type Application struct {
	Account1ID int64             `json:"account1_id"`
	Account2ID int64             `json:"account2_id"`
	ApplyMsg   string            `json:"apply_msg"`
	RefuseMsg  string            `json:"refuse_msg"`
	Status     Applicationstatus `json:"status"`
	CreateAt   time.Time         `json:"create_at"`
	UpdateAt   time.Time         `json:"update_at"`
}

type Applicationstatus

type Applicationstatus string
const (
	ApplicationstatusValue0 Applicationstatus = "已申请"
	ApplicationstatusValue1 Applicationstatus = "已同意"
	ApplicationstatusValue2 Applicationstatus = "已拒绝"
)

func (*Applicationstatus) Scan

func (e *Applicationstatus) Scan(src interface{}) error

type CreateAccountParams

type CreateAccountParams struct {
	ID        int64  `json:"id"`
	UserID    int64  `json:"user_id"`
	Name      string `json:"name"`
	Avatar    string `json:"avatar"`
	Gender    Gender `json:"gender"`
	Signature string `json:"signature"`
}

type CreateApplicationParams

type CreateApplicationParams struct {
	Account1ID int64  `json:"account1_id"`
	Account2ID int64  `json:"account2_id"`
	ApplyMsg   string `json:"apply_msg"`
}

type CreateFileParams

type CreateFileParams struct {
	FileName   string        `json:"file_name"`
	FileType   Filetype      `json:"file_type"`
	FileSize   int64         `json:"file_size"`
	Key        string        `json:"key"`
	Url        string        `json:"url"`
	RelationID sql.NullInt64 `json:"relation_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
}

type CreateFriendRelationParams

type CreateFriendRelationParams struct {
	Account1ID int64 `json:"account1_id"`
	Account2ID int64 `json:"account2_id"`
}

type CreateGroupNotifyParams

type CreateGroupNotifyParams struct {
	RelationID sql.NullInt64 `json:"relation_id"`
	MsgContent string        `json:"msg_content"`
	MsgExpand  pgtype.JSON   `json:"msg_expand"`
	AccountID  sql.NullInt64 `json:"account_id"`
	CreateAt   time.Time     `json:"create_at"`
	ReadIds    []int64       `json:"read_ids"`
}

type CreateGroupNotifyRow

type CreateGroupNotifyRow struct {
	ID         int64         `json:"id"`
	RelationID sql.NullInt64 `json:"relation_id"`
	MsgContent string        `json:"msg_content"`
	MsgExpand  pgtype.JSON   `json:"msg_expand"`
	AccountID  sql.NullInt64 `json:"account_id"`
	CreateAt   time.Time     `json:"create_at"`
	ReadIds    []int64       `json:"read_ids"`
}

type CreateGroupRelationParams

type CreateGroupRelationParams struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Avatar      string `json:"avatar"`
}

type CreateManySettingParams

type CreateManySettingParams struct {
	AccountID  int64  `json:"account_id"`
	RelationID int64  `json:"relation_id"`
	NickName   string `json:"nick_name"`
}

type CreateMsgParams

type CreateMsgParams struct {
	NotifyType Msgnotifytype `json:"notify_type"`
	MsgType    string        `json:"msg_type"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	RlyMsgID   sql.NullInt64 `json:"rly_msg_id"`
	RelationID int64         `json:"relation_id"`
}

type CreateMsgRow

type CreateMsgRow struct {
	ID         int64         `json:"id"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	CreateAt   time.Time     `json:"create_at"`
}

type CreateSettingParams

type CreateSettingParams struct {
	AccountID  int64 `json:"account_id"`
	RelationID int64 `json:"relation_id"`
	IsLeader   bool  `json:"is_leader"`
	IsSelf     bool  `json:"is_self"`
}

type CreateUserParams

type CreateUserParams struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}

type DeleteApplicationParams

type DeleteApplicationParams struct {
	Account1ID int64 `json:"account1_id"`
	Account2ID int64 `json:"account2_id"`
}

type DeleteSettingParams

type DeleteSettingParams struct {
	AccountID  int64 `json:"account_id"`
	RelationID int64 `json:"relation_id"`
}

type ExistsAccountByNameAndUserIDParams

type ExistsAccountByNameAndUserIDParams struct {
	UserID int64  `json:"user_id"`
	Name   string `json:"name"`
}

type ExistsApplicationByIDParams

type ExistsApplicationByIDParams struct {
	Account1ID int64 `json:"account1_id"`
	Account2ID int64 `json:"account2_id"`
}

type ExistsApplicationByIDWithLockParams

type ExistsApplicationByIDWithLockParams struct {
	Account1ID int64 `json:"account1_id"`
	Account2ID int64 `json:"account2_id"`
}

type ExistsFriendRelationParams

type ExistsFriendRelationParams struct {
	Account1ID int64 `json:"account1_id"`
	Account2ID int64 `json:"account2_id"`
}

type ExistsFriendSettingParams

type ExistsFriendSettingParams struct {
	Account1ID int64 `json:"account1_id"`
	Account2ID int64 `json:"account2_id"`
}

type ExistsIsLeaderParams

type ExistsIsLeaderParams struct {
	RelationID int64 `json:"relation_id"`
	AccountID  int64 `json:"account_id"`
}

type ExistsSettingParams

type ExistsSettingParams struct {
	AccountID  int64 `json:"account_id"`
	RelationID int64 `json:"relation_id"`
}

type FeedMsgsByAccountIDAndTimeParams

type FeedMsgsByAccountIDAndTimeParams struct {
	CreateAt  time.Time `json:"create_at"`
	Limit     int32     `json:"limit"`
	Offset    int32     `json:"offset"`
	Accountid int64     `json:"accountid"`
}

type FeedMsgsByAccountIDAndTimeRow

type FeedMsgsByAccountIDAndTimeRow struct {
	ID         int64         `json:"id"`
	NotifyType Msgnotifytype `json:"notify_type"`
	MsgType    string        `json:"msg_type"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	RlyMsgID   sql.NullInt64 `json:"rly_msg_id"`
	RelationID int64         `json:"relation_id"`
	CreateAt   time.Time     `json:"create_at"`
	IsRevoke   bool          `json:"is_revoke"`
	IsTop      bool          `json:"is_top"`
	IsPin      bool          `json:"is_pin"`
	PinTime    time.Time     `json:"pin_time"`
	ReadIds    []int64       `json:"read_ids"`
	Total      int64         `json:"total"`
	ReplyCount int64         `json:"reply_count"`
	HasRead    bool          `json:"has_read"`
}

type File

type File struct {
	ID         int64         `json:"id"`
	FileName   string        `json:"file_name"`
	FileType   Filetype      `json:"file_type"`
	FileSize   int64         `json:"file_size"`
	Key        string        `json:"key"`
	Url        string        `json:"url"`
	RelationID sql.NullInt64 `json:"relation_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	CreateAt   time.Time     `json:"create_at"`
}

type Filetype

type Filetype string
const (
	FiletypeImg  Filetype = "img"
	FiletypeFile Filetype = "file"
)

func (*Filetype) Scan

func (e *Filetype) Scan(src interface{}) error

type Gender

type Gender string
const (
	GenderValue0 Gender = "男"
	GenderValue1 Gender = "女"
	GenderValue2 Gender = "未知"
)

func (*Gender) Scan

func (e *Gender) Scan(src interface{}) error

type GetAccountByIDParams

type GetAccountByIDParams struct {
	TargetID int64 `json:"target_id"`
	SelfID   int64 `json:"self_id"`
}

type GetAccountByIDRow

type GetAccountByIDRow struct {
	ID         int64         `json:"id"`
	UserID     int64         `json:"user_id"`
	Name       string        `json:"name"`
	Avatar     string        `json:"avatar"`
	Gender     Gender        `json:"gender"`
	Signature  string        `json:"signature"`
	CreateAt   time.Time     `json:"create_at"`
	RelationID sql.NullInt64 `json:"relation_id"`
}

type GetAccountsByNameParams

type GetAccountsByNameParams struct {
	Limit     int32  `json:"limit"`
	Offset    int32  `json:"offset"`
	Name      string `json:"name"`
	AccountID int64  `json:"account_id"`
}

type GetAccountsByNameRow

type GetAccountsByNameRow struct {
	ID         int64         `json:"id"`
	Name       string        `json:"name"`
	Avatar     string        `json:"avatar"`
	Gender     Gender        `json:"gender"`
	RelationID sql.NullInt64 `json:"relation_id"`
	Total      int64         `json:"total"`
}

type GetAccountsByUserIDRow

type GetAccountsByUserIDRow struct {
	ID     int64  `json:"id"`
	Name   string `json:"name"`
	Avatar string `json:"avatar"`
	Gender Gender `json:"gender"`
}

type GetApplicationByIDParams

type GetApplicationByIDParams struct {
	Account1ID int64 `json:"account1_id"`
	Account2ID int64 `json:"account2_id"`
}

type GetApplicationsParams

type GetApplicationsParams struct {
	Limit     int32 `json:"limit"`
	Offset    int32 `json:"offset"`
	AccountID int64 `json:"account_id"`
}

type GetApplicationsRow

type GetApplicationsRow struct {
	Account1ID     int64             `json:"account1_id"`
	Account2ID     int64             `json:"account2_id"`
	ApplyMsg       string            `json:"apply_msg"`
	RefuseMsg      string            `json:"refuse_msg"`
	Status         Applicationstatus `json:"status"`
	CreateAt       time.Time         `json:"create_at"`
	UpdateAt       time.Time         `json:"update_at"`
	Total          int64             `json:"total"`
	Account1Avatar string            `json:"account1_avatar"`
	Account1Name   string            `json:"account1_name"`
	Account2Avatar string            `json:"account2_avatar"`
	Account2Name   string            `json:"account2_name"`
}

type GetFileByRelationIDIsNUllRow

type GetFileByRelationIDIsNUllRow struct {
	ID  int64  `json:"id"`
	Key string `json:"key"`
}

type GetFriendPinSettingsOrderByPinTimeRow

type GetFriendPinSettingsOrderByPinTimeRow struct {
	RelationID    int64     `json:"relation_id"`
	NickName      string    `json:"nick_name"`
	PinTime       time.Time `json:"pin_time"`
	AccountID     int64     `json:"account_id"`
	AccountName   string    `json:"account_name"`
	AccountAvatar string    `json:"account_avatar"`
}

type GetFriendRelationByIDRow

type GetFriendRelationByIDRow struct {
	Account1ID interface{}  `json:"account1_id"`
	Account2ID interface{}  `json:"account2_id"`
	CreateAt   sql.NullTime `json:"create_at"`
}

type GetFriendSettingsByNameParams

type GetFriendSettingsByNameParams struct {
	AccountID int64  `json:"account_id"`
	Limit     int32  `json:"limit"`
	Offset    int32  `json:"offset"`
	Name      string `json:"name"`
}

type GetFriendSettingsByNameRow

type GetFriendSettingsByNameRow struct {
	RelationID    int64     `json:"relation_id"`
	NickName      string    `json:"nick_name"`
	IsNotDisturb  bool      `json:"is_not_disturb"`
	IsPin         bool      `json:"is_pin"`
	PinTime       time.Time `json:"pin_time"`
	IsShow        bool      `json:"is_show"`
	LastShow      time.Time `json:"last_show"`
	IsSelf        bool      `json:"is_self"`
	AccountID     int64     `json:"account_id"`
	AccountName   string    `json:"account_name"`
	AccountAvatar string    `json:"account_avatar"`
	Total         int64     `json:"total"`
}

type GetFriendSettingsOrderByNameRow

type GetFriendSettingsOrderByNameRow struct {
	RelationID    int64     `json:"relation_id"`
	NickName      string    `json:"nick_name"`
	IsNotDisturb  bool      `json:"is_not_disturb"`
	IsPin         bool      `json:"is_pin"`
	PinTime       time.Time `json:"pin_time"`
	IsShow        bool      `json:"is_show"`
	LastShow      time.Time `json:"last_show"`
	IsSelf        bool      `json:"is_self"`
	AccountID     int64     `json:"account_id"`
	AccountName   string    `json:"account_name"`
	AccountAvatar string    `json:"account_avatar"`
}

type GetFriendShowSettingsOrderByShowTimeRow

type GetFriendShowSettingsOrderByShowTimeRow struct {
	RelationID    int64     `json:"relation_id"`
	NickName      string    `json:"nick_name"`
	IsNotDisturb  bool      `json:"is_not_disturb"`
	IsPin         bool      `json:"is_pin"`
	PinTime       time.Time `json:"pin_time"`
	IsShow        bool      `json:"is_show"`
	LastShow      time.Time `json:"last_show"`
	IsSelf        bool      `json:"is_self"`
	AccountID     int64     `json:"account_id"`
	AccountName   string    `json:"account_name"`
	AccountAvatar string    `json:"account_avatar"`
}

type GetGroupListRow

type GetGroupListRow struct {
	RelationID   int64       `json:"relation_id"`
	NickName     string      `json:"nick_name"`
	IsNotDisturb bool        `json:"is_not_disturb"`
	IsPin        bool        `json:"is_pin"`
	PinTime      time.Time   `json:"pin_time"`
	IsShow       bool        `json:"is_show"`
	LastShow     time.Time   `json:"last_show"`
	IsSelf       bool        `json:"is_self"`
	RelationID_2 int64       `json:"relation_id_2"`
	GroupName    interface{} `json:"group_name"`
	GroupAvatar  interface{} `json:"group_avatar"`
	Description  interface{} `json:"description"`
	Total        int64       `json:"total"`
}

type GetGroupMembersByIDRow

type GetGroupMembersByIDRow struct {
	ID       int64          `json:"id"`
	Name     string         `json:"name"`
	Avatar   string         `json:"avatar"`
	NickName sql.NullString `json:"nick_name"`
	IsLeader sql.NullBool   `json:"is_leader"`
}

type GetGroupNotifyByIDRow

type GetGroupNotifyByIDRow struct {
	ID         int64         `json:"id"`
	RelationID sql.NullInt64 `json:"relation_id"`
	MsgContent string        `json:"msg_content"`
	MsgExpand  pgtype.JSON   `json:"msg_expand"`
	AccountID  sql.NullInt64 `json:"account_id"`
	CreateAt   time.Time     `json:"create_at"`
	ReadIds    []int64       `json:"read_ids"`
}

type GetGroupPinSettingsOrderByPinTimeRow

type GetGroupPinSettingsOrderByPinTimeRow struct {
	RelationID int64          `json:"relation_id"`
	NickName   string         `json:"nick_name"`
	PinTime    time.Time      `json:"pin_time"`
	ID         int64          `json:"id"`
	GroupType  sql.NullString `json:"group_type"`
}

type GetGroupRelationByIDRow

type GetGroupRelationByIDRow struct {
	ID           int64        `json:"id"`
	RelationType Relationtype `json:"relation_type"`
	Name         string       `json:"name"`
	Description  string       `json:"description"`
	Avatar       string       `json:"avatar"`
	CreateAt     sql.NullTime `json:"create_at"`
}

type GetGroupSettingsByNameParams

type GetGroupSettingsByNameParams struct {
	AccountID int64  `json:"account_id"`
	Limit     int32  `json:"limit"`
	Offset    int32  `json:"offset"`
	Name      string `json:"name"`
}

type GetGroupSettingsByNameRow

type GetGroupSettingsByNameRow struct {
	RelationID   int64       `json:"relation_id"`
	NickName     string      `json:"nick_name"`
	IsNotDisturb bool        `json:"is_not_disturb"`
	IsPin        bool        `json:"is_pin"`
	PinTime      time.Time   `json:"pin_time"`
	IsShow       bool        `json:"is_show"`
	LastShow     time.Time   `json:"last_show"`
	IsSelf       bool        `json:"is_self"`
	RelationID_2 int64       `json:"relation_id_2"`
	GroupName    interface{} `json:"group_name"`
	GroupAvatar  interface{} `json:"group_avatar"`
	Description  interface{} `json:"description"`
	Total        int64       `json:"total"`
}

type GetGroupShowSettingsOrderByShowTimeRow

type GetGroupShowSettingsOrderByShowTimeRow struct {
	RelationID   int64          `json:"relation_id"`
	NickName     string         `json:"nick_name"`
	IsNotDisturb bool           `json:"is_not_disturb"`
	IsPin        bool           `json:"is_pin"`
	PinTime      time.Time      `json:"pin_time"`
	IsShow       bool           `json:"is_show"`
	LastShow     time.Time      `json:"last_show"`
	IsSelf       bool           `json:"is_self"`
	ID           int64          `json:"id"`
	GroupType    sql.NullString `json:"group_type"`
}

type GetMsgByIDRow

type GetMsgByIDRow struct {
	ID         int64         `json:"id"`
	NotifyType Msgnotifytype `json:"notify_type"`
	MsgType    string        `json:"msg_type"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	RlyMsgID   sql.NullInt64 `json:"rly_msg_id"`
	RelationID int64         `json:"relation_id"`
	CreateAt   time.Time     `json:"create_at"`
	IsRevoke   bool          `json:"is_revoke"`
	IsTop      bool          `json:"is_top"`
	IsPin      bool          `json:"is_pin"`
	PinTime    time.Time     `json:"pin_time"`
	ReadIds    []int64       `json:"read_ids"`
}

type GetMsgsByContentAndRelationParams

type GetMsgsByContentAndRelationParams struct {
	RelationID int64  `json:"relation_id"`
	AccountID  int64  `json:"account_id"`
	Limit      int32  `json:"limit"`
	Offset     int32  `json:"offset"`
	Content    string `json:"content"`
}

type GetMsgsByContentAndRelationRow

type GetMsgsByContentAndRelationRow struct {
	ID         int64         `json:"id"`
	NotifyType Msgnotifytype `json:"notify_type"`
	MsgType    string        `json:"msg_type"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	RelationID int64         `json:"relation_id"`
	CreateAt   time.Time     `json:"create_at"`
	Total      int64         `json:"total"`
}

type GetMsgsByContentParams

type GetMsgsByContentParams struct {
	AccountID int64  `json:"account_id"`
	Limit     int32  `json:"limit"`
	Offset    int32  `json:"offset"`
	Content   string `json:"content"`
}

type GetMsgsByContentRow

type GetMsgsByContentRow struct {
	ID         int64         `json:"id"`
	NotifyType Msgnotifytype `json:"notify_type"`
	MsgType    string        `json:"msg_type"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	RelationID int64         `json:"relation_id"`
	CreateAt   time.Time     `json:"create_at"`
	Total      int64         `json:"total"`
}

type GetMsgsByRelationIDAndTimeParams

type GetMsgsByRelationIDAndTimeParams struct {
	RelationID int64     `json:"relation_id"`
	CreateAt   time.Time `json:"create_at"`
	Limit      int32     `json:"limit"`
	Offset     int32     `json:"offset"`
}

type GetMsgsByRelationIDAndTimeRow

type GetMsgsByRelationIDAndTimeRow struct {
	ID         int64         `json:"id"`
	NotifyType Msgnotifytype `json:"notify_type"`
	MsgType    string        `json:"msg_type"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	RlyMsgID   sql.NullInt64 `json:"rly_msg_id"`
	RelationID int64         `json:"relation_id"`
	CreateAt   time.Time     `json:"create_at"`
	IsRevoke   bool          `json:"is_revoke"`
	IsTop      bool          `json:"is_top"`
	IsPin      bool          `json:"is_pin"`
	PinTime    time.Time     `json:"pin_time"`
	ReadIds    []int64       `json:"read_ids"`
	Total      int64         `json:"total"`
	ReplyCount int64         `json:"reply_count"`
}

type GetPinMsgsByRelationIDParams

type GetPinMsgsByRelationIDParams struct {
	RelationID int64 `json:"relation_id"`
	Limit      int32 `json:"limit"`
	Offset     int32 `json:"offset"`
}

type GetPinMsgsByRelationIDRow

type GetPinMsgsByRelationIDRow struct {
	ID         int64         `json:"id"`
	NotifyType Msgnotifytype `json:"notify_type"`
	MsgType    string        `json:"msg_type"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	RelationID int64         `json:"relation_id"`
	CreateAt   time.Time     `json:"create_at"`
	IsRevoke   bool          `json:"is_revoke"`
	IsTop      bool          `json:"is_top"`
	IsPin      bool          `json:"is_pin"`
	PinTime    time.Time     `json:"pin_time"`
	ReadIds    []int64       `json:"read_ids"`
	ReplyCount int64         `json:"reply_count"`
	Total      int64         `json:"total"`
}

type GetRlyMsgsInfoByMsgIDParams

type GetRlyMsgsInfoByMsgIDParams struct {
	RelationID int64 `json:"relation_id"`
	Limit      int32 `json:"limit"`
	Offset     int32 `json:"offset"`
	RlyMsgID   int64 `json:"rly_msg_id"`
}

type GetRlyMsgsInfoByMsgIDRow

type GetRlyMsgsInfoByMsgIDRow struct {
	ID         int64         `json:"id"`
	NotifyType Msgnotifytype `json:"notify_type"`
	MsgType    string        `json:"msg_type"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	RelationID int64         `json:"relation_id"`
	CreateAt   time.Time     `json:"create_at"`
	IsRevoke   bool          `json:"is_revoke"`
	IsTop      bool          `json:"is_top"`
	IsPin      bool          `json:"is_pin"`
	PinTime    time.Time     `json:"pin_time"`
	ReadIds    []int64       `json:"read_ids"`
	ReplyCount int64         `json:"reply_count"`
	Total      int64         `json:"total"`
}

type GetSettingByIDParams

type GetSettingByIDParams struct {
	AccountID  int64 `json:"account_id"`
	RelationID int64 `json:"relation_id"`
}

type GetTopMsgByRelationIDRow

type GetTopMsgByRelationIDRow struct {
	ID         int64         `json:"id"`
	NotifyType Msgnotifytype `json:"notify_type"`
	MsgType    string        `json:"msg_type"`
	MsgContent string        `json:"msg_content"`
	MsgExtend  pgtype.JSON   `json:"msg_extend"`
	FileID     sql.NullInt64 `json:"file_id"`
	AccountID  sql.NullInt64 `json:"account_id"`
	RelationID int64         `json:"relation_id"`
	CreateAt   time.Time     `json:"create_at"`
	IsRevoke   bool          `json:"is_revoke"`
	IsTop      bool          `json:"is_top"`
	IsPin      bool          `json:"is_pin"`
	PinTime    time.Time     `json:"pin_time"`
	ReadIds    []int64       `json:"read_ids"`
	ReplyCount int64         `json:"reply_count"`
	Total      int64         `json:"total"`
}

type GroupNotify

type GroupNotify struct {
	ID            int64         `json:"id"`
	RelationID    sql.NullInt64 `json:"relation_id"`
	MsgContent    string        `json:"msg_content"`
	MsgExpand     pgtype.JSON   `json:"msg_expand"`
	AccountID     sql.NullInt64 `json:"account_id"`
	CreateAt      time.Time     `json:"create_at"`
	ReadIds       []int64       `json:"read_ids"`
	MsgContentTsv interface{}   `json:"msg_content_tsv"`
}

type HasReadMsgParams

type HasReadMsgParams struct {
	MsgID     int64       `json:"msg_id"`
	AccountID interface{} `json:"account_id"`
}

type Message

type Message struct {
	ID            int64         `json:"id"`
	NotifyType    Msgnotifytype `json:"notify_type"`
	MsgType       string        `json:"msg_type"`
	MsgContent    string        `json:"msg_content"`
	MsgExtend     pgtype.JSON   `json:"msg_extend"`
	FileID        sql.NullInt64 `json:"file_id"`
	AccountID     sql.NullInt64 `json:"account_id"`
	RlyMsgID      sql.NullInt64 `json:"rly_msg_id"`
	RelationID    int64         `json:"relation_id"`
	CreateAt      time.Time     `json:"create_at"`
	IsRevoke      bool          `json:"is_revoke"`
	IsTop         bool          `json:"is_top"`
	IsPin         bool          `json:"is_pin"`
	PinTime       time.Time     `json:"pin_time"`
	ReadIds       []int64       `json:"read_ids"`
	MsgContentTsv interface{}   `json:"msg_content_tsv"`
}

type Msgnotifytype

type Msgnotifytype string
const (
	MsgnotifytypeSystem Msgnotifytype = "system"
	MsgnotifytypeCommon Msgnotifytype = "common"
)

func (*Msgnotifytype) Scan

func (e *Msgnotifytype) Scan(src interface{}) error

type Querier

type Querier interface {
	CountAccountByUserID(ctx context.Context, userID int64) (int32, error)
	CreateAccount(ctx context.Context, arg *CreateAccountParams) error
	CreateApplication(ctx context.Context, arg *CreateApplicationParams) error
	CreateFile(ctx context.Context, arg *CreateFileParams) (*File, error)
	CreateFriendRelation(ctx context.Context, arg *CreateFriendRelationParams) (int64, error)
	CreateGroupNotify(ctx context.Context, arg *CreateGroupNotifyParams) (*CreateGroupNotifyRow, error)
	CreateGroupRelation(ctx context.Context, arg *CreateGroupRelationParams) (int64, error)
	CreateManySetting(ctx context.Context, arg []*CreateManySettingParams) (int64, error)
	CreateMsg(ctx context.Context, arg *CreateMsgParams) (*CreateMsgRow, error)
	CreateSetting(ctx context.Context, arg *CreateSettingParams) error
	CreateUser(ctx context.Context, arg *CreateUserParams) (*User, error)
	DeleteAccount(ctx context.Context, id int64) error
	DeleteAccountsByUserID(ctx context.Context, userID int64) ([]int64, error)
	DeleteApplication(ctx context.Context, arg *DeleteApplicationParams) error
	DeleteFileByID(ctx context.Context, id int64) error
	DeleteFriendRelationsByAccountID(ctx context.Context, accountID int64) ([]int64, error)
	DeleteGroup(ctx context.Context, relationID int64) error
	DeleteGroupNotify(ctx context.Context, id int64) error
	DeleteRelation(ctx context.Context, id int64) error
	DeleteSetting(ctx context.Context, arg *DeleteSettingParams) error
	DeleteSettingsByAccountID(ctx context.Context, accountID int64) ([]int64, error)
	DeleteUser(ctx context.Context, id int64) error
	ExistEmail(ctx context.Context, email string) (bool, error)
	ExistsAccountByID(ctx context.Context, id int64) (bool, error)
	ExistsAccountByNameAndUserID(ctx context.Context, arg *ExistsAccountByNameAndUserIDParams) (bool, error)
	ExistsApplicationByID(ctx context.Context, arg *ExistsApplicationByIDParams) (bool, error)
	ExistsApplicationByIDWithLock(ctx context.Context, arg *ExistsApplicationByIDWithLockParams) (bool, error)
	ExistsFriendRelation(ctx context.Context, arg *ExistsFriendRelationParams) (bool, error)
	ExistsFriendSetting(ctx context.Context, arg *ExistsFriendSettingParams) (bool, error)
	ExistsGroupLeaderByAccountIDWithLock(ctx context.Context, accountID int64) (bool, error)
	ExistsIsLeader(ctx context.Context, arg *ExistsIsLeaderParams) (bool, error)
	ExistsSetting(ctx context.Context, arg *ExistsSettingParams) (bool, error)
	ExistsUserByID(ctx context.Context, id int64) (bool, error)
	FeedMsgsByAccountIDAndTime(ctx context.Context, arg *FeedMsgsByAccountIDAndTimeParams) ([]*FeedMsgsByAccountIDAndTimeRow, error)
	GetAccountByID(ctx context.Context, arg *GetAccountByIDParams) (*GetAccountByIDRow, error)
	GetAccountIDsByRelationID(ctx context.Context, relationID int64) ([]int64, error)
	GetAccountIDsByUserID(ctx context.Context, userID int64) ([]int64, error)
	GetAccountsByName(ctx context.Context, arg *GetAccountsByNameParams) ([]*GetAccountsByNameRow, error)
	GetAccountsByUserID(ctx context.Context, userID int64) ([]*GetAccountsByUserIDRow, error)
	GetAllEmails(ctx context.Context) ([]string, error)
	GetAllGroupRelation(ctx context.Context) ([]int64, error)
	GetAllRelationIDs(ctx context.Context) ([]int64, error)
	GetAllRelationOnRelation(ctx context.Context) ([]int64, error)
	GetAllRelationsOnFile(ctx context.Context) ([]sql.NullInt64, error)
	GetApplicationByID(ctx context.Context, arg *GetApplicationByIDParams) (*Application, error)
	GetApplications(ctx context.Context, arg *GetApplicationsParams) ([]*GetApplicationsRow, error)
	GetAvatar(ctx context.Context, accountID sql.NullInt64) (bool, error)
	GetFileByRelationID(ctx context.Context, relationID sql.NullInt64) ([]*File, error)
	GetFileByRelationIDIsNUll(ctx context.Context) ([]*GetFileByRelationIDIsNUllRow, error)
	GetFileDetailsByID(ctx context.Context, id int64) (*File, error)
	GetFileKeyByID(ctx context.Context, id int64) (string, error)
	GetFriendPinSettingsOrderByPinTime(ctx context.Context, accountID int64) ([]*GetFriendPinSettingsOrderByPinTimeRow, error)
	GetFriendRelationByID(ctx context.Context, id int64) (*GetFriendRelationByIDRow, error)
	GetFriendSettingsByName(ctx context.Context, arg *GetFriendSettingsByNameParams) ([]*GetFriendSettingsByNameRow, error)
	GetFriendSettingsOrderByName(ctx context.Context, accountID int64) ([]*GetFriendSettingsOrderByNameRow, error)
	GetFriendShowSettingsOrderByShowTime(ctx context.Context, accountID int64) ([]*GetFriendShowSettingsOrderByShowTimeRow, error)
	GetGroupAvatar(ctx context.Context, relationID sql.NullInt64) (*File, error)
	GetGroupList(ctx context.Context, accountID int64) ([]*GetGroupListRow, error)
	GetGroupMembers(ctx context.Context, relationID int64) ([]int64, error)
	GetGroupMembersByID(ctx context.Context, relationID int64) ([]*GetGroupMembersByIDRow, error)
	GetGroupNotifyByID(ctx context.Context, relationID sql.NullInt64) ([]*GetGroupNotifyByIDRow, error)
	GetGroupPinSettingsOrderByPinTime(ctx context.Context, accountID int64) ([]*GetGroupPinSettingsOrderByPinTimeRow, error)
	GetGroupRelationByID(ctx context.Context, id int64) (*GetGroupRelationByIDRow, error)
	GetGroupSettingsByName(ctx context.Context, arg *GetGroupSettingsByNameParams) ([]*GetGroupSettingsByNameRow, error)
	GetGroupShowSettingsOrderByShowTime(ctx context.Context, accountID int64) ([]*GetGroupShowSettingsOrderByShowTimeRow, error)
	GetMsgByID(ctx context.Context, id int64) (*GetMsgByIDRow, error)
	GetMsgsByContent(ctx context.Context, arg *GetMsgsByContentParams) ([]*GetMsgsByContentRow, error)
	GetMsgsByContentAndRelation(ctx context.Context, arg *GetMsgsByContentAndRelationParams) ([]*GetMsgsByContentAndRelationRow, error)
	GetMsgsByRelationIDAndTime(ctx context.Context, arg *GetMsgsByRelationIDAndTimeParams) ([]*GetMsgsByRelationIDAndTimeRow, error)
	GetPinMsgsByRelationID(ctx context.Context, arg *GetPinMsgsByRelationIDParams) ([]*GetPinMsgsByRelationIDRow, error)
	GetRlyMsgsInfoByMsgID(ctx context.Context, arg *GetRlyMsgsInfoByMsgIDParams) ([]*GetRlyMsgsInfoByMsgIDRow, error)
	GetSettingByID(ctx context.Context, arg *GetSettingByIDParams) (*Setting, error)
	GetTopMsgByRelationID(ctx context.Context, relationID int64) (*GetTopMsgByRelationIDRow, error)
	GetUserByEmail(ctx context.Context, email string) (*User, error)
	GetUserByID(ctx context.Context, id int64) (*User, error)
	HasReadMsg(ctx context.Context, arg *HasReadMsgParams) (bool, error)
	TransferIsSelfFalse(ctx context.Context, arg *TransferIsSelfFalseParams) error
	TransferIsSelfTrue(ctx context.Context, arg *TransferIsSelfTrueParams) error
	UpdateAccount(ctx context.Context, arg *UpdateAccountParams) error
	UpdateAccountAvatar(ctx context.Context, arg *UpdateAccountAvatarParams) error
	UpdateAccountFile(ctx context.Context, arg *UpdateAccountFileParams) error
	UpdateApplication(ctx context.Context, arg *UpdateApplicationParams) error
	UpdateGroupAvatar(ctx context.Context, arg *UpdateGroupAvatarParams) error
	UpdateGroupNotify(ctx context.Context, arg *UpdateGroupNotifyParams) (*UpdateGroupNotifyRow, error)
	UpdateGroupRelation(ctx context.Context, arg *UpdateGroupRelationParams) error
	UpdateMsgPin(ctx context.Context, arg *UpdateMsgPinParams) error
	UpdateMsgReads(ctx context.Context, arg *UpdateMsgReadsParams) ([]*UpdateMsgReadsRow, error)
	UpdateMsgRevoke(ctx context.Context, arg *UpdateMsgRevokeParams) error
	UpdateMsgTopFalseByMsgID(ctx context.Context, id int64) error
	UpdateMsgTopFalseByRelationID(ctx context.Context, relationID int64) error
	UpdateMsgTopTrueByMsgID(ctx context.Context, id int64) error
	UpdateSettingDisturb(ctx context.Context, arg *UpdateSettingDisturbParams) error
	UpdateSettingLeader(ctx context.Context, arg *UpdateSettingLeaderParams) error
	UpdateSettingNickName(ctx context.Context, arg *UpdateSettingNickNameParams) error
	UpdateSettingPin(ctx context.Context, arg *UpdateSettingPinParams) error
	UpdateSettingShow(ctx context.Context, arg *UpdateSettingShowParams) error
	UpdateUser(ctx context.Context, arg *UpdateUserParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CountAccountByUserID

func (q *Queries) CountAccountByUserID(ctx context.Context, userID int64) (int32, error)

func (*Queries) CreateAccount

func (q *Queries) CreateAccount(ctx context.Context, arg *CreateAccountParams) error

func (*Queries) CreateApplication

func (q *Queries) CreateApplication(ctx context.Context, arg *CreateApplicationParams) error

func (*Queries) CreateFile

func (q *Queries) CreateFile(ctx context.Context, arg *CreateFileParams) (*File, error)

func (*Queries) CreateFriendRelation

func (q *Queries) CreateFriendRelation(ctx context.Context, arg *CreateFriendRelationParams) (int64, error)

func (*Queries) CreateGroupNotify

func (q *Queries) CreateGroupNotify(ctx context.Context, arg *CreateGroupNotifyParams) (*CreateGroupNotifyRow, error)

func (*Queries) CreateGroupRelation

func (q *Queries) CreateGroupRelation(ctx context.Context, arg *CreateGroupRelationParams) (int64, error)

func (*Queries) CreateManySetting

func (q *Queries) CreateManySetting(ctx context.Context, arg []*CreateManySettingParams) (int64, error)

func (*Queries) CreateMsg

func (q *Queries) CreateMsg(ctx context.Context, arg *CreateMsgParams) (*CreateMsgRow, error)

func (*Queries) CreateSetting

func (q *Queries) CreateSetting(ctx context.Context, arg *CreateSettingParams) error

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg *CreateUserParams) (*User, error)

func (*Queries) DeleteAccount

func (q *Queries) DeleteAccount(ctx context.Context, id int64) error

func (*Queries) DeleteAccountsByUserID

func (q *Queries) DeleteAccountsByUserID(ctx context.Context, userID int64) ([]int64, error)

func (*Queries) DeleteApplication

func (q *Queries) DeleteApplication(ctx context.Context, arg *DeleteApplicationParams) error

func (*Queries) DeleteFileByID

func (q *Queries) DeleteFileByID(ctx context.Context, id int64) error

func (*Queries) DeleteFriendRelationsByAccountID

func (q *Queries) DeleteFriendRelationsByAccountID(ctx context.Context, accountID int64) ([]int64, error)

func (*Queries) DeleteGroup

func (q *Queries) DeleteGroup(ctx context.Context, relationID int64) error

func (*Queries) DeleteGroupNotify

func (q *Queries) DeleteGroupNotify(ctx context.Context, id int64) error

func (*Queries) DeleteRelation

func (q *Queries) DeleteRelation(ctx context.Context, id int64) error

func (*Queries) DeleteSetting

func (q *Queries) DeleteSetting(ctx context.Context, arg *DeleteSettingParams) error

func (*Queries) DeleteSettingsByAccountID

func (q *Queries) DeleteSettingsByAccountID(ctx context.Context, accountID int64) ([]int64, error)

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, id int64) error

func (*Queries) ExistEmail

func (q *Queries) ExistEmail(ctx context.Context, email string) (bool, error)

func (*Queries) ExistsAccountByID

func (q *Queries) ExistsAccountByID(ctx context.Context, id int64) (bool, error)

func (*Queries) ExistsAccountByNameAndUserID

func (q *Queries) ExistsAccountByNameAndUserID(ctx context.Context, arg *ExistsAccountByNameAndUserIDParams) (bool, error)

func (*Queries) ExistsApplicationByID

func (q *Queries) ExistsApplicationByID(ctx context.Context, arg *ExistsApplicationByIDParams) (bool, error)

func (*Queries) ExistsApplicationByIDWithLock

func (q *Queries) ExistsApplicationByIDWithLock(ctx context.Context, arg *ExistsApplicationByIDWithLockParams) (bool, error)

func (*Queries) ExistsFriendRelation

func (q *Queries) ExistsFriendRelation(ctx context.Context, arg *ExistsFriendRelationParams) (bool, error)

func (*Queries) ExistsFriendSetting

func (q *Queries) ExistsFriendSetting(ctx context.Context, arg *ExistsFriendSettingParams) (bool, error)

func (*Queries) ExistsGroupLeaderByAccountIDWithLock

func (q *Queries) ExistsGroupLeaderByAccountIDWithLock(ctx context.Context, accountID int64) (bool, error)

func (*Queries) ExistsIsLeader

func (q *Queries) ExistsIsLeader(ctx context.Context, arg *ExistsIsLeaderParams) (bool, error)

func (*Queries) ExistsSetting

func (q *Queries) ExistsSetting(ctx context.Context, arg *ExistsSettingParams) (bool, error)

func (*Queries) ExistsUserByID

func (q *Queries) ExistsUserByID(ctx context.Context, id int64) (bool, error)

func (*Queries) FeedMsgsByAccountIDAndTime

func (q *Queries) FeedMsgsByAccountIDAndTime(ctx context.Context, arg *FeedMsgsByAccountIDAndTimeParams) ([]*FeedMsgsByAccountIDAndTimeRow, error)

func (*Queries) GetAccountByID

func (q *Queries) GetAccountByID(ctx context.Context, arg *GetAccountByIDParams) (*GetAccountByIDRow, error)

func (*Queries) GetAccountIDsByRelationID

func (q *Queries) GetAccountIDsByRelationID(ctx context.Context, relationID int64) ([]int64, error)

func (*Queries) GetAccountIDsByUserID

func (q *Queries) GetAccountIDsByUserID(ctx context.Context, userID int64) ([]int64, error)

func (*Queries) GetAccountsByName

func (q *Queries) GetAccountsByName(ctx context.Context, arg *GetAccountsByNameParams) ([]*GetAccountsByNameRow, error)

func (*Queries) GetAccountsByUserID

func (q *Queries) GetAccountsByUserID(ctx context.Context, userID int64) ([]*GetAccountsByUserIDRow, error)

func (*Queries) GetAllEmails

func (q *Queries) GetAllEmails(ctx context.Context) ([]string, error)

func (*Queries) GetAllGroupRelation

func (q *Queries) GetAllGroupRelation(ctx context.Context) ([]int64, error)

func (*Queries) GetAllRelationIDs

func (q *Queries) GetAllRelationIDs(ctx context.Context) ([]int64, error)

func (*Queries) GetAllRelationOnRelation

func (q *Queries) GetAllRelationOnRelation(ctx context.Context) ([]int64, error)

func (*Queries) GetAllRelationsOnFile

func (q *Queries) GetAllRelationsOnFile(ctx context.Context) ([]sql.NullInt64, error)

func (*Queries) GetApplicationByID

func (q *Queries) GetApplicationByID(ctx context.Context, arg *GetApplicationByIDParams) (*Application, error)

func (*Queries) GetApplications

func (q *Queries) GetApplications(ctx context.Context, arg *GetApplicationsParams) ([]*GetApplicationsRow, error)

func (*Queries) GetAvatar

func (q *Queries) GetAvatar(ctx context.Context, accountID sql.NullInt64) (bool, error)

func (*Queries) GetFileByRelationID

func (q *Queries) GetFileByRelationID(ctx context.Context, relationID sql.NullInt64) ([]*File, error)

func (*Queries) GetFileByRelationIDIsNUll

func (q *Queries) GetFileByRelationIDIsNUll(ctx context.Context) ([]*GetFileByRelationIDIsNUllRow, error)

func (*Queries) GetFileDetailsByID

func (q *Queries) GetFileDetailsByID(ctx context.Context, id int64) (*File, error)

func (*Queries) GetFileKeyByID

func (q *Queries) GetFileKeyByID(ctx context.Context, id int64) (string, error)

func (*Queries) GetFriendPinSettingsOrderByPinTime

func (q *Queries) GetFriendPinSettingsOrderByPinTime(ctx context.Context, accountID int64) ([]*GetFriendPinSettingsOrderByPinTimeRow, error)

func (*Queries) GetFriendRelationByID

func (q *Queries) GetFriendRelationByID(ctx context.Context, id int64) (*GetFriendRelationByIDRow, error)

func (*Queries) GetFriendSettingsByName

func (q *Queries) GetFriendSettingsByName(ctx context.Context, arg *GetFriendSettingsByNameParams) ([]*GetFriendSettingsByNameRow, error)

func (*Queries) GetFriendSettingsOrderByName

func (q *Queries) GetFriendSettingsOrderByName(ctx context.Context, accountID int64) ([]*GetFriendSettingsOrderByNameRow, error)

func (*Queries) GetFriendShowSettingsOrderByShowTime

func (q *Queries) GetFriendShowSettingsOrderByShowTime(ctx context.Context, accountID int64) ([]*GetFriendShowSettingsOrderByShowTimeRow, error)

func (*Queries) GetGroupAvatar

func (q *Queries) GetGroupAvatar(ctx context.Context, relationID sql.NullInt64) (*File, error)

func (*Queries) GetGroupList

func (q *Queries) GetGroupList(ctx context.Context, accountID int64) ([]*GetGroupListRow, error)

func (*Queries) GetGroupMembers

func (q *Queries) GetGroupMembers(ctx context.Context, relationID int64) ([]int64, error)

func (*Queries) GetGroupMembersByID

func (q *Queries) GetGroupMembersByID(ctx context.Context, relationID int64) ([]*GetGroupMembersByIDRow, error)

func (*Queries) GetGroupNotifyByID

func (q *Queries) GetGroupNotifyByID(ctx context.Context, relationID sql.NullInt64) ([]*GetGroupNotifyByIDRow, error)

func (*Queries) GetGroupPinSettingsOrderByPinTime

func (q *Queries) GetGroupPinSettingsOrderByPinTime(ctx context.Context, accountID int64) ([]*GetGroupPinSettingsOrderByPinTimeRow, error)

func (*Queries) GetGroupRelationByID

func (q *Queries) GetGroupRelationByID(ctx context.Context, id int64) (*GetGroupRelationByIDRow, error)

func (*Queries) GetGroupSettingsByName

func (q *Queries) GetGroupSettingsByName(ctx context.Context, arg *GetGroupSettingsByNameParams) ([]*GetGroupSettingsByNameRow, error)

func (*Queries) GetGroupShowSettingsOrderByShowTime

func (q *Queries) GetGroupShowSettingsOrderByShowTime(ctx context.Context, accountID int64) ([]*GetGroupShowSettingsOrderByShowTimeRow, error)

func (*Queries) GetMsgByID

func (q *Queries) GetMsgByID(ctx context.Context, id int64) (*GetMsgByIDRow, error)

func (*Queries) GetMsgsByContent

func (q *Queries) GetMsgsByContent(ctx context.Context, arg *GetMsgsByContentParams) ([]*GetMsgsByContentRow, error)

func (*Queries) GetMsgsByContentAndRelation

func (q *Queries) GetMsgsByContentAndRelation(ctx context.Context, arg *GetMsgsByContentAndRelationParams) ([]*GetMsgsByContentAndRelationRow, error)

func (*Queries) GetMsgsByRelationIDAndTime

func (q *Queries) GetMsgsByRelationIDAndTime(ctx context.Context, arg *GetMsgsByRelationIDAndTimeParams) ([]*GetMsgsByRelationIDAndTimeRow, error)

func (*Queries) GetPinMsgsByRelationID

func (q *Queries) GetPinMsgsByRelationID(ctx context.Context, arg *GetPinMsgsByRelationIDParams) ([]*GetPinMsgsByRelationIDRow, error)

func (*Queries) GetRlyMsgsInfoByMsgID

func (q *Queries) GetRlyMsgsInfoByMsgID(ctx context.Context, arg *GetRlyMsgsInfoByMsgIDParams) ([]*GetRlyMsgsInfoByMsgIDRow, error)

func (*Queries) GetSettingByID

func (q *Queries) GetSettingByID(ctx context.Context, arg *GetSettingByIDParams) (*Setting, error)

func (*Queries) GetTopMsgByRelationID

func (q *Queries) GetTopMsgByRelationID(ctx context.Context, relationID int64) (*GetTopMsgByRelationIDRow, error)

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email string) (*User, error)

func (*Queries) GetUserByID

func (q *Queries) GetUserByID(ctx context.Context, id int64) (*User, error)

func (*Queries) HasReadMsg

func (q *Queries) HasReadMsg(ctx context.Context, arg *HasReadMsgParams) (bool, error)

func (*Queries) TransferIsSelfFalse

func (q *Queries) TransferIsSelfFalse(ctx context.Context, arg *TransferIsSelfFalseParams) error

func (*Queries) TransferIsSelfTrue

func (q *Queries) TransferIsSelfTrue(ctx context.Context, arg *TransferIsSelfTrueParams) error

func (*Queries) UpdateAccount

func (q *Queries) UpdateAccount(ctx context.Context, arg *UpdateAccountParams) error

func (*Queries) UpdateAccountAvatar

func (q *Queries) UpdateAccountAvatar(ctx context.Context, arg *UpdateAccountAvatarParams) error

func (*Queries) UpdateAccountFile

func (q *Queries) UpdateAccountFile(ctx context.Context, arg *UpdateAccountFileParams) error

func (*Queries) UpdateApplication

func (q *Queries) UpdateApplication(ctx context.Context, arg *UpdateApplicationParams) error

func (*Queries) UpdateGroupAvatar

func (q *Queries) UpdateGroupAvatar(ctx context.Context, arg *UpdateGroupAvatarParams) error

func (*Queries) UpdateGroupNotify

func (q *Queries) UpdateGroupNotify(ctx context.Context, arg *UpdateGroupNotifyParams) (*UpdateGroupNotifyRow, error)

func (*Queries) UpdateGroupRelation

func (q *Queries) UpdateGroupRelation(ctx context.Context, arg *UpdateGroupRelationParams) error

func (*Queries) UpdateMsgPin

func (q *Queries) UpdateMsgPin(ctx context.Context, arg *UpdateMsgPinParams) error

func (*Queries) UpdateMsgReads

func (q *Queries) UpdateMsgReads(ctx context.Context, arg *UpdateMsgReadsParams) ([]*UpdateMsgReadsRow, error)

func (*Queries) UpdateMsgRevoke

func (q *Queries) UpdateMsgRevoke(ctx context.Context, arg *UpdateMsgRevokeParams) error

func (*Queries) UpdateMsgTopFalseByMsgID

func (q *Queries) UpdateMsgTopFalseByMsgID(ctx context.Context, id int64) error

func (*Queries) UpdateMsgTopFalseByRelationID

func (q *Queries) UpdateMsgTopFalseByRelationID(ctx context.Context, relationID int64) error

func (*Queries) UpdateMsgTopTrueByMsgID

func (q *Queries) UpdateMsgTopTrueByMsgID(ctx context.Context, id int64) error

func (*Queries) UpdateSettingDisturb

func (q *Queries) UpdateSettingDisturb(ctx context.Context, arg *UpdateSettingDisturbParams) error

func (*Queries) UpdateSettingLeader

func (q *Queries) UpdateSettingLeader(ctx context.Context, arg *UpdateSettingLeaderParams) error

func (*Queries) UpdateSettingNickName

func (q *Queries) UpdateSettingNickName(ctx context.Context, arg *UpdateSettingNickNameParams) error

func (*Queries) UpdateSettingPin

func (q *Queries) UpdateSettingPin(ctx context.Context, arg *UpdateSettingPinParams) error

func (*Queries) UpdateSettingShow

func (q *Queries) UpdateSettingShow(ctx context.Context, arg *UpdateSettingShowParams) error

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg *UpdateUserParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Relation

type Relation struct {
	ID           int64          `json:"id"`
	RelationType Relationtype   `json:"relation_type"`
	GroupType    sql.NullString `json:"group_type"`
	FriendType   sql.NullString `json:"friend_type"`
	CreateAt     sql.NullTime   `json:"create_at"`
}

type Relationtype

type Relationtype string
const (
	RelationtypeGroup  Relationtype = "group"
	RelationtypeFriend Relationtype = "friend"
)

func (*Relationtype) Scan

func (e *Relationtype) Scan(src interface{}) error

type Setting

type Setting struct {
	AccountID    int64     `json:"account_id"`
	RelationID   int64     `json:"relation_id"`
	NickName     string    `json:"nick_name"`
	IsNotDisturb bool      `json:"is_not_disturb"`
	IsPin        bool      `json:"is_pin"`
	PinTime      time.Time `json:"pin_time"`
	IsShow       bool      `json:"is_show"`
	LastShow     time.Time `json:"last_show"`
	IsLeader     bool      `json:"is_leader"`
	IsSelf       bool      `json:"is_self"`
}

type TransferIsSelfFalseParams

type TransferIsSelfFalseParams struct {
	RelationID int64 `json:"relation_id"`
	AccountID  int64 `json:"account_id"`
}

type TransferIsSelfTrueParams

type TransferIsSelfTrueParams struct {
	RelationID int64 `json:"relation_id"`
	AccountID  int64 `json:"account_id"`
}

type UpdateAccountAvatarParams

type UpdateAccountAvatarParams struct {
	Avatar string `json:"avatar"`
	ID     int64  `json:"id"`
}

type UpdateAccountFileParams

type UpdateAccountFileParams struct {
	Url       string        `json:"url"`
	AccountID sql.NullInt64 `json:"account_id"`
}

type UpdateAccountParams

type UpdateAccountParams struct {
	Name      string `json:"name"`
	Gender    Gender `json:"gender"`
	Signature string `json:"signature"`
	ID        int64  `json:"id"`
}

type UpdateApplicationParams

type UpdateApplicationParams struct {
	Status     Applicationstatus `json:"status"`
	RefuseMsg  string            `json:"refuse_msg"`
	Account1ID int64             `json:"account1_id"`
	Account2ID int64             `json:"account2_id"`
}

type UpdateGroupAvatarParams

type UpdateGroupAvatarParams struct {
	Url        string        `json:"url"`
	RelationID sql.NullInt64 `json:"relation_id"`
}

type UpdateGroupNotifyParams

type UpdateGroupNotifyParams struct {
	RelationID sql.NullInt64 `json:"relation_id"`
	MsgContent string        `json:"msg_content"`
	MsgExpand  pgtype.JSON   `json:"msg_expand"`
	AccountID  sql.NullInt64 `json:"account_id"`
	CreateAt   time.Time     `json:"create_at"`
	ReadIds    []int64       `json:"read_ids"`
	ID         int64         `json:"id"`
}

type UpdateGroupNotifyRow

type UpdateGroupNotifyRow struct {
	ID         int64         `json:"id"`
	RelationID sql.NullInt64 `json:"relation_id"`
	MsgContent string        `json:"msg_content"`
	MsgExpand  pgtype.JSON   `json:"msg_expand"`
	AccountID  sql.NullInt64 `json:"account_id"`
	CreateAt   time.Time     `json:"create_at"`
	ReadIds    []int64       `json:"read_ids"`
}

type UpdateGroupRelationParams

type UpdateGroupRelationParams struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Avatar      string `json:"avatar"`
	ID          int64  `json:"id"`
}

type UpdateMsgPinParams

type UpdateMsgPinParams struct {
	ID    int64 `json:"id"`
	IsPin bool  `json:"is_pin"`
}

type UpdateMsgReadsParams

type UpdateMsgReadsParams struct {
	RelationID int64   `json:"relation_id"`
	Accountid  int64   `json:"accountid"`
	Msgids     []int64 `json:"msgids"`
}

type UpdateMsgReadsRow

type UpdateMsgReadsRow struct {
	ID        int64 `json:"id"`
	AccountID int64 `json:"account_id"`
}

type UpdateMsgRevokeParams

type UpdateMsgRevokeParams struct {
	ID       int64 `json:"id"`
	IsRevoke bool  `json:"is_revoke"`
}

type UpdateSettingDisturbParams

type UpdateSettingDisturbParams struct {
	AccountID    int64 `json:"account_id"`
	RelationID   int64 `json:"relation_id"`
	IsNotDisturb bool  `json:"is_not_disturb"`
}

type UpdateSettingLeaderParams

type UpdateSettingLeaderParams struct {
	AccountID  int64 `json:"account_id"`
	RelationID int64 `json:"relation_id"`
	IsLeader   bool  `json:"is_leader"`
}

type UpdateSettingNickNameParams

type UpdateSettingNickNameParams struct {
	AccountID  int64  `json:"account_id"`
	RelationID int64  `json:"relation_id"`
	NickName   string `json:"nick_name"`
}

type UpdateSettingPinParams

type UpdateSettingPinParams struct {
	AccountID  int64 `json:"account_id"`
	RelationID int64 `json:"relation_id"`
	IsPin      bool  `json:"is_pin"`
}

type UpdateSettingShowParams

type UpdateSettingShowParams struct {
	AccountID  int64 `json:"account_id"`
	RelationID int64 `json:"relation_id"`
	IsShow     bool  `json:"is_show"`
}

type UpdateUserParams

type UpdateUserParams struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	ID       int64  `json:"id"`
}

type User

type User struct {
	ID       int64     `json:"id"`
	Email    string    `json:"email"`
	Password string    `json:"password"`
	CreateAt time.Time `json:"create_at"`
}

Jump to

Keyboard shortcuts

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