mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-03 00:12:48 +08:00
errCode
This commit is contained in:
parent
9d433fb248
commit
f2cade3251
@ -3,6 +3,7 @@ package im_mysql_model
|
||||
import (
|
||||
"Open_IM/pkg/common/db"
|
||||
"Open_IM/pkg/utils"
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -22,6 +23,7 @@ type Group struct {
|
||||
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 `gorm:"-" json:"-"`
|
||||
}
|
||||
|
||||
func (*Group) Create(groupList []*Group) error {
|
||||
@ -29,7 +31,7 @@ func (*Group) Create(groupList []*Group) error {
|
||||
}
|
||||
|
||||
func (*Group) Delete(groupIDList []string) error {
|
||||
return nil
|
||||
return utils.Wrap(db.DB.MysqlDB.DefaultGormDB().Where("group_id in (?)", groupIDList).Delete(&Group{}).Error, "")
|
||||
}
|
||||
|
||||
func (*Group) Update(groupList []*Group) error {
|
||||
|
@ -1,32 +1,32 @@
|
||||
package im_mysql_model
|
||||
|
||||
func (tb *Group) Create(groups []*Group) error {
|
||||
return nil
|
||||
}
|
||||
func (tb *Group) Take(groupIDs []string) (*Group, error) {
|
||||
return nil, nil
|
||||
}
|
||||
func (tb *Group) Get(groupIDs []string) (*Group, error) {
|
||||
return nil, nil
|
||||
}
|
||||
func (tb *Group) Update(groups []*Group) error {
|
||||
return nil
|
||||
}
|
||||
func (tb *Group) GetByName(groupName string, pageNumber, showNumber int32) ([]GroupWithNum, int64, error) {
|
||||
|
||||
}
|
||||
func (tb *Group) GetGroups(pageNumber, showNumber int) ([]GroupWithNum, error) {
|
||||
}
|
||||
func (tb *Group) OperateGroupStatus(groupId string, groupStatus int32) error {
|
||||
}
|
||||
|
||||
func (tb *Group) GetCountsNum(groupIDs []string) ([]int32, error) {
|
||||
|
||||
}
|
||||
|
||||
func (tb *Group) UpdateDefaultZero(groupID string, args map[string]interface{}) error {
|
||||
}
|
||||
|
||||
func (tb *Group) GetGroupIDsByGroupType(groupType int) ([]string, error) {
|
||||
|
||||
}
|
||||
//func (tb *Group) Create(groups []*Group) error {
|
||||
// return nil
|
||||
//}
|
||||
//func (tb *Group) Take(groupIDs []string) (*Group, error) {
|
||||
// return nil, nil
|
||||
//}
|
||||
//func (tb *Group) Get(groupIDs []string) (*Group, error) {
|
||||
// return nil, nil
|
||||
//}
|
||||
//func (tb *Group) Update(groups []*Group) error {
|
||||
// return nil
|
||||
//}
|
||||
//func (tb *Group) GetByName(groupName string, pageNumber, showNumber int32) ([]GroupWithNum, int64, error) {
|
||||
//
|
||||
//}
|
||||
//func (tb *Group) GetGroups(pageNumber, showNumber int) ([]GroupWithNum, error) {
|
||||
//}
|
||||
//func (tb *Group) OperateGroupStatus(groupId string, groupStatus int32) error {
|
||||
//}
|
||||
//
|
||||
//func (tb *Group) GetCountsNum(groupIDs []string) ([]int32, error) {
|
||||
//
|
||||
//}
|
||||
//
|
||||
//func (tb *Group) UpdateDefaultZero(groupID string, args map[string]interface{}) error {
|
||||
//}
|
||||
//
|
||||
//func (tb *Group) GetGroupIDsByGroupType(groupType int) ([]string, error) {
|
||||
//
|
||||
//}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package im_mysql_model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -87,26 +86,26 @@ func (FriendRequest) TableName() string {
|
||||
// }
|
||||
//
|
||||
// open_im_sdk.GroupInfo (OwnerUserID , MemberCount )> imdb.Group
|
||||
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"`
|
||||
DB *gorm.DB `gorm:"-" json:"-"`
|
||||
}
|
||||
//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"`
|
||||
// DB *gorm.DB `gorm:"-" json:"-"`
|
||||
//}
|
||||
|
||||
// message GroupMemberFullInfo {
|
||||
// string GroupID = 1 ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user