# Conflicts: # internal/rpc/friend/friend.go # pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.gotest-errcode
commit
64b4e5570c
@ -0,0 +1,57 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
type GroupChao struct {
|
||||
GroupID string `gorm:"column:group_id;primary_key;size:64" json:"groupID" binding:"required"`
|
||||
GroupName string `gorm:"column:name;size:255" json:"groupName"`
|
||||
Notification string `gorm:"column:notification;size:255" json:"notification"`
|
||||
Introduction string `gorm:"column:introduction;size:255" json:"introduction"`
|
||||
FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"`
|
||||
CreateTime time.Time `gorm:"column:create_time;index:create_time"`
|
||||
Ex string `gorm:"column:ex" json:"ex;size:1024" json:"ex"`
|
||||
Status int32 `gorm:"column:status"`
|
||||
CreatorUserID string `gorm:"column:creator_user_id;size:64"`
|
||||
GroupType int32 `gorm:"column:group_type"`
|
||||
NeedVerification int32 `gorm:"column:need_verification"`
|
||||
LookMemberInfo int32 `gorm:"column:look_member_info" json:"lookMemberInfo"`
|
||||
ApplyMemberFriend int32 `gorm:"column:apply_member_friend" json:"applyMemberFriend"`
|
||||
NotificationUpdateTime time.Time `gorm:"column:notification_update_time"`
|
||||
NotificationUserID string `gorm:"column:notification_user_id;size:64"`
|
||||
DB *gorm.DB `group:"-" json:"-"`
|
||||
}
|
||||
|
||||
func (tb *GroupChao) FindBy(groupID string) (*GroupChao, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (tb *GroupChao) FindIn(groupIDList []string) ([]GroupChao, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (tb *GroupChao) Create(m *GroupChao) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tb *GroupChao) CreateList(m []GroupChao) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tb *GroupChao) Update(m *GroupChao) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tb *GroupChao) UpdateBy(groupID string, data map[string]interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tb *GroupChao) DeleteBy(groupID string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tb *GroupChao) DeleteIn(groupID []string) error {
|
||||
return nil
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package im_mysql_model
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/db"
|
||||
"Open_IM/pkg/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Group struct {
|
||||
//`json:"operationID" binding:"required"`
|
||||
//`protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` `json:"operationID" binding:"required"`
|
||||
GroupID string `gorm:"column:group_id;primary_key;size:64" json:"groupID" binding:"required"`
|
||||
GroupName string `gorm:"column:name;size:255" json:"groupName"`
|
||||
Notification string `gorm:"column:notification;size:255" json:"notification"`
|
||||
Introduction string `gorm:"column:introduction;size:255" json:"introduction"`
|
||||
FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"`
|
||||
CreateTime time.Time `gorm:"column:create_time;index:create_time"`
|
||||
Ex string `gorm:"column:ex" json:"ex;size:1024" json:"ex"`
|
||||
Status int32 `gorm:"column:status"`
|
||||
CreatorUserID string `gorm:"column:creator_user_id;size:64"`
|
||||
GroupType int32 `gorm:"column:group_type"`
|
||||
NeedVerification int32 `gorm:"column:need_verification"`
|
||||
LookMemberInfo int32 `gorm:"column:look_member_info" json:"lookMemberInfo"`
|
||||
ApplyMemberFriend int32 `gorm:"column:apply_member_friend" json:"applyMemberFriend"`
|
||||
NotificationUpdateTime time.Time `gorm:"column:notification_update_time"`
|
||||
NotificationUserID string `gorm:"column:notification_user_id;size:64"`
|
||||
}
|
||||
|
||||
func (*Group) Create(groupList []*Group) error {
|
||||
return utils.Wrap(db.DB.MysqlDB.DefaultGormDB().Create(&groupList).Error, "")
|
||||
}
|
||||
|
||||
func (*Group) Delete(groupList []*Group) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*Group) Update(groupList []*Group) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*Group) UpdateByMap(args map[*Group]map[string]interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*Group) Find(group []*Group) ([]*Group, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (*Group) Take(group *Group) (*Group, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (*Group) Count(group *Group) (int64, error) {
|
||||
return 0, nil
|
||||
}
|
Loading…
Reference in new issue