sql

package
v0.0.0-...-a91912b Latest Latest
Warning

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

Go to latest
Published: Aug 8, 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 Employee

type Employee struct {
	// Migrated Fields
	ID        uint   `gorm:"primaryKey"`
	XID       string `gorm:"column:xid"`
	Name      string
	Email     string
	Address   *string
	Age       *int
	Birthday  *time.Time
	UserID    uint
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`

	// Relations
	User User
}

func (*Employee) BeforeCreate

func (e *Employee) BeforeCreate(tx *gorm.DB) error

func (Employee) TableName

func (Employee) TableName() string

type User

type User struct {
	// Migrated Fields
	ID        uint   `gorm:"primaryKey"`
	XID       string `gorm:"column:xid"`
	Name      string
	Email     string
	Password  string
	Role      constant.UserRole
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (*User) BeforeCreate

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

func (User) TableName

func (User) TableName() string

Jump to

Keyboard shortcuts

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