models

package
v0.0.0-...-f94c27c Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID           primitive.ObjectID `bson:"_id"`
	FirstName    *string            `json:"first_name" bson:"first_name" validate:"required,min=1,max=100"`
	LastName     *string            `json:"last_name" bson:"last_name" validate:"required,min=1,max=100"`
	Password     *string            `json:"password" bson:"password" validate:"required,min=8"`
	Email        *string            `json:"email" bson:"email" validate:"email,required"`
	Phone        *string            `json:"phone" bson:"phone"`
	UserType     *string            `json:"user_type" bson:"user_type" validate:"required,eq=ADMIN|eq=USER"`
	AccessToken  *string            `json:"access" bson:"access"`
	RefreshToken *string            `json:"refresh" bson:"refresh"`
	CreatedAt    time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt    time.Time          `json:"updated_at" bson:"updated_at"`
	UserId       string             `json:"user_id" bson:"user_id"`
}

Jump to

Keyboard shortcuts

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