models

package
v0.0.0-...-34ec42c Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ObjectID  primitive.ObjectID `bson:"_id,omitempty"`
	UUID      string             `bson:"uuid,omitempty"`
	XID       string             `bson:"xid,omitempty"`
	KeyID     string             `bson:"keyId,omitempty"`
	Metadata  map[string]any     `bson:"metadata,omitempty"`
	CreatedAt time.Time          `bson:"createdAt"`
	UpdatedAt time.Time          `bson:"updatedAt"`
	DeletedAt *time.Time         `bson:"deletedAt,omitempty"`
}

BaseModel represents the base model

func (*BaseModel) String

func (b *BaseModel) String() string

type UserModel

type UserModel struct {
	BaseModel    BaseModel `bson:"inline"`
	Name         string    `bson:"name"`
	Email        string    `bson:"email"`
	Skills       []string  `bson:"skills"`
	ImageUrl     string    `bson:"imageUrl"`
	JobTitle     string    `bson:"jobTitle"`
	PasswordHash string    `bson:"passwordHash"`
}

UserModel represents the model of a user as stored in a database

func (*UserModel) String

func (u *UserModel) String() string

type UserVerificationModel

type UserVerificationModel struct {
	BaseModel  BaseModel `bson:"inline"`
	Code       string    `bson:"code"`
	UserId     string    `bson:"user_id"`
	IsVerified bool      `bson:"is_verified"`
}

UserVerificationModel represents the model of a user verification as stored in a database

func (*UserVerificationModel) String

func (u *UserVerificationModel) String() string

Jump to

Keyboard shortcuts

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