24 lines
647 B
Go
24 lines
647 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type ProductDB struct {
|
|
ID int64 `gorm:"primaryKey;column:id"`
|
|
SiteID int64 `gorm:"column:site_id"`
|
|
PartnerID int64 `gorm:"column:partner_id"`
|
|
Name string `gorm:"column:name"`
|
|
Description string `gorm:"column:description"`
|
|
Price float64 `gorm:"column:price"`
|
|
Type string `gorm:"column:type"`
|
|
Status string `gorm:"column:status"`
|
|
CreatedAt time.Time `gorm:"column:created_at"`
|
|
UpdatedAt time.Time `gorm:"column:updated_at"`
|
|
Image string `gorm:"column:image"`
|
|
}
|
|
|
|
func (ProductDB) TableName() string {
|
|
return "products"
|
|
}
|