Discover Packages
github.com/mhmdryhn/gocrud
models
package
Version:
v0.0.0-...-0296064
Opens a new window with list of versions in this module.
Published: Jun 16, 2019
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Author struct {
gorm .Model
Name string `gorm:"type:varchar(128);not null"`
Email string `gorm:"type:varchar(128);unique;not null"`
Phone string `gorm:"type:varchar(32)"`
Age float64
Address string `gorm:"type:varchar(256)"`
}
func (author Author ) ToSlice() []interface{}
type Book struct {
gorm .Model
Name string `gorm:"type:varchar(128);not null"`
ISBN string `gorm:"type:varchar(64);unique;not null"`
Author Author `gorm:"foreignkey:Author_id"`
Author_id uint
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.