game2006go/README.md
aozhiwei e81775047c 1
2024-03-22 16:17:26 +08:00

38 lines
913 B
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
# imserver
SMLogin
# 参考
https://gorm.io/zh_CN/docs/