init:搭建了整个项目的框架,初步写好了用户系统

This commit is contained in:
Leon
2025-12-04 17:09:04 +08:00
commit 81926ce8a2
15 changed files with 646 additions and 0 deletions

43
internal/api/user.go Normal file
View File

@@ -0,0 +1,43 @@
package api
type CreateUserRequest struct {
Username string `json:"username"`
Password string `json:"password"`
}
type CreateUserResponse struct {
}
type RenameByIDRequest struct {
ID uint `json:"id"`
NewUsername string `json:"new_username"`
}
type RenameByIDResponse struct {
}
type FindByIDRequest struct {
ID uint `json:"id"`
}
type FindByIDResponse struct {
ID uint `json:"id"`
Username string `json:"username"`
}
type FindByUsernameRequest struct {
Username string `json:"username"`
}
type FindByUsernameResponse struct {
ID uint `json:"id"`
Username string `json:"username"`
}
type ChangePasswordRequest struct {
ID uint `json:"id"`
NewPassword string `json:"new_password"`
}
type ChangePasswordResponse struct {
}