model

package
v0.0.0-...-d6791e1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	*base.Model

	Email       string      `db:"email" json:"email"`
	Password    string      `db:"password" json:"password"`
	Fullname    string      `db:"fullname" json:"fullname"`
	PhoneNumber string      `db:"phone_number" json:"phoneNumber,omitempty"`
	Address     UserAddress `db:"address" json:"address,omitempty"`
	Role        string      `db:"role" json:"role" default:"MEMBER"`
}

type UserAddress

type UserAddress struct {
	Street   string `db:"street" json:"street"`
	City     string `db:"city" json:"city"`
	Province string `db:"province" json:"province"`
	Country  string `db:"country" json:"country"`
}

func (*UserAddress) Scan

func (ud *UserAddress) Scan(value any) error

func (UserAddress) Value

func (ud UserAddress) Value() (driver.Value, error)

type UserRoleMapping

type UserRoleMapping struct {
	*base.JunctionModel

	UserId string `db:"user_id" json:"userId"`
	RoleId string `db:"role_id" json:"roleId"`
}

Jump to

Keyboard shortcuts

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