user

package
v0.0.0-...-a9fa8a7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 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 AddressModel

type AddressModel struct {
	Id        primitive.ObjectID `json:"_id" bson:"_id,omitempty"`
	Name      string             `json:"name" bson:"name"`
	Phone     string             `json:"phone" bson:"phone"`
	Street    string             `json:"street" bson:"street"`
	City      string             `json:"city" bson:"city"`
	State     string             `json:"state" bson:"state"`
	Pincode   string             `json:"pincode" bson:"pincode"`
	Country   string             `json:"country" bson:"country"`
	CreatedAt time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time          `json:"updated_at" bson:"updated_at"`
}

type CreateUserAddressReq

type CreateUserAddressReq struct {
	Name    string `json:"name" form:"name" validate:"required,max=255"`
	Street  string `json:"street" form:"street" validate:"required,max=255"`
	City    string `json:"city" form:"city" validate:"required,max=255"`
	Phone   string `json:"phone" form:"phone" validate:"required,max=255"`
	Pincode string `json:"pincode" form:"pincode" validate:"required,max=255"`
	State   string `json:"state" form:"state" validate:"required,max=255"`
	Country string `json:"country" form:"country" validate:"required,max=255"`
}

type CreateUserReq

type CreateUserReq struct {
	Email    string `json:"email" form:"email" validate:"required,email,max=255"`
	Password string `json:"password" form:"password" validate:"required,max=32"`
	Username string `json:"username" form:"username" validate:"required,max=64"`
}

type CreateUserTransactionReq

type CreateUserTransactionReq struct {
	UserId    string  `json:"user_id" validate:"required,max=64"`
	Amount    float64 `json:"amount" validate:"required"`
	AddressId string  `json:"address_id" validate:"required"`
}

type ResetPasswordReq

type ResetPasswordReq struct {
	OldPassword string `json:"old_password" form:"old_password" validate:"required,max=32"`
	NewPassword string `json:"new_password" form:"new_password" validate:"required,max=32"`
}

type User

type User struct {
	Id           primitive.ObjectID `json:"_id" bson:"_id,omitempty"`
	Email        string             `json:"email" bson:"email"`
	Password     string             `json:"password" bson:"password"`
	Username     string             `json:"username" bson:"username"`
	WalletAmount float64            `json:"wallet_amount" bson:"wallet_amount"`
	OTP          string             `json:"otp" bson:"otp"`
	OtpExpiredAt time.Time          `json:"otp_expired_at" bson:"otp_expired_at"`
	CreatedAt    time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt    time.Time          `json:"updated_at" bson:"updated_at"`
	UserRoles    []UserRole         `bson:"user_roles"`
	IsBlocked    bool               `json:"is_blocked" bson:"is_blocked"`
	WishList     []string           `json:"wishlist" bson:"wishlist"`
	Addressess   []AddressModel     `json:"addressess" bson:"addressess"`
}

type UserClaims

type UserClaims struct {
	Id       string `json:"id"`
	RoleCode int    `json:"role_code"`
}

type UserProfile

type UserProfile struct {
	Id           string    `json:"_id"`
	Email        string    `json:"email"`
	Username     string    `json:"username"`
	WalletAmount float64   `json:"wallet_amount"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	IsBlocked    bool      `json:"is_blocked"`
}

type UserProfileBson

type UserProfileBson struct {
	Id           primitive.ObjectID `json:"_id" bson:"_id,omitempty"`
	Email        string             `json:"email" bson:"email"`
	Username     string             `json:"username" bson:"username"`
	WalletAmount float64            `json:"wallet_amount" bson:"wallet_amount"`
	CreatedAt    time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt    time.Time          `json:"updated_at" bson:"updated_at"`
	IsBlocked    bool               `json:"is_blocked" bson:"is_blocked"`
}

type UserRole

type UserRole struct {
	RoleTitle string `json:"role_title" bson:"role_title"`
	RoleCode  int    `json:"role_code" bson:"role_code"`
}

type UserTransaction

type UserTransaction struct {
	Id           primitive.ObjectID `bson:"_id,omitempty"`
	UserId       string             `bson:"user_id"`
	Amount       float64            `bson:"amount"`
	CreatedAt    time.Time          `bson:"created_at"`
	AddressId    string             `bson:"address_id"`
	OrderId      string             `bson:"order_id"`
	OrderSuccess string             `bson:"order_success"`
	UpdatedAt    time.Time          `bson:"updated_at"`
}

type UserWalletAccount

type UserWalletAccount struct {
	UserId  string  `json:"user_id" bson:"user_id"`
	Balance float64 `json:"balance" bson:"balance"`
}

type UserWishList

type UserWishList struct {
	UserId   string   `json:"user_id" bson:"user_id"`
	WishList []string `json:"wishlist" bson:"wishlist"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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