mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-09-28 04:42:12 +08:00
29 lines
745 B
Go
29 lines
745 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/lzh-1625/go_process_manager/internal/app/constants"
|
|
)
|
|
|
|
type User struct {
|
|
Account string `json:"account" gorm:"primaryKey;column:account" `
|
|
Password string `json:"password" gorm:"column:password" `
|
|
Role constants.Role `json:"role" gorm:"column:role" `
|
|
CreateTime time.Time `json:"createTime" gorm:"column:create_time" `
|
|
Remark string `json:"remark" gorm:"column:remark" `
|
|
}
|
|
|
|
func (*User) TableName() string {
|
|
return "users"
|
|
}
|
|
|
|
type LoginHandlerReq struct {
|
|
Account string `form:"account" binding:"required"`
|
|
Password string `form:"password" binding:"required"`
|
|
}
|
|
|
|
type DeleteUserReq struct {
|
|
Account string `form:"account" binding:"required"`
|
|
}
|