entities

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Computer

type Computer struct {
	ID                 uuid.UUID `gorm:"type:uuid;primary_key;"`
	Name               string
	ComputersLanguages []ComputersLanguages `gorm:"foreignKey:ComputerID;references:ID"`
}

type ComputersLanguages

type ComputersLanguages struct {
	ID         uuid.UUID `gorm:"type:uuid;primary_key;"`
	ComputerID uuid.UUID `sql:"type:uuid REFERENCES computers(id) ON DELETE CASCADE"`
	LanguageID uuid.UUID `sql:"type:uuid REFERENCES languages(id) ON DELETE CASCADE"`
	Language   Language  `gorm:"foreignKey:LanguageID;references:ID"`
	Computer   Computer  `gorm:"foreignKey:ComputerID;references:ID"`
}

type CreditCard

type CreditCard struct {
	ID     uuid.UUID `gorm:"type:uuid;primary_key;"`
	Name   string
	UserID uuid.UUID `sql:"type:uuid REFERENCES users(id) ON DELETE CASCADE"`
	User   User      `gorm:"foreignKey:UserID;references:ID"`
}

type Language

type Language struct {
	ID                 uuid.UUID `gorm:"type:uuid;primary_key;"`
	Name               string
	ComputersLanguages []ComputersLanguages `gorm:"foreignkey:ComputerID;association_foreignkey:ID"`
}

type Pet

type Pet struct {
	ID    uuid.UUID `gorm:"type:uuid;primary_key;"`
	Name  string
	ZooID uuid.UUID `sql:"type:uuid REFERENCES zoos(id) ON DELETE CASCADE"`
}

type Test

type Test struct {
	ID        uuid.UUID `json:"id" gorm:"primary_key; Column:id"`
	CreatedAt time.Time `json:"createdAt" gorm:"Column:createdAt"`
	UpdatedAt time.Time `json:"updatedAt" gorm:"Column:updatedAt"`
	Name      string    `json:"name" gorm:"Column:name"`
}

func (*Test) TableName

func (t *Test) TableName() string

func (*Test) ToBytes

func (t *Test) ToBytes() []byte

type User

type User struct {
	ID   uuid.UUID `gorm:"type:uuid;primary_key;"`
	Name string
}

type Zoo

type Zoo struct {
	ID   uuid.UUID `gorm:"type:uuid;primary_key;"`
	Pet  []Pet     `gorm:"foreignKey:ZooID;references:ID"`
	Name string
}

Jump to

Keyboard shortcuts

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