Apply .gitignore rules
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package sqlAsyncMgr
|
||||
|
||||
// SqlAsyncItemModel 异步sql模型
|
||||
type SqlAsyncItemModel struct {
|
||||
// 表名
|
||||
TableName string
|
||||
|
||||
// 唯一标识
|
||||
IdentityId string
|
||||
|
||||
// 待执行的sql
|
||||
Sql string
|
||||
}
|
||||
|
||||
// newSqlAsyncItemModel 构造异步sql模型
|
||||
func newSqlAsyncItemModel(tableName, identityId, sql string) *SqlAsyncItemModel {
|
||||
return &SqlAsyncItemModel{
|
||||
TableName: tableName,
|
||||
IdentityId: identityId,
|
||||
Sql: sql,
|
||||
}
|
||||
}
|
||||
2088
.svn/pristine/fb/fba5d865596baf09e485ec88b49dd9fe9be838b4.svn-base
Normal file
2088
.svn/pristine/fb/fba5d865596baf09e485ec88b49dd9fe9be838b4.svn-base
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"common/cache"
|
||||
"common/connection"
|
||||
)
|
||||
|
||||
func init() {
|
||||
//注册数据库
|
||||
connection.RegisterDBModel(&User{})
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID int64 `gorm:"column:id;primary_key;comment:用户id;autoIncrementIncrement" json:"id"`
|
||||
//账号
|
||||
Account string `gorm:"column:account;comment:账号" json:"account"`
|
||||
Name string `gorm:"column:name;comment:用户名称" json:"name"`
|
||||
Password string `gorm:"column:password;comment:用户密码" json:"password"`
|
||||
//性别
|
||||
Sex int32 `gorm:"column:sex;comment:性别" json:"sex"`
|
||||
//生日
|
||||
Birthday string `gorm:"column:birthday;comment:生日" json:"birthday"`
|
||||
//手机
|
||||
Phone int64 `gorm:"column:phone;comment:手机" json:"phone"`
|
||||
//邮箱
|
||||
Email string `gorm:"column:email;comment:邮箱" json:"email"`
|
||||
//备注
|
||||
Describe string `gorm:"column:describe;comment:备注" json:"describe"`
|
||||
|
||||
//玩家的缓存对象
|
||||
Cache *cache.Cache `gorm:"-"`
|
||||
}
|
||||
|
||||
func (User) TableName() string {
|
||||
return "user"
|
||||
}
|
||||
Reference in New Issue
Block a user