entities

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserTypeRegular = "regular_user"
	UserTypePremium = "premium_user"
)

Variables

View Source
var (
	ErrInvalidLockOpt = errors.New("can't do lock with multiple type")
)

Functions

This section is empty.

Types

type CreateUser

type CreateUser struct {
	FullName    string
	PhoneNumber string
	UserType    string
	IsActive    bool
	CreatedAt   time.Time
	CreatedBy   string
}

type LockingOpt

type LockingOpt struct {
	PessimisticLocking bool
}

type UpdateUserStatus

type UpdateUserStatus struct {
	UserID    int64
	IsActive  bool
	UpdatedAt time.Time
	UpdatedBy string
}

func NewUpdateUserStatus

func NewUpdateUserStatus(payload UpdateUserStatus) UpdateUserStatus

type UpdateUsers

type UpdateUsers struct {
	UserID      int64
	Fullname    string
	PhoneNumber string
	UserType    string
	UpdatedAt   time.Time
	UpdatedBy   string
}

func NewUpdateUsers

func NewUpdateUsers(data UpdateUsers) UpdateUsers

type Users

type Users struct {
	UserID      int64
	Fullname    string
	PhoneNumber string
	UserType    string
	IsActive    bool
	CreatedAt   time.Time
	CreatedBy   string
	UpdatedAt   time.Time
	UpdatedBy   string
}

func NewCreateUser

func NewCreateUser(data CreateUser) Users

Jump to

Keyboard shortcuts

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