model

package
v0.0.0-...-644249d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatRequest

type ChatRequest struct {
	UserID uuid.UUID `json:"-"`
	Chat   string    `json:"chat" binding:"required"`
}

type CreateLeaderboardRequest

type CreateLeaderboardRequest struct {
	Name            string `json:"name" binding:"required"`
	PhotoLink       string `json:"photo_link"`
	TotalCorrupt    string `json:"total_corruption" binding:"required"`
	DetailCorruptor string `json:"detail_corruptor" binding:"required"`
}

type CreateLeaderboardResponse

type CreateLeaderboardResponse struct {
	ID              int       `json:"id"`
	Name            string    `json:"name"`
	PhotoLink       string    `json:"photo_link"`
	TotalCorrupt    string    `json:"total_corruption"`
	DetailCorruptor string    `json:"detail_corruptor"`
	CreatedAt       time.Time `json:"created_at"`
}

type Response

type Response struct {
	Error   bool
	Message string
	Data    any
}

type ServiceResponse

type ServiceResponse struct {
	Code    int
	Error   bool
	Message string
	Data    any
}

type UpdatePasswordRequest

type UpdatePasswordRequest struct {
	ID              uuid.UUID `json:"-"`
	OldPassword     string    `json:"old_password" binding:"required"`
	NewPassword     string    `json:"new_password" binding:"required,min=8"`
	ConfirmPassword string    `json:"confirm_password" binding:"required,eqfield=NewPassword"`
}

type UploadPhotoRequest

type UploadPhotoRequest struct {
	ID        uuid.UUID             `json:"-"`
	PhotoLink string                `json:"-"`
	Photo     *multipart.FileHeader `form:"photo"`
}

type UserLoginRequest

type UserLoginRequest struct {
	Email    string `json:"email" binding:"required,email"`
	Password string `json:"password" binding:"required"`
}

type UserLoginResponse

type UserLoginResponse struct {
	User  UserRegisterResponse `json:"user"`
	Token string               `json:"token"`
}

type UserParam

type UserParam struct {
	ID    uuid.UUID `json:"-"`
	Email string    `json:"-"`
}

type UserRegisterRequest

type UserRegisterRequest struct {
	ID              uuid.UUID `json:"-"`
	PhoneNumber     string    `json:"phone_number"`
	Name            string    `json:"name" binding:"required"`
	Email           string    `json:"email" binding:"required"`
	Password        string    `json:"password" binding:"required,min=8"`
	ConfirmPassword string    `json:"confirm_password" binding:"required,eqfield=Password"`
}

type UserRegisterResponse

type UserRegisterResponse struct {
	ID          uuid.UUID `json:"-"`
	Name        string    `json:"name"`
	Email       string    `json:"email"`
	PhoneNumber string    `json:"phone_number"`
}

type UserUpdateRequest

type UserUpdateRequest struct {
	ID          uuid.UUID `json:"-"`
	PhoneNumber string    `json:"phone_number"`
	Name        string    `json:"name"`
	Email       string    `json:"-"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL