domain

package
v0.0.0-...-e61a738 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 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 Account

type Account struct {
	bun.BaseModel `bun:"table:account,alias:a"`

	Id        int        `json:"id,omitempty" bun:"id,pk,autoincrement"`
	Email     string     `json:"email" bun:"email" binding:"required"`
	Password  string     `json:"-" bun:"password_hash" binding:"required"`
	Role      Role       `json:"role" bun:"role"`
	CreatedAt *time.Time `json:"created_at,omitempty" bun:"created_at"` // nolint
}

Account

type Role

type Role int
const (
	ROLE_CUSTOMER Role = iota
)

type SignInInput

type SignInInput struct {
	Email    string `json:"email" binding:"required" validate:"required,email"`
	Password string `json:"password" binding:"required" validate:"required,gte=6"`
}

SignInInput

func (*SignInInput) Validate

func (i *SignInInput) Validate() error

type SignUpInput

type SignUpInput struct {
	Email    string `json:"email" binding:"required" validate:"required,email"`
	Password string `json:"password,omitempty" binding:"required" validate:"required,gte=6"`
}

SignUpInput

func (*SignUpInput) Validate

func (i *SignUpInput) Validate() error

Jump to

Keyboard shortcuts

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