Documentation ¶
Index ¶
- type Potato
- func (p *Potato) DeleteAPotato(db *gorm.DB, pid uint64) (int64, error)
- func (p *Potato) FindAllPotatoes(db *gorm.DB) (*[]Potato, error)
- func (p *Potato) FindPotatoByID(db *gorm.DB, pid uint64) (*Potato, error)
- func (p *Potato) Prepare()
- func (p *Potato) SavePotato(db *gorm.DB) (*Potato, error)
- func (p *Potato) UpdateAPotato(db *gorm.DB) (*Potato, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Potato ¶
type Potato struct { ID uint64 `gorm:"primary_key;auto_increment" json:"id"` Name string `gorm:"size:255;not null;unique" json:"name"` Description string `gorm:"size:255;not null;" json:"description"` CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"` UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"` }
func (*Potato) DeleteAPotato ¶
func (*Potato) FindPotatoByID ¶
Click to show internal directories.
Click to hide internal directories.