mirror of https://github.com/bjdgyc/anylink.git
修改数据表字段类型
This commit is contained in:
parent
1940fcca87
commit
2ad65039f3
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
type Group struct {
|
||||
Id int `json:"id" xorm:"pk autoincr not null"`
|
||||
Name string `json:"name" xorm:"varchar(60) not null index(idx_name) unique"`
|
||||
Name string `json:"name" xorm:"varchar(60) not null unique(inx_name)"`
|
||||
Note string `json:"note" xorm:"varchar(255)"`
|
||||
AllowLan bool `json:"allow_lan" xorm:"Bool"`
|
||||
ClientDns []ValData `json:"client_dns" xorm:"Text"`
|
||||
|
@ -15,13 +15,13 @@ type Group struct {
|
|||
LinkAcl []GroupLinkAcl `json:"link_acl" xorm:"Text"`
|
||||
Bandwidth int `json:"bandwidth" xorm:"Int"` // 带宽限制
|
||||
Status int8 `json:"status" xorm:"Int"` // 1正常
|
||||
CreatedAt time.Time `json:"created_at" xorm:"DateTime"`
|
||||
UpdatedAt time.Time `json:"updated_at" xorm:"DateTime"`
|
||||
CreatedAt time.Time `json:"created_at" xorm:"DateTime created"`
|
||||
UpdatedAt time.Time `json:"updated_at" xorm:"DateTime updated"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
Id int `json:"id" xorm:"pk autoincr not null"`
|
||||
Username string `json:"username" xorm:"varchar(60) not null index(idx_username) unique"`
|
||||
Username string `json:"username" xorm:"varchar(60) not null unique(inx_username)"`
|
||||
Nickname string `json:"nickname" xorm:"varchar(255)"`
|
||||
Email string `json:"email" xorm:"varchar(255)"`
|
||||
// Password string `json:"password"`
|
||||
|
@ -31,24 +31,25 @@ type User struct {
|
|||
Groups []string `json:"groups" xorm:"Text"`
|
||||
Status int8 `json:"status" xorm:"Int"` // 1正常
|
||||
SendEmail bool `json:"send_email" xorm:"Bool"`
|
||||
CreatedAt time.Time `json:"created_at" xorm:"DateTime"`
|
||||
UpdatedAt time.Time `json:"updated_at" xorm:"DateTime"`
|
||||
CreatedAt time.Time `json:"created_at" xorm:"DateTime created"`
|
||||
UpdatedAt time.Time `json:"updated_at" xorm:"DateTime updated"`
|
||||
}
|
||||
|
||||
type IpMap struct {
|
||||
Id int `json:"id" xorm:"pk autoincr not null"`
|
||||
IpAddr string `json:"ip_addr" xorm:"varchar(32) index(idx_ip_addr)"`
|
||||
MacAddr string `json:"mac_addr" xorm:"varchar(32) index(idx_mac_addr)"`
|
||||
IpAddr string `json:"ip_addr" xorm:"varchar(32) not null unique(inx_ip_addr)"`
|
||||
MacAddr string `json:"mac_addr" xorm:"varchar(32) not null unique(inx_mac_addr)"`
|
||||
Username string `json:"username" xorm:"varchar(60)"`
|
||||
Keep bool `json:"keep" xorm:"Bool"` // 保留 ip-mac 绑定
|
||||
KeepTime time.Time `json:"keep_time" xorm:"DateTime"`
|
||||
Note string `json:"note" xorm:"varchar(255)"` // 备注
|
||||
LastLogin time.Time `json:"last_login" xorm:"DateTime"`
|
||||
UpdatedAt time.Time `json:"updated_at" xorm:"DateTime"`
|
||||
LastLogin time.Time `json:"last_login" xorm:"DateTime updated"`
|
||||
UpdatedAt time.Time `json:"updated_at" xorm:"DateTime updated"`
|
||||
}
|
||||
|
||||
type Setting struct {
|
||||
Id int `json:"id" xorm:"pk autoincr not null"`
|
||||
Name string `json:"name" xorm:"varchar(60) not null unique"`
|
||||
Data string `json:"data" xorm:"Text"`
|
||||
Id int `json:"id" xorm:"pk autoincr not null"`
|
||||
Name string `json:"name" xorm:"varchar(60) not null unique(inx_name)"`
|
||||
Data string `json:"data" xorm:"Text"`
|
||||
UpdatedAt time.Time `json:"updated_at" xorm:"DateTime updated"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue