models

package
v0.0.0-...-2082a21 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrosNoBody

type ErrosNoBody struct {
	Error string `json:"error"`
}

type ExampleInputUser

type ExampleInputUser struct {
	Nickname string `json:"nickname"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
}

type LoginUser

type LoginUser struct {
	Email    string `json:"email" binding:"required,email,max=50"`
	Password string `json:"password" binding:"required,min=6,max=16"`
}

type UpdateUser

type UpdateUser struct {
	Nickname  *string   `json:"nickname" binding:"omitempty,min=3,max=50"`
	Email     *string   `json:"email" binding:"omitempty,max=50,email"`
	Password  *string   `json:"password" binding:"omitempty,min=6,max=16"`
	UpdatedAt time.Time `json:"updated_at"`
}

type User

type User struct {
	ID        string    `json:"id" gorm:"primaryKey;type:uuid" binding:"required,uuid4"`
	Nickname  string    `json:"nickname" gorm:"size:50;unique" binding:"required,min=3,max=50"`
	Email     string    `json:"email" gorm:"size:50;unique" binding:"required,max=50,email"`
	Password  string    `json:"password" gorm:"password" binding:"required,min=6,max=16"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type UserResponse

type UserResponse struct {
	ID        string    `json:"id"`
	Nickname  string    `json:"nickname"`
	Email     string    `json:"email"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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