Documentation ¶
Index ¶
Constants ¶
View Source
const ( FRIEND = 1 GROUP = 2 )
Variables ¶
View Source
var ErrNotFound = sqlx.ErrNotFound
Functions ¶
This section is empty.
Types ¶
type ListItem ¶
type ListItem struct { Id int64 `db:"id" json:"id"` Tp int64 `db:"type" json:"type"` IsAgree string `db:"is_agree" json:"is_agree"` NickName string `db:"nick_name" json:"nick_name"` Content string `db:"content" json:"content"` CreateTime time.Time `db:"create_time" json:"create_time"` Status int64 `db:"status" json:"status"` }
type Notices ¶
type Notices struct { Id int64 `db:"id"` Tp int64 `db:"type"` PubUserId int64 `db:"pub_user_id"` SubUserId int64 `db:"sub_user_id"` LinkId int64 `db:"link_id"` Content string `db:"content"` Note string `db:"Note"` IsAgree string `db:"is_agree"` CreateTime time.Time `db:"create_time"` UpdateTime time.Time `db:"update_time"` Status int64 `db:"status"` }
type NoticesModel ¶
type NoticesModel interface { CheckSendAddFriend(userId, friendId int64) (*Notices, error) GetListByUserId(userId int64) ([]ListItem, error) TransInsert(ctx context.Context, session sqlx.Session, data *Notices) (sql.Result, error) AddFriend(userId, friendId int64, userNickName, friendNickName string) (*Notices, error) // contains filtered or unexported methods }
NoticesModel is an interface to be customized, add more methods here, and implement the added methods in customNoticesModel.
func NewNoticesModel ¶
func NewNoticesModel(conn sqlx.SqlConn) NoticesModel
NewNoticesModel returns a model for the database table.
Click to show internal directories.
Click to hide internal directories.