mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-01 00:42:13 +08:00 
			
		
		
		
	* feat: add openim server code Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim env Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim mongo and redis env Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add zk and redis mongo env Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add kafka and redis mongo env Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim docker Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim docker Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim docker Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim copyright Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: docker compose Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: remove openim chat config file Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim config set Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim config set Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: fix Security vulnerability Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: fix Security vulnerability Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: docker compose Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * Update kubernetes.go * Update discoveryregister.go * fix: copyright-add Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>
		
			
				
	
	
		
			106 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			106 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright © 2023 OpenIM. All rights reserved.
 | |
| //
 | |
| // Licensed under the Apache License, Version 2.0 (the "License");
 | |
| // you may not use this file except in compliance with the License.
 | |
| // You may obtain a copy of the License at
 | |
| //
 | |
| //     http://www.apache.org/licenses/LICENSE-2.0
 | |
| //
 | |
| // Unless required by applicable law or agreed to in writing, software
 | |
| // distributed under the License is distributed on an "AS IS" BASIS,
 | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | |
| // See the License for the specific language governing permissions and
 | |
| // limitations under the License.
 | |
| 
 | |
| package db
 | |
| 
 | |
| import "time"
 | |
| 
 | |
| type Friend struct {
 | |
| 	OwnerUserID    string    `gorm:"column:owner_user_id;primary_key;size:64"`
 | |
| 	FriendUserID   string    `gorm:"column:friend_user_id;primary_key;size:64"`
 | |
| 	Remark         string    `gorm:"column:remark;size:255"`
 | |
| 	CreateTime     time.Time `gorm:"column:create_time"`
 | |
| 	AddSource      int32     `gorm:"column:add_source"`
 | |
| 	OperatorUserID string    `gorm:"column:operator_user_id;size:64"`
 | |
| 	Ex             string    `gorm:"column:ex;size:1024"`
 | |
| }
 | |
| 
 | |
| type FriendRequest struct {
 | |
| 	FromUserID    string    `gorm:"column:from_user_id;primary_key;size:64"`
 | |
| 	ToUserID      string    `gorm:"column:to_user_id;primary_key;size:64"`
 | |
| 	HandleResult  int32     `gorm:"column:handle_result"`
 | |
| 	ReqMsg        string    `gorm:"column:req_msg;size:255"`
 | |
| 	CreateTime    time.Time `gorm:"column:create_time"`
 | |
| 	HandlerUserID string    `gorm:"column:handler_user_id;size:64"`
 | |
| 	HandleMsg     string    `gorm:"column:handle_msg;size:255"`
 | |
| 	HandleTime    time.Time `gorm:"column:handle_time"`
 | |
| 	Ex            string    `gorm:"column:ex;size:1024"`
 | |
| }
 | |
| 
 | |
| func (FriendRequest) TableName() string {
 | |
| 	return "friend_requests"
 | |
| }
 | |
| 
 | |
| type Group 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"`
 | |
| 	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"`
 | |
| }
 | |
| 
 | |
| type GroupMember struct {
 | |
| 	GroupID        string    `gorm:"column:group_id;primary_key;size:64"`
 | |
| 	UserID         string    `gorm:"column:user_id;primary_key;size:64"`
 | |
| 	Nickname       string    `gorm:"column:nickname;size:255"`
 | |
| 	FaceURL        string    `gorm:"column:user_group_face_url;size:255"`
 | |
| 	RoleLevel      int32     `gorm:"column:role_level"`
 | |
| 	JoinTime       time.Time `gorm:"column:join_time"`
 | |
| 	JoinSource     int32     `gorm:"column:join_source"`
 | |
| 	InviterUserID  string    `gorm:"column:inviter_user_id;size:64"`
 | |
| 	OperatorUserID string    `gorm:"column:operator_user_id;size:64"`
 | |
| 	MuteEndTime    time.Time `gorm:"column:mute_end_time"`
 | |
| 	Ex             string    `gorm:"column:ex;size:1024"`
 | |
| }
 | |
| 
 | |
| type GroupRequest struct {
 | |
| 	UserID        string    `gorm:"column:user_id;primary_key;size:64"`
 | |
| 	GroupID       string    `gorm:"column:group_id;primary_key;size:64"`
 | |
| 	HandleResult  int32     `gorm:"column:handle_result"`
 | |
| 	ReqMsg        string    `gorm:"column:req_msg;size:1024"`
 | |
| 	HandledMsg    string    `gorm:"column:handle_msg;size:1024"`
 | |
| 	ReqTime       time.Time `gorm:"column:req_time"`
 | |
| 	HandleUserID  string    `gorm:"column:handle_user_id;size:64"`
 | |
| 	HandledTime   time.Time `gorm:"column:handle_time"`
 | |
| 	JoinSource    int32     `gorm:"column:join_source"`
 | |
| 	InviterUserID string    `gorm:"column:inviter_user_id;size:64"`
 | |
| 	Ex            string    `gorm:"column:ex;size:1024"`
 | |
| }
 | |
| 
 | |
| type User struct {
 | |
| 	UserID           string    `gorm:"column:user_id;primary_key;size:64"`
 | |
| 	Nickname         string    `gorm:"column:name;size:255"`
 | |
| 	FaceURL          string    `gorm:"column:face_url;size:255"`
 | |
| 	Gender           int32     `gorm:"column:gender"`
 | |
| 	PhoneNumber      string    `gorm:"column:phone_number;size:32"`
 | |
| 	Birth            time.Time `gorm:"column:birth"`
 | |
| 	Email            string    `gorm:"column:email;size:64"`
 | |
| 	Ex               string    `gorm:"column:ex;size:1024"`
 | |
| 	CreateTime       time.Time `gorm:"column:create_time;index:create_time"`
 | |
| 	AppMangerLevel   int32     `gorm:"column:app_manger_level"`
 | |
| 	GlobalRecvMsgOpt int32     `gorm:"column:global_recv_msg_opt"`
 | |
| 
 | |
| 	status int32 `gorm:"column:status"`
 | |
| }
 |