package model

import (
	"github.com/lib/pq"
	"time"
)

type Store struct {
	Id                   int64         `gorm:"column=id;PRIMARY" json:"id"`
	Name                 string        `json:"name"`
	UserId               int64         `json:"user_id"`
	Image                string        `json:"image"`
	Description          string        `json:"description"`
	Status               int           `json:"status"`
	Rating               float64       `json:"rating"`
	ApartmentId          int64         `json:"apartment_id"`
	ApartmentHouseNumber string        `json:"apartment_house_number"`
	PaymentAcceptCash    bool          `json:"payment_accept_cash"`
	Payment              string        `json:"payment"`
	Keywords             string        `json:"keywords"`
	Category             pq.Int64Array `gorm:"type:integer[]" json:"-"`
	TotalProducts        int64         `json:"total_products"`
	CreatedAt            *time.Time    `gorm:"column=created_at;autoCreateTime" json:"created_at"`
	UpdatedAt            *time.Time    `gorm:"column=updated_at;autoUpdateTime" json:"updated_at"`
}
