自动更新管控端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
923 B

package db
import "time"
// 定义数据库中用的模型
type StFileInfo struct {
Id string `json:"id"`
Fpath string `json:"fpath"`
Fhash string `json:"fhash"`
Fname string `json:"fname"`
}
// 服务器信息
type StServerInfo struct {
Id string `json:"id"`
Scname string `json:"scname"`
Addr string `json:"addr"`
Port string `json:"port"`
Token string `json:"token"`
Status int `json:"status"`
}
// 用户信息
type User struct {
ID int `json:"id" db:"id"`
Username string `json:"username" db:"username"`
Email string `json:"email" db:"email"`
Role string `json:"role" db:"role"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
LastLogin time.Time `json:"last_login" db:"last_login"`
Status string `json:"status" db:"status"`
PasswordHash string `json:"-" db:"password_hash"`
}