videoplayer/proto/conf.go

43 lines
1.0 KiB
Go
Raw Normal View History

package proto
import "gorm.io/gorm"
const (
MYSQL_USER = "video_t2"
MYSQL_DB = "video_t2"
MYSQL_PASSWORD = "2t2SKHmWEYj2xFKF"
MYSQL_PORT = "3306"
MYSQL_HOST = "127.0.0.1"
2024-06-25 10:28:22 +08:00
MYSQL_DSN = MYSQL_USER + ":" + MYSQL_PASSWORD + "@tcp(" + MYSQL_HOST + ":" + MYSQL_PORT + ")/" + MYSQL_DB + "?charset=utf8mb4&parseTime=True&loc=Local"
REDIS_ADDR = "127.0.0.1:6379"
2024-08-04 21:08:29 +08:00
REDIS_PASSWORD = "lj502138"
REIDS_DB = 2
TOKEN_SECRET = "mfjurnc_32ndj9dfhj"
// 以下是持续集成、部署的配置
CID_BASE_DIR = "/home/lijun/cid/"
)
2024-08-02 15:02:56 +08:00
const (
// 以下是消息类型
MSG_TYPE_SIMPLE = 1 // 单聊
MSG_TYPE_GROUP = 2 // 群聊
MSG_TYPE_SYSTEM = 3 // 系统消息
MSG_TYPE_FRIEND = 4 // 好友请求
MSG_TYPE_GROUP_ADD = 5 // 加入群聊请求
2024-08-02 15:02:56 +08:00
// 以下是消息状态
MSG_STATUS_READ = 1 // 已读
MSG_STATUS_UNREAD = 0 // 未读
)
2024-06-28 10:38:55 +08:00
type User struct {
gorm.Model
Name string `gorm:"column:name"`
Age int `gorm:"column:age"`
Email string `gorm:"column:email"`
Gender string `gorm:"column:gender"`
}