models

package
v0.0.0-...-bd1f57a Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 4 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 {
	ID        uuid.UUID `gorm:"primaryKey;type:uuid"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *sql.NullTime `gorm:"index"`
}

type Items

type Items struct {
	BaseModel
	ItemName string     `json:"item_name"`
	UserID   *uuid.UUID `json:"user_id"`
}

type Users

type Users struct {
	BaseModel
	Username string `json:"username" gorm:"unique"`
	FullName string `json:"full_name"`
	Password string `json:"-"`

	// Foreign Keys
	Items []Items `json:"items"`
}

func (*Users) BeforeCreate

func (u *Users) BeforeCreate(_ *gorm.DB) error

Jump to

Keyboard shortcuts

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