entities

package
v0.0.0-...-da3856f Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableUsers string = "users"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	Id         uint64         `json:"id" gorm:"primaryKey"`
	Name       string         `json:"name"`
	Email      string         `json:"email"`
	Password   string         `json:"password,omitempty"`
	CreatedAt  time.Time      `json:"created_at"`
	ModifiedAt *time.Time     `json:"modified_at,omitempty"`
	DeletedAt  gorm.DeletedAt `json:"deleted_at,omitempty"`
}

User

func NewUserEntityStub

func NewUserEntityStub(fkr *faker.Faker) *User

func (*User) BeforeCreate

func (u *User) BeforeCreate(tx *gorm.DB) (err error)

func (*User) BeforeUpdate

func (u *User) BeforeUpdate(tx *gorm.DB) (err error)

func (User) TableName

func (User) TableName() string

TableName overrides

Jump to

Keyboard shortcuts

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