model

package
v0.0.0-...-7c86508 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basket

type Basket struct {
	ID        primitive.ObjectID `bson:"_id"`
	UserID    primitive.ObjectID `bson:"userId"`
	ProductID primitive.ObjectID `bson:"productId"`
	Count     uint8              `bson:"count"`
}

type BasketAddToBasketRequestModel

type BasketAddToBasketRequestModel struct {
	Product string `json:"id"`
}

type BasketResponseModel

type BasketResponseModel struct {
	ID      primitive.ObjectID `bson:"_id" json:"id,omitempty"`
	Product Product            `bson:"product" json:"product"`
	Count   uint8              `bson:"count" json:"count"`
}

type BasketUpdateRequestModel

type BasketUpdateRequestModel struct {
	ID    primitive.ObjectID `bson:"_id" json:"basketId"`
	Count int8               `bson:"count" json:"count"`
}

type Category

type Category struct {
	ID    primitive.ObjectID `bson:"_id" json:"id,omitempty"`
	Value string             `json:"value" bson:"value"`
}

type GmailData

type GmailData struct {
	Email         string `json:"email"`
	FamilyName    string `json:"family_name"`
	GivenName     string `json:"given_name"`
	ID            string `json:"id"`
	Name          string `json:"name"`
	Picture       string `json:"picture"`
	VerifiedEmail bool   `json:"verified_email"`
}

type OAuthUser

type OAuthUser struct {
	ID       primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	OAuthID  string             `bson:"oAuthId" json:"oAuthId,omitempty"`
	UserName string             `json:"userName,omitempty" bson:"userName" validate:"omitempty,min=5,max=25"`
	Password string             `json:"password,omitempty" bson:"password"`
	Email    string             `json:"email,omitempty" bson:"email" validate:"required,email"`
}

type Product

type Product struct {
	ID          primitive.ObjectID `bson:"_id" json:"id,omitempty"`
	PictureName string             `json:"pictureName" bson:"pictureName"`
	Name        string             `json:"name" bson:"name"`
	Price       float32            `json:"price" bson:"price"`
}

type ProductRequest

type ProductRequest struct {
	CategoryIdHex string `json:"category"`
	StartIndex    uint32 `json:"startIndex"`
	Search        string `json:"search"`
	SortBy        string `json:"sortBy"`
	MinPrice      uint32 `json:"minPrice"`
	MaxPrice      uint32 `json:"maxPrice"`
}

func (*ProductRequest) RequestTOMongoDbOption

func (m *ProductRequest) RequestTOMongoDbOption(offset int64) *options.FindOptions

type User

type User struct {
	ID       primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	UserName string             `json:"userName,omitempty" bson:"userName" validate:"omitempty,min=5,max=25"`
	Password string             `json:"password,omitempty" bson:"password"`
	Email    string             `json:"email,omitempty" bson:"email" validate:"required,email"`
}

type UserLoginResponse

type UserLoginResponse struct {
	Token        string `json:"token"`
	RefreshToken string `json:"refreshToken"`
	UserName     string `json:"userName,omitempty"`
	Email        string `json:"email,omitempty"`
}

func UserLoginResponseFromUser

func UserLoginResponseFromUser(user *User) *UserLoginResponse

Jump to

Keyboard shortcuts

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