domain

package
v0.0.0-...-bc169e4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADMIN UserRole = iota + 1
	CUSTOMER
	COMMITTEE

	USER_COLLECTION string = "users"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponse

type AuthResponse struct {
	AccessToken string
}

type CacheItem

type CacheItem struct {
	Key   string
	Value string
	Exp   int32
}

type ChangePasswordRequest

type ChangePasswordRequest struct {
	OldPassword string
	NewPassword string
}

type Profile

type Profile struct {
	ID         primitive.ObjectID `bson:"_id"`
	CustomerID *string            `bson:"customer_id"`
	Name       string             `bson:"name"`
	Email      string             `bson:"email"`
	Password   string             `bson:"password"`
	CreatedAt  int64              `bson:"created_at"`
	UpdatedAt  int64              `bson:"updated_at"`
	DeletedAt  int64              `bson:"deleted_at"`
}

type UpdateProfile

type UpdateProfile struct {
	Name      string `bson:"name,omitempty"`
	Password  string `bson:"password,omitempty"`
	UpdatedAt int64  `bson:"updated_at,omitempty"`
	DeletedAt int64  `bson:"deleted_at,omitempty"`
}

type User

type User struct {
	ID        primitive.ObjectID `bson:"_id"`
	Name      string             `bson:"name"`
	Email     string             `bson:"email"`
	Password  string             `bson:"password"`
	Note      *string            `bson:"note"`
	CreatedAt int64              `bson:"created_at"`
	UpdatedAt int64              `bson:"updated_at"`
	DeletedAt int64              `bson:"deleted_at"`
}

type UserRole

type UserRole int8

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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