game2006go/README.md
aozhiwei 9f395295f0 1
2024-05-06 11:46:20 +08:00

63 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 数据库规范
所有的表都必须有一下字段
CREATE TABLE `t_xxx` (
`idx` bigint(20) NOT NULL AUTO_INCREMENT,
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8;
表字段没特别原因下,必须有默认值
表名称t_开始
version表因为历史原因不以t_开头
每个库都必须有一个version表
# 脚本说明
生成协议、配置表想关代码
cd server/imserver
node ../../tools/pbtools/app.js
# go代码风格
main包里所有的函数、字段都小写开头
# golang的巨坑!!!
当interface类型的返回值已经明确为nil时应该直接返回nil而不是具体实现结构的未赋值空指针
https://www.jianshu.com/p/ffbf8b9b4f79
packets.go:122: closing bad idle connection: EOF
# imserver
SMLogin
# mailserver
收件人类型
所有用户
用户群<=创建时间
用户群>=创建时间
用户群创建时间range(开始时间,结束时间)
用户群指定账号列表
邮件类型
纯个人邮件
群邮件
全局邮件
邮件
增删改
用户组
增删改
事件类型
邮件:新增、变更、删除
用户组:新增、变更、删除
# 参考
https://gorm.io/zh_CN/docs/