forked from ebhomengo/niki
32 lines
659 B
Go
32 lines
659 B
Go
package product
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
type Product struct {
|
|
ID uint `json:"id"`
|
|
Name string `json:"name"`
|
|
Slug string `json:"slug"`
|
|
Description string `json:"description"`
|
|
Price float64 `json:"price"`
|
|
Stock int `json:"stock"`
|
|
IsActive bool `json:"is_active"`
|
|
Features string `json:"features"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
DeletedAt sql.NullTime `json:"-"`
|
|
}
|
|
|
|
type ProductImage struct {
|
|
ID uint
|
|
ProductID uint
|
|
ImagePath string
|
|
IsPrimary bool
|
|
}
|
|
|
|
type CategoryProduct struct {
|
|
CategoryID uint
|
|
ProductID uint
|
|
}
|