models

package
v0.0.0-...-3220a8e Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contact

type Contact struct {
	ContactID      int    `gorm:"primary_key"`
	ContactName    string `gorm:"type:varchar(50)”`
	ContactAddress string `gorm:"type:varchar(500)”`
	ContactEmail   string `gorm:"type:varchar(50)”`
}

Contact ...

func (*Contact) Validate

func (c *Contact) Validate() (err error)

Validate contact model

type Customer

type Customer struct {
	CustomerID   int       `gorm:"primary_key"`
	CustomerName int       `gorm:"type:varchar(50)”`
	Contacts     []Contact `gorm:"ForeignKey:CustomerId"`
}

Customer ...

Jump to

Keyboard shortcuts

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