From 52694a147527079756748015be5a592357500273 Mon Sep 17 00:00:00 2001 From: Leon <147289645+LeoninCS@users.noreply.github.com> Date: Tue, 16 Dec 2025 18:46:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E8=AF=B7=E6=B1=82=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=BD=93=E6=94=BE=E5=88=B0entity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/account/entity.go | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/internal/account/entity.go b/internal/account/entity.go index 8eca483..045c89a 100644 --- a/internal/account/entity.go +++ b/internal/account/entity.go @@ -6,3 +6,41 @@ type Account struct { Password string `json:"-"` Token string `json:"-"` } + +type CreateAccountRequest struct { + Username string `json:"username"` + Password string `json:"password"` +} + +type RenameRequest struct { + NewUsername string `json:"new_username"` +} + +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 { + Username string `json:"username"` + OldPassword string `json:"old_password"` + NewPassword string `json:"new_password"` +} + +type LoginRequest struct { + Username string `json:"username"` + Password string `json:"password"` +}