feat: creat main products query
This commit is contained in:
18
app/model/model.go
Normal file
18
app/model/model.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Model struct {
|
||||
ID uint `gorm:"primarykey;autoIncrement" swaggerignore:"true" json:"id,omitempty" hidden:"true"`
|
||||
CreatedAt time.Time `gorm:"not null;autoCreateTime" swaggerignore:"true" json:"-"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime" swaggerignore:"true" json:"-"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" swaggerignore:"true" json:"-"`
|
||||
}
|
||||
|
||||
// Makes all objects embedding db.Model implementators of ModelWithID interface
|
||||
func (m Model) ModelWithID() {
|
||||
}
|
||||
Reference in New Issue
Block a user