models

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email added in v1.0.2

type Email struct {
	ID        string         `gorm:"primaryKey;Column:id;type:varchar(45)" json:"id"`
	CreatedAt time.Time      `gorm:"Column:created_at;type:timestamptz;not null" json:"createdAt"`
	UpdatedAt time.Time      `gorm:"Column:updated_at;type:timestamptz;not null" json:"updatedAt"`
	DeletedAt gorm.DeletedAt `gorm:"Column:deleted_at;type:timestamptz" json:"deletedAt"`
	UserID    string         `gorm:"Column:user_id;type:varchar(45);not null" json:"userId"`
	Email     string         `gorm:"Column:email;type:varchar(255);not null" json:"email"`
}

func (Email) TableName added in v1.0.2

func (Email) TableName() string

type User

type User struct {
	ID        string         `gorm:"primaryKey;Column:id;type:varchar(45)" json:"id"`
	CreatedAt time.Time      `gorm:"Column:created_at;type:timestamptz;not null" json:"createdAt"`
	UpdatedAt time.Time      `gorm:"Column:updated_at;type:timestamptz;not null" json:"updatedAt"`
	DeletedAt gorm.DeletedAt `gorm:"Column:deleted_at;type:timestamptz" json:"deletedAt"`
	Name      string         `gorm:"Column:name;type:varchar(255);not null" json:"name"`
	Emails    []Email        `gorm:"foreignKey:UserID;references:ID" json:"emails"`
}

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