feat(login/register): 实现用户注册登录handler以及用户模型

This commit is contained in:
2026-05-24 13:14:41 +08:00
parent 2601af6da6
commit 259d8dcbd7
3 changed files with 88 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
package model
import "time"
// User 用户实体。
type User struct {
ID uint `json:"id"`
Username string `json:"username"`
Password string `json:"-"` // 密码哈希,JSON 序列化时忽略
Email string `json:"email,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}