models

package
v0.0.0-...-0eea77f Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT 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             `bson:"firstName" json:"firstName" validate:"required,min=2,max=100"`
	LastName     string             `bson:"lastName" json:"lastName" validate:"required,min=2,max=100"`
	Password     string             `bson:"password" json:"password" validate:"required,min=6"`
	Email        string             `bson:"email" json:"email" validate:"required,email"`
	Phone        string             `bson:"phone" json:"phone" validate:"required,min=10,max=10"`
	Token        string             `bson:"token" json:"token"`
	UserType     string             `bson:"userType" json:"userType" validate:"required,eq=ADMIN|eq=USER"`
	RefreshToken string             `bson:"refreshToken" json:"refreshToken"`
	CreatedAt    time.Time          `bson:"createdAt" json:"createdAt"`
	UpdatedAt    time.Time          `bson:"updatedAt" json:"updatedAt"`
	UserId       string             `bson:"userId" json:"userId"`
}

Jump to

Keyboard shortcuts

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