package
Version:
v0.0.0-...-ac266e4
Opens a new window with list of versions in this module.
Published: Sep 26, 2023
License: Unlicense
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Product struct {
ID uint `gorm:"primaryKey"`
Brand string `gorm:"not null;type:varchar(100)"`
Name string `gorm:"not null;type:varchar(100)"`
UserID uint
CreatedAt time.Time
UpdatedAt time.Time
}
type Student struct {
ID uint `gorm:"-"`
IDLain uint `gorm:"primaryKey;column:id_lain"`
Email string `gorm:"not null;unique;type:varchar(100)"`
Products []Product `gorm:"foreignKey:UserID;association_foreignkey:IDLain"`
CreatedAt time.Time
UpdatedAt time.Time
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.