Documentation ¶
Overview ¶
Package models contains generated code for schema 'public'.
Index ¶
- func Errorf(s string, v ...interface{})
- func Logf(s string, v ...interface{})
- func SetErrorLogger(logger interface{})
- func SetLogger(logger interface{})
- type AddressKind
- type Archetype
- func (a *Archetype) Delete(ctx context.Context, db DB) error
- func (a *Archetype) Deleted() bool
- func (a *Archetype) Exists() bool
- func (a *Archetype) Insert(ctx context.Context, db DB) error
- func (a *Archetype) Save(ctx context.Context, db DB) error
- func (a *Archetype) Update(ctx context.Context, db DB) error
- func (a *Archetype) Upsert(ctx context.Context, db DB) error
- type ArchetypeCategory
- func (ac *ArchetypeCategory) Archetype(ctx context.Context, db DB) (*Archetype, error)
- func (ac *ArchetypeCategory) Category(ctx context.Context, db DB) (*Category, error)
- func (ac *ArchetypeCategory) Delete(ctx context.Context, db DB) error
- func (ac *ArchetypeCategory) Deleted() bool
- func (ac *ArchetypeCategory) Exists() bool
- func (ac *ArchetypeCategory) Insert(ctx context.Context, db DB) error
- type ArchetypeOption
- func (ao *ArchetypeOption) Archetype(ctx context.Context, db DB) (*Archetype, error)
- func (ao *ArchetypeOption) Delete(ctx context.Context, db DB) error
- func (ao *ArchetypeOption) Deleted() bool
- func (ao *ArchetypeOption) Exists() bool
- func (ao *ArchetypeOption) Insert(ctx context.Context, db DB) error
- func (ao *ArchetypeOption) Option(ctx context.Context, db DB) (*Option, error)
- type ArchetypeProperty
- func (ap *ArchetypeProperty) Archetype(ctx context.Context, db DB) (*Archetype, error)
- func (ap *ArchetypeProperty) Delete(ctx context.Context, db DB) error
- func (ap *ArchetypeProperty) Deleted() bool
- func (ap *ArchetypeProperty) Exists() bool
- func (ap *ArchetypeProperty) Insert(ctx context.Context, db DB) error
- func (ap *ArchetypeProperty) Property(ctx context.Context, db DB) (*Property, error)
- type Asset
- func AssetByID(ctx context.Context, db DB, id int64) (*Asset, error)
- func AssetByProductID(ctx context.Context, db DB, productID int64) ([]*Asset, error)
- func AssetByProductIDKind(ctx context.Context, db DB, productID int64, kind int) ([]*Asset, error)
- func AssetBySizes(ctx context.Context, db DB, sizes []byte) ([]*Asset, error)
- func AssetByStoreIDName(ctx context.Context, db DB, storeID int64, name string) (*Asset, error)
- func AssetByVariantID(ctx context.Context, db DB, variantID int64) ([]*Asset, error)
- func (a *Asset) Delete(ctx context.Context, db DB) error
- func (a *Asset) Deleted() bool
- func (a *Asset) Exists() bool
- func (a *Asset) Insert(ctx context.Context, db DB) error
- func (a *Asset) Save(ctx context.Context, db DB) error
- func (a *Asset) Update(ctx context.Context, db DB) error
- func (a *Asset) Upsert(ctx context.Context, db DB) error
- type Cart
- func (c *Cart) Customer(ctx context.Context, db DB) (*Customer, error)
- func (c *Cart) Delete(ctx context.Context, db DB) error
- func (c *Cart) Deleted() bool
- func (c *Cart) Exists() bool
- func (c *Cart) Insert(ctx context.Context, db DB) error
- func (c *Cart) Save(ctx context.Context, db DB) error
- func (c *Cart) Store(ctx context.Context, db DB) (*Store, error)
- func (c *Cart) Update(ctx context.Context, db DB) error
- func (c *Cart) Upsert(ctx context.Context, db DB) error
- type CartItem
- func CartItemByAbandonedAt(ctx context.Context, db DB, abandonedAt sql.NullTime) ([]*CartItem, error)
- func CartItemByCartID(ctx context.Context, db DB, cartID uuid.UUID) ([]*CartItem, error)
- func CartItemByCartIDSku(ctx context.Context, db DB, cartID uuid.UUID, sku string) (*CartItem, error)
- func CartItemBySku(ctx context.Context, db DB, sku string) ([]*CartItem, error)
- func (ci *CartItem) Cart(ctx context.Context, db DB) (*Cart, error)
- func (ci *CartItem) Delete(ctx context.Context, db DB) error
- func (ci *CartItem) Deleted() bool
- func (ci *CartItem) Exists() bool
- func (ci *CartItem) Insert(ctx context.Context, db DB) error
- func (ci *CartItem) Save(ctx context.Context, db DB) error
- func (ci *CartItem) Update(ctx context.Context, db DB) error
- func (ci *CartItem) Upsert(ctx context.Context, db DB) error
- func (ci *CartItem) Variant(ctx context.Context, db DB) (*Variant, error)
- type CartStatus
- type Category
- func CategoryByDepth(ctx context.Context, db DB, depth sql.NullInt64) ([]*Category, error)
- func CategoryByID(ctx context.Context, db DB, id int64) (*Category, error)
- func CategoryByLft(ctx context.Context, db DB, lft sql.NullInt64) ([]*Category, error)
- func CategoryByParentID(ctx context.Context, db DB, parentID sql.NullInt64) ([]*Category, error)
- func CategoryByRgt(ctx context.Context, db DB, rgt sql.NullInt64) ([]*Category, error)
- func CategoryByStoreID(ctx context.Context, db DB, storeID int64) ([]*Category, error)
- func CategoryByStoreIDSlug(ctx context.Context, db DB, storeID int64, slug string) (*Category, error)
- func (c *Category) Category(ctx context.Context, db DB) (*Category, error)
- func (c *Category) Delete(ctx context.Context, db DB) error
- func (c *Category) Deleted() bool
- func (c *Category) Exists() bool
- func (c *Category) Insert(ctx context.Context, db DB) error
- func (c *Category) Save(ctx context.Context, db DB) error
- func (c *Category) Update(ctx context.Context, db DB) error
- func (c *Category) Upsert(ctx context.Context, db DB) error
- type Customer
- func CustomerByEmail(ctx context.Context, db DB, email string) (*Customer, error)
- func CustomerByID(ctx context.Context, db DB, id int64) (*Customer, error)
- func CustomerByStoreID(ctx context.Context, db DB, storeID int64) ([]*Customer, error)
- func CustomerByStoreIDEmail(ctx context.Context, db DB, storeID int64, email string) (*Customer, error)
- func (c *Customer) Delete(ctx context.Context, db DB) error
- func (c *Customer) Deleted() bool
- func (c *Customer) Exists() bool
- func (c *Customer) Insert(ctx context.Context, db DB) error
- func (c *Customer) Save(ctx context.Context, db DB) error
- func (c *Customer) Update(ctx context.Context, db DB) error
- func (c *Customer) Upsert(ctx context.Context, db DB) error
- type CustomerAddress
- func CustomerAddressByCustomerIDKind(ctx context.Context, db DB, customerID int64, kind AddressKind) ([]*CustomerAddress, error)
- func CustomerAddressByID(ctx context.Context, db DB, id int64) (*CustomerAddress, error)
- func CustomerAddressByStoreID(ctx context.Context, db DB, storeID int64) ([]*CustomerAddress, error)
- func (ca *CustomerAddress) Delete(ctx context.Context, db DB) error
- func (ca *CustomerAddress) Deleted() bool
- func (ca *CustomerAddress) Exists() bool
- func (ca *CustomerAddress) Insert(ctx context.Context, db DB) error
- func (ca *CustomerAddress) Save(ctx context.Context, db DB) error
- func (ca *CustomerAddress) Update(ctx context.Context, db DB) error
- func (ca *CustomerAddress) Upsert(ctx context.Context, db DB) error
- type CustomerPasswordReset
- func CustomerPasswordResetByID(ctx context.Context, db DB, id int64) (*CustomerPasswordReset, error)
- func CustomerPasswordResetByStoreID(ctx context.Context, db DB, storeID int64) ([]*CustomerPasswordReset, error)
- func CustomerPasswordResetByToken(ctx context.Context, db DB, token string) (*CustomerPasswordReset, error)
- func (cpr *CustomerPasswordReset) Customer(ctx context.Context, db DB) (*Customer, error)
- func (cpr *CustomerPasswordReset) Delete(ctx context.Context, db DB) error
- func (cpr *CustomerPasswordReset) Deleted() bool
- func (cpr *CustomerPasswordReset) Exists() bool
- func (cpr *CustomerPasswordReset) Insert(ctx context.Context, db DB) error
- func (cpr *CustomerPasswordReset) Save(ctx context.Context, db DB) error
- func (cpr *CustomerPasswordReset) Update(ctx context.Context, db DB) error
- func (cpr *CustomerPasswordReset) Upsert(ctx context.Context, db DB) error
- type DB
- type ErrDecodeFailed
- type ErrInsertFailed
- type ErrInvalidAddressKind
- type ErrInvalidCartStatus
- type ErrInvalidTransactionKind
- type ErrUpdateFailed
- type ErrUpsertFailed
- type Error
- type InventoryBrand
- func (ib *InventoryBrand) Delete(ctx context.Context, db DB) error
- func (ib *InventoryBrand) Deleted() bool
- func (ib *InventoryBrand) Exists() bool
- func (ib *InventoryBrand) Insert(ctx context.Context, db DB) error
- func (ib *InventoryBrand) Save(ctx context.Context, db DB) error
- func (ib *InventoryBrand) Update(ctx context.Context, db DB) error
- func (ib *InventoryBrand) Upsert(ctx context.Context, db DB) error
- type InventoryItem
- func (ii *InventoryItem) Delete(ctx context.Context, db DB) error
- func (ii *InventoryItem) Deleted() bool
- func (ii *InventoryItem) Exists() bool
- func (ii *InventoryItem) Insert(ctx context.Context, db DB) error
- func (ii *InventoryItem) Save(ctx context.Context, db DB) error
- func (ii *InventoryItem) Update(ctx context.Context, db DB) error
- func (ii *InventoryItem) Upsert(ctx context.Context, db DB) error
- type InventoryStock
- func (is *InventoryStock) Delete(ctx context.Context, db DB) error
- func (is *InventoryStock) Deleted() bool
- func (is *InventoryStock) Exists() bool
- func (is *InventoryStock) Insert(ctx context.Context, db DB) error
- func (is *InventoryStock) Save(ctx context.Context, db DB) error
- func (is *InventoryStock) Update(ctx context.Context, db DB) error
- func (is *InventoryStock) Upsert(ctx context.Context, db DB) error
- type InventorySupplier
- func (is *InventorySupplier) Delete(ctx context.Context, db DB) error
- func (is *InventorySupplier) Deleted() bool
- func (is *InventorySupplier) Exists() bool
- func (is *InventorySupplier) Insert(ctx context.Context, db DB) error
- func (is *InventorySupplier) Save(ctx context.Context, db DB) error
- func (is *InventorySupplier) Update(ctx context.Context, db DB) error
- func (is *InventorySupplier) Upsert(ctx context.Context, db DB) error
- type NullAddressKind
- type NullCartStatus
- type NullTransactionKind
- type Option
- func (o *Option) Delete(ctx context.Context, db DB) error
- func (o *Option) Deleted() bool
- func (o *Option) Exists() bool
- func (o *Option) Insert(ctx context.Context, db DB) error
- func (o *Option) Save(ctx context.Context, db DB) error
- func (o *Option) Update(ctx context.Context, db DB) error
- func (o *Option) Upsert(ctx context.Context, db DB) error
- type OptionItem
- func (oi *OptionItem) Delete(ctx context.Context, db DB) error
- func (oi *OptionItem) Deleted() bool
- func (oi *OptionItem) Exists() bool
- func (oi *OptionItem) Insert(ctx context.Context, db DB) error
- func (oi *OptionItem) Option(ctx context.Context, db DB) (*Option, error)
- func (oi *OptionItem) Save(ctx context.Context, db DB) error
- func (oi *OptionItem) Update(ctx context.Context, db DB) error
- func (oi *OptionItem) Upsert(ctx context.Context, db DB) error
- type PaymentGateway
- func (pg *PaymentGateway) Delete(ctx context.Context, db DB) error
- func (pg *PaymentGateway) Deleted() bool
- func (pg *PaymentGateway) Exists() bool
- func (pg *PaymentGateway) Insert(ctx context.Context, db DB) error
- func (pg *PaymentGateway) Save(ctx context.Context, db DB) error
- func (pg *PaymentGateway) Update(ctx context.Context, db DB) error
- func (pg *PaymentGateway) Upsert(ctx context.Context, db DB) error
- type PaymentTransaction
- func PaymentTransactionByID(ctx context.Context, db DB, id int64) (*PaymentTransaction, error)
- func PaymentTransactionByKind(ctx context.Context, db DB, kind TransactionKind) ([]*PaymentTransaction, error)
- func PaymentTransactionByReferenceCode(ctx context.Context, db DB, referenceCode string) ([]*PaymentTransaction, error)
- func (pt *PaymentTransaction) Delete(ctx context.Context, db DB) error
- func (pt *PaymentTransaction) Deleted() bool
- func (pt *PaymentTransaction) Exists() bool
- func (pt *PaymentTransaction) Insert(ctx context.Context, db DB) error
- func (pt *PaymentTransaction) Save(ctx context.Context, db DB) error
- func (pt *PaymentTransaction) Update(ctx context.Context, db DB) error
- func (pt *PaymentTransaction) Upsert(ctx context.Context, db DB) error
- type PermissionGroup
- func (pg *PermissionGroup) Delete(ctx context.Context, db DB) error
- func (pg *PermissionGroup) Deleted() bool
- func (pg *PermissionGroup) Exists() bool
- func (pg *PermissionGroup) Insert(ctx context.Context, db DB) error
- func (pg *PermissionGroup) Save(ctx context.Context, db DB) error
- func (pg *PermissionGroup) Update(ctx context.Context, db DB) error
- func (pg *PermissionGroup) Upsert(ctx context.Context, db DB) error
- type Price
- func (p *Price) Delete(ctx context.Context, db DB) error
- func (p *Price) Deleted() bool
- func (p *Price) Exists() bool
- func (p *Price) Insert(ctx context.Context, db DB) error
- func (p *Price) Save(ctx context.Context, db DB) error
- func (p *Price) Update(ctx context.Context, db DB) error
- func (p *Price) Upsert(ctx context.Context, db DB) error
- func (p *Price) Variant(ctx context.Context, db DB) (*Variant, error)
- type Product
- func (p *Product) Delete(ctx context.Context, db DB) error
- func (p *Product) Deleted() bool
- func (p *Product) Exists() bool
- func (p *Product) Insert(ctx context.Context, db DB) error
- func (p *Product) Save(ctx context.Context, db DB) error
- func (p *Product) Update(ctx context.Context, db DB) error
- func (p *Product) Upsert(ctx context.Context, db DB) error
- type ProductCategory
- func (pc *ProductCategory) Category(ctx context.Context, db DB) (*Category, error)
- func (pc *ProductCategory) Delete(ctx context.Context, db DB) error
- func (pc *ProductCategory) Deleted() bool
- func (pc *ProductCategory) Exists() bool
- func (pc *ProductCategory) Insert(ctx context.Context, db DB) error
- func (pc *ProductCategory) Product(ctx context.Context, db DB) (*Product, error)
- type ProductOption
- func (po *ProductOption) Delete(ctx context.Context, db DB) error
- func (po *ProductOption) Deleted() bool
- func (po *ProductOption) Exists() bool
- func (po *ProductOption) Insert(ctx context.Context, db DB) error
- func (po *ProductOption) Option(ctx context.Context, db DB) (*Option, error)
- func (po *ProductOption) Product(ctx context.Context, db DB) (*Product, error)
- type ProductProperty
- func (pp *ProductProperty) Delete(ctx context.Context, db DB) error
- func (pp *ProductProperty) Deleted() bool
- func (pp *ProductProperty) Exists() bool
- func (pp *ProductProperty) Insert(ctx context.Context, db DB) error
- func (pp *ProductProperty) Product(ctx context.Context, db DB) (*Product, error)
- func (pp *ProductProperty) Property(ctx context.Context, db DB) (*Property, error)
- type Property
- func (p *Property) Delete(ctx context.Context, db DB) error
- func (p *Property) Deleted() bool
- func (p *Property) Exists() bool
- func (p *Property) Insert(ctx context.Context, db DB) error
- func (p *Property) Save(ctx context.Context, db DB) error
- func (p *Property) Update(ctx context.Context, db DB) error
- func (p *Property) Upsert(ctx context.Context, db DB) error
- type Store
- func (s *Store) Delete(ctx context.Context, db DB) error
- func (s *Store) Deleted() bool
- func (s *Store) Exists() bool
- func (s *Store) Insert(ctx context.Context, db DB) error
- func (s *Store) Save(ctx context.Context, db DB) error
- func (s *Store) Update(ctx context.Context, db DB) error
- func (s *Store) Upsert(ctx context.Context, db DB) error
- type StoreAddress
- func (sa *StoreAddress) Delete(ctx context.Context, db DB) error
- func (sa *StoreAddress) Deleted() bool
- func (sa *StoreAddress) Exists() bool
- func (sa *StoreAddress) Insert(ctx context.Context, db DB) error
- func (sa *StoreAddress) Save(ctx context.Context, db DB) error
- func (sa *StoreAddress) Update(ctx context.Context, db DB) error
- func (sa *StoreAddress) Upsert(ctx context.Context, db DB) error
- type StoreProduct
- func (sp *StoreProduct) Delete(ctx context.Context, db DB) error
- func (sp *StoreProduct) Deleted() bool
- func (sp *StoreProduct) Exists() bool
- func (sp *StoreProduct) Insert(ctx context.Context, db DB) error
- func (sp *StoreProduct) Product(ctx context.Context, db DB) (*Product, error)
- func (sp *StoreProduct) Store(ctx context.Context, db DB) (*Store, error)
- type StoreSetting
- func (ss *StoreSetting) Delete(ctx context.Context, db DB) error
- func (ss *StoreSetting) Deleted() bool
- func (ss *StoreSetting) Exists() bool
- func (ss *StoreSetting) Insert(ctx context.Context, db DB) error
- func (ss *StoreSetting) Save(ctx context.Context, db DB) error
- func (ss *StoreSetting) Store(ctx context.Context, db DB) (*Store, error)
- func (ss *StoreSetting) Update(ctx context.Context, db DB) error
- func (ss *StoreSetting) Upsert(ctx context.Context, db DB) error
- type StringSlice
- type TransactionKind
- type User
- func (u *User) Delete(ctx context.Context, db DB) error
- func (u *User) Deleted() bool
- func (u *User) Exists() bool
- func (u *User) Insert(ctx context.Context, db DB) error
- func (u *User) Save(ctx context.Context, db DB) error
- func (u *User) Update(ctx context.Context, db DB) error
- func (u *User) Upsert(ctx context.Context, db DB) error
- type UsersPasswordReset
- func (upr *UsersPasswordReset) Delete(ctx context.Context, db DB) error
- func (upr *UsersPasswordReset) Deleted() bool
- func (upr *UsersPasswordReset) Exists() bool
- func (upr *UsersPasswordReset) Insert(ctx context.Context, db DB) error
- func (upr *UsersPasswordReset) Save(ctx context.Context, db DB) error
- func (upr *UsersPasswordReset) Update(ctx context.Context, db DB) error
- func (upr *UsersPasswordReset) Upsert(ctx context.Context, db DB) error
- func (upr *UsersPasswordReset) User(ctx context.Context, db DB) (*User, error)
- type UsersPermissionGroup
- func (upg *UsersPermissionGroup) Delete(ctx context.Context, db DB) error
- func (upg *UsersPermissionGroup) Deleted() bool
- func (upg *UsersPermissionGroup) Exists() bool
- func (upg *UsersPermissionGroup) Insert(ctx context.Context, db DB) error
- func (upg *UsersPermissionGroup) PermissionGroup(ctx context.Context, db DB) (*PermissionGroup, error)
- func (upg *UsersPermissionGroup) User(ctx context.Context, db DB) (*User, error)
- type Variant
- func VariantByID(ctx context.Context, db DB, id int64) (*Variant, error)
- func VariantByIsDefault(ctx context.Context, db DB, isDefault bool) ([]*Variant, error)
- func VariantByProductID(ctx context.Context, db DB, productID int64) ([]*Variant, error)
- func VariantBySku(ctx context.Context, db DB, sku string) (*Variant, error)
- func (v *Variant) Delete(ctx context.Context, db DB) error
- func (v *Variant) Deleted() bool
- func (v *Variant) Exists() bool
- func (v *Variant) Insert(ctx context.Context, db DB) error
- func (v *Variant) Product(ctx context.Context, db DB) (*Product, error)
- func (v *Variant) Save(ctx context.Context, db DB) error
- func (v *Variant) Update(ctx context.Context, db DB) error
- func (v *Variant) Upsert(ctx context.Context, db DB) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorf ¶
func Errorf(s string, v ...interface{})
Errorf logs an error message using the package error logger.
func SetErrorLogger ¶
func SetErrorLogger(logger interface{})
SetErrorLogger sets the package error logger. Valid logger types:
io.Writer func(string, ...interface{}) (int, error) // fmt.Printf func(string, ...interface{}) // log.Printf
Types ¶
type AddressKind ¶
type AddressKind uint16
AddressKind is the 'address_kind' enum type from schema 'public'.
const ( // AddressKindBilling is the 'billing' address_kind. AddressKindBilling AddressKind = 1 // AddressKindShipping is the 'shipping' address_kind. AddressKindShipping AddressKind = 2 // AddressKindMailing is the 'mailing' address_kind. AddressKindMailing AddressKind = 3 )
AddressKind values.
func (AddressKind) MarshalText ¶
func (ak AddressKind) MarshalText() ([]byte, error)
MarshalText marshals AddressKind into text.
func (*AddressKind) Scan ¶
func (ak *AddressKind) Scan(v interface{}) error
Scan satisfies the sql.Scanner interface.
func (AddressKind) String ¶
func (ak AddressKind) String() string
String satisfies the fmt.Stringer interface.
func (*AddressKind) UnmarshalText ¶
func (ak *AddressKind) UnmarshalText(buf []byte) error
UnmarshalText unmarshals AddressKind from text.
type Archetype ¶
type Archetype struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Name string `json:"name" db:"name"` // name // contains filtered or unexported fields }
Archetype represents a row from 'public.archetype'.
func ArchetypeByID ¶
ArchetypeByID retrieves a row from 'public.archetype' as a Archetype.
Generated from index 'archetype_pkey'.
func ArchetypeByName ¶
ArchetypeByName retrieves a row from 'public.archetype' as a Archetype.
Generated from index 'archetype_name_key'.
func (*Archetype) Deleted ¶
Deleted returns true when the Archetype has been marked for deletion from the database.
type ArchetypeCategory ¶
type ArchetypeCategory struct { ArchetypeID int64 `json:"archetype_id" db:"archetype_id"` // archetype_id CategoryID int64 `json:"category_id" db:"category_id"` // category_id // contains filtered or unexported fields }
ArchetypeCategory represents a row from 'public.archetype_category'.
func ArchetypeCategoryByArchetypeIDCategoryID ¶
func ArchetypeCategoryByArchetypeIDCategoryID(ctx context.Context, db DB, archetypeID, categoryID int64) (*ArchetypeCategory, error)
ArchetypeCategoryByArchetypeIDCategoryID retrieves a row from 'public.archetype_category' as a ArchetypeCategory.
Generated from index 'archetype_category_pkey'.
func (*ArchetypeCategory) Archetype ¶
Archetype returns the Archetype associated with the ArchetypeCategory's (ArchetypeID).
Generated from foreign key 'archetype_category_archetype_id_fkey'.
func (*ArchetypeCategory) Category ¶
Category returns the Category associated with the ArchetypeCategory's (CategoryID).
Generated from foreign key 'archetype_category_category_id_fkey'.
func (*ArchetypeCategory) Delete ¶
func (ac *ArchetypeCategory) Delete(ctx context.Context, db DB) error
Delete deletes the ArchetypeCategory from the database.
func (*ArchetypeCategory) Deleted ¶
func (ac *ArchetypeCategory) Deleted() bool
Deleted returns true when the ArchetypeCategory has been marked for deletion from the database.
func (*ArchetypeCategory) Exists ¶
func (ac *ArchetypeCategory) Exists() bool
Exists returns true when the ArchetypeCategory exists in the database.
type ArchetypeOption ¶
type ArchetypeOption struct { ArchetypeID int64 `json:"archetype_id" db:"archetype_id"` // archetype_id OptionID int64 `json:"option_id" db:"option_id"` // option_id // contains filtered or unexported fields }
ArchetypeOption represents a row from 'public.archetype_option'.
func ArchetypeOptionByArchetypeIDOptionID ¶
func ArchetypeOptionByArchetypeIDOptionID(ctx context.Context, db DB, archetypeID, optionID int64) (*ArchetypeOption, error)
ArchetypeOptionByArchetypeIDOptionID retrieves a row from 'public.archetype_option' as a ArchetypeOption.
Generated from index 'archetype_option_pkey'.
func (*ArchetypeOption) Archetype ¶
Archetype returns the Archetype associated with the ArchetypeOption's (ArchetypeID).
Generated from foreign key 'archetype_option_archetype_id_fkey'.
func (*ArchetypeOption) Delete ¶
func (ao *ArchetypeOption) Delete(ctx context.Context, db DB) error
Delete deletes the ArchetypeOption from the database.
func (*ArchetypeOption) Deleted ¶
func (ao *ArchetypeOption) Deleted() bool
Deleted returns true when the ArchetypeOption has been marked for deletion from the database.
func (*ArchetypeOption) Exists ¶
func (ao *ArchetypeOption) Exists() bool
Exists returns true when the ArchetypeOption exists in the database.
type ArchetypeProperty ¶
type ArchetypeProperty struct { ArchetypeID int64 `json:"archetype_id" db:"archetype_id"` // archetype_id PropertyID int64 `json:"property_id" db:"property_id"` // property_id // contains filtered or unexported fields }
ArchetypeProperty represents a row from 'public.archetype_property'.
func ArchetypePropertyByArchetypeIDPropertyID ¶
func ArchetypePropertyByArchetypeIDPropertyID(ctx context.Context, db DB, archetypeID, propertyID int64) (*ArchetypeProperty, error)
ArchetypePropertyByArchetypeIDPropertyID retrieves a row from 'public.archetype_property' as a ArchetypeProperty.
Generated from index 'archetype_property_pkey'.
func (*ArchetypeProperty) Archetype ¶
Archetype returns the Archetype associated with the ArchetypeProperty's (ArchetypeID).
Generated from foreign key 'archetype_property_archetype_id_fkey'.
func (*ArchetypeProperty) Delete ¶
func (ap *ArchetypeProperty) Delete(ctx context.Context, db DB) error
Delete deletes the ArchetypeProperty from the database.
func (*ArchetypeProperty) Deleted ¶
func (ap *ArchetypeProperty) Deleted() bool
Deleted returns true when the ArchetypeProperty has been marked for deletion from the database.
func (*ArchetypeProperty) Exists ¶
func (ap *ArchetypeProperty) Exists() bool
Exists returns true when the ArchetypeProperty exists in the database.
type Asset ¶
type Asset struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id ProductID int64 `json:"product_id" db:"product_id"` // product_id VariantID int64 `json:"variant_id" db:"variant_id"` // variant_id Name string `json:"name" db:"name"` // name URL string `json:"url" db:"url"` // url DisplayName sql.NullString `json:"display_name" db:"display_name"` // display_name Kind int `json:"kind" db:"kind"` // kind ContentType string `json:"content_type" db:"content_type"` // content_type SortOrder sql.NullInt64 `json:"sort_order" db:"sort_order"` // sort_order Sizes []byte `json:"sizes" db:"sizes"` // sizes // contains filtered or unexported fields }
Asset represents a row from 'public.asset'.
func AssetByID ¶
AssetByID retrieves a row from 'public.asset' as a Asset.
Generated from index 'asset_pkey'.
func AssetByProductID ¶
AssetByProductID retrieves a row from 'public.asset' as a Asset.
Generated from index 'idx_asset_product_id'.
func AssetByProductIDKind ¶
AssetByProductIDKind retrieves a row from 'public.asset' as a Asset.
Generated from index 'idx_asset_product_id_kind'.
func AssetBySizes ¶
AssetBySizes retrieves a row from 'public.asset' as a Asset.
Generated from index 'idx_asset_sizes'.
func AssetByStoreIDName ¶
AssetByStoreIDName retrieves a row from 'public.asset' as a Asset.
Generated from index 'asset_store_id_name_key'.
func AssetByVariantID ¶
AssetByVariantID retrieves a row from 'public.asset' as a Asset.
Generated from index 'idx_asset_variant_id'.
func (*Asset) Deleted ¶
Deleted returns true when the Asset has been marked for deletion from the database.
type Cart ¶
type Cart struct { ID uuid.UUID `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id CustomerID sql.NullInt64 `json:"customer_id" db:"customer_id"` // customer_id FirstName sql.NullString `json:"first_name" db:"first_name"` // first_name LastName sql.NullString `json:"last_name" db:"last_name"` // last_name Company sql.NullString `json:"company" db:"company"` // company Phone sql.NullString `json:"phone" db:"phone"` // phone Email sql.NullString `json:"email" db:"email"` // email BillingAddress []byte `json:"billing_address" db:"billing_address"` // billing_address ShippingAddress []byte `json:"shipping_address" db:"shipping_address"` // shipping_address DiscountID sql.NullInt64 `json:"discount_id" db:"discount_id"` // discount_id Status CartStatus `json:"status" db:"status"` // status Currency sql.NullString `json:"currency" db:"currency"` // currency ExpiresAt sql.NullTime `json:"expires_at" db:"expires_at"` // expires_at AbandonedAt sql.NullTime `json:"abandoned_at" db:"abandoned_at"` // abandoned_at // contains filtered or unexported fields }
Cart represents a row from 'public.cart'.
func CartByCustomerID ¶
CartByCustomerID retrieves a row from 'public.cart' as a Cart.
Generated from index 'idx_cart_customer_id'.
func CartByID ¶
CartByID retrieves a row from 'public.cart' as a Cart.
Generated from index 'cart_pkey'.
func CartByStoreID ¶
CartByStoreID retrieves a row from 'public.cart' as a Cart.
Generated from index 'idx_cart_store_id'.
func (*Cart) Customer ¶
Customer returns the Customer associated with the Cart's (CustomerID).
Generated from foreign key 'cart_customer_id_fkey'.
func (*Cart) Deleted ¶
Deleted returns true when the Cart has been marked for deletion from the database.
func (*Cart) Store ¶
Store returns the Store associated with the Cart's (StoreID).
Generated from foreign key 'cart_store_id_fkey'.
type CartItem ¶
type CartItem struct { CartID uuid.UUID `json:"cart_id" db:"cart_id"` // cart_id Sku string `json:"sku" db:"sku"` // sku Quantity int `json:"quantity" db:"quantity"` // quantity Price int64 `json:"price" db:"price"` // price Currency sql.NullString `json:"currency" db:"currency"` // currency ExpiresAt sql.NullTime `json:"expires_at" db:"expires_at"` // expires_at AbandonedAt sql.NullTime `json:"abandoned_at" db:"abandoned_at"` // abandoned_at // contains filtered or unexported fields }
CartItem represents a row from 'public.cart_item'.
func CartItemByAbandonedAt ¶
func CartItemByAbandonedAt(ctx context.Context, db DB, abandonedAt sql.NullTime) ([]*CartItem, error)
CartItemByAbandonedAt retrieves a row from 'public.cart_item' as a CartItem.
Generated from index 'idx_cart_item_abandoned_at'.
func CartItemByCartID ¶
CartItemByCartID retrieves a row from 'public.cart_item' as a CartItem.
Generated from index 'idx_cart_item_cart_id'.
func CartItemByCartIDSku ¶
func CartItemByCartIDSku(ctx context.Context, db DB, cartID uuid.UUID, sku string) (*CartItem, error)
CartItemByCartIDSku retrieves a row from 'public.cart_item' as a CartItem.
Generated from index 'cart_item_pkey'.
func CartItemBySku ¶
CartItemBySku retrieves a row from 'public.cart_item' as a CartItem.
Generated from index 'idx_cart_item_sku'.
func (*CartItem) Cart ¶
Cart returns the Cart associated with the CartItem's (CartID).
Generated from foreign key 'cart_item_cart_id_fkey'.
func (*CartItem) Deleted ¶
Deleted returns true when the CartItem has been marked for deletion from the database.
type CartStatus ¶
type CartStatus uint16
CartStatus is the 'cart_status' enum type from schema 'public'.
const ( // CartStatusNew is the 'new' cart_status. CartStatusNew CartStatus = 1 // CartStatusCheckout is the 'checkout' cart_status. CartStatusCheckout CartStatus = 2 // CartStatusPaid is the 'paid' cart_status. CartStatusPaid CartStatus = 3 // CartStatusComplete is the 'complete' cart_status. CartStatusComplete CartStatus = 4 // CartStatusAbandoned is the 'abandoned' cart_status. CartStatusAbandoned CartStatus = 5 )
CartStatus values.
func (CartStatus) MarshalText ¶
func (cs CartStatus) MarshalText() ([]byte, error)
MarshalText marshals CartStatus into text.
func (*CartStatus) Scan ¶
func (cs *CartStatus) Scan(v interface{}) error
Scan satisfies the sql.Scanner interface.
func (CartStatus) String ¶
func (cs CartStatus) String() string
String satisfies the fmt.Stringer interface.
func (*CartStatus) UnmarshalText ¶
func (cs *CartStatus) UnmarshalText(buf []byte) error
UnmarshalText unmarshals CartStatus from text.
type Category ¶
type Category struct { ID int64 `json:"id" db:"id"` // id ParentID sql.NullInt64 `json:"parent_id" db:"parent_id"` // parent_id StoreID int64 `json:"store_id" db:"store_id"` // store_id Slug string `json:"slug" db:"slug"` // slug Name string `json:"name" db:"name"` // name Description sql.NullString `json:"description" db:"description"` // description MetaTitle sql.NullString `json:"meta_title" db:"meta_title"` // meta_title MetaDescription sql.NullString `json:"meta_description" db:"meta_description"` // meta_description MetaKeywords sql.NullString `json:"meta_keywords" db:"meta_keywords"` // meta_keywords Lft sql.NullInt64 `json:"lft" db:"lft"` // lft Rgt sql.NullInt64 `json:"rgt" db:"rgt"` // rgt Depth sql.NullInt64 `json:"depth" db:"depth"` // depth SortOrder sql.NullInt64 `json:"sort_order" db:"sort_order"` // sort_order // contains filtered or unexported fields }
Category represents a row from 'public.category'.
func CategoryByDepth ¶
CategoryByDepth retrieves a row from 'public.category' as a Category.
Generated from index 'idx_category_depth'.
func CategoryByID ¶
CategoryByID retrieves a row from 'public.category' as a Category.
Generated from index 'category_pkey'.
func CategoryByLft ¶
CategoryByLft retrieves a row from 'public.category' as a Category.
Generated from index 'idx_category_lft'.
func CategoryByParentID ¶
CategoryByParentID retrieves a row from 'public.category' as a Category.
Generated from index 'idx_category_parent_id'.
func CategoryByRgt ¶
CategoryByRgt retrieves a row from 'public.category' as a Category.
Generated from index 'idx_category_rgt'.
func CategoryByStoreID ¶
CategoryByStoreID retrieves a row from 'public.category' as a Category.
Generated from index 'idx_category_store_id'.
func CategoryByStoreIDSlug ¶
func CategoryByStoreIDSlug(ctx context.Context, db DB, storeID int64, slug string) (*Category, error)
CategoryByStoreIDSlug retrieves a row from 'public.category' as a Category.
Generated from index 'category_store_id_slug_key'.
func (*Category) Category ¶
Category returns the Category associated with the Category's (ParentID).
Generated from foreign key 'category_parent_id_fkey'.
func (*Category) Deleted ¶
Deleted returns true when the Category has been marked for deletion from the database.
type Customer ¶
type Customer struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id FirstName string `json:"first_name" db:"first_name"` // first_name LastName string `json:"last_name" db:"last_name"` // last_name Company sql.NullString `json:"company" db:"company"` // company Phone sql.NullString `json:"phone" db:"phone"` // phone Email string `json:"email" db:"email"` // email Password sql.NullString `json:"password" db:"password"` // password IsVerified bool `json:"is_verified" db:"is_verified"` // is_verified // contains filtered or unexported fields }
Customer represents a row from 'public.customer'.
func CustomerByEmail ¶
CustomerByEmail retrieves a row from 'public.customer' as a Customer.
Generated from index 'customer_email_key'.
func CustomerByID ¶
CustomerByID retrieves a row from 'public.customer' as a Customer.
Generated from index 'customer_pkey'.
func CustomerByStoreID ¶
CustomerByStoreID retrieves a row from 'public.customer' as a Customer.
Generated from index 'idx_customer_store_id'.
func CustomerByStoreIDEmail ¶
func CustomerByStoreIDEmail(ctx context.Context, db DB, storeID int64, email string) (*Customer, error)
CustomerByStoreIDEmail retrieves a row from 'public.customer' as a Customer.
Generated from index 'customer_store_id_email_key'.
func (*Customer) Deleted ¶
Deleted returns true when the Customer has been marked for deletion from the database.
type CustomerAddress ¶
type CustomerAddress struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id CustomerID int64 `json:"customer_id" db:"customer_id"` // customer_id Kind AddressKind `json:"kind" db:"kind"` // kind IsDefault bool `json:"is_default" db:"is_default"` // is_default Street string `json:"street" db:"street"` // street AptSuite sql.NullString `json:"apt_suite" db:"apt_suite"` // apt_suite City string `json:"city" db:"city"` // city StateProvince string `json:"state_province" db:"state_province"` // state_province Country string `json:"country" db:"country"` // country PostalCode string `json:"postal_code" db:"postal_code"` // postal_code // contains filtered or unexported fields }
CustomerAddress represents a row from 'public.customer_address'.
func CustomerAddressByCustomerIDKind ¶
func CustomerAddressByCustomerIDKind(ctx context.Context, db DB, customerID int64, kind AddressKind) ([]*CustomerAddress, error)
CustomerAddressByCustomerIDKind retrieves a row from 'public.customer_address' as a CustomerAddress.
Generated from index 'idx_customer_address_customer_id_kind'.
func CustomerAddressByID ¶
CustomerAddressByID retrieves a row from 'public.customer_address' as a CustomerAddress.
Generated from index 'customer_address_pkey'.
func CustomerAddressByStoreID ¶
func CustomerAddressByStoreID(ctx context.Context, db DB, storeID int64) ([]*CustomerAddress, error)
CustomerAddressByStoreID retrieves a row from 'public.customer_address' as a CustomerAddress.
Generated from index 'idx_customer_address_store_id'.
func (*CustomerAddress) Delete ¶
func (ca *CustomerAddress) Delete(ctx context.Context, db DB) error
Delete deletes the CustomerAddress from the database.
func (*CustomerAddress) Deleted ¶
func (ca *CustomerAddress) Deleted() bool
Deleted returns true when the CustomerAddress has been marked for deletion from the database.
func (*CustomerAddress) Exists ¶
func (ca *CustomerAddress) Exists() bool
Exists returns true when the CustomerAddress exists in the database.
func (*CustomerAddress) Insert ¶
func (ca *CustomerAddress) Insert(ctx context.Context, db DB) error
Insert inserts the CustomerAddress to the database.
func (*CustomerAddress) Save ¶
func (ca *CustomerAddress) Save(ctx context.Context, db DB) error
Save saves the CustomerAddress to the database.
type CustomerPasswordReset ¶
type CustomerPasswordReset struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id CustomerID int64 `json:"customer_id" db:"customer_id"` // customer_id Token string `json:"token" db:"token"` // token RedeemedAt sql.NullTime `json:"redeemed_at" db:"redeemed_at"` // redeemed_at ExpiredAt sql.NullTime `json:"expired_at" db:"expired_at"` // expired_at // contains filtered or unexported fields }
CustomerPasswordReset represents a row from 'public.customer_password_reset'.
func CustomerPasswordResetByID ¶
func CustomerPasswordResetByID(ctx context.Context, db DB, id int64) (*CustomerPasswordReset, error)
CustomerPasswordResetByID retrieves a row from 'public.customer_password_reset' as a CustomerPasswordReset.
Generated from index 'customer_password_reset_pkey'.
func CustomerPasswordResetByStoreID ¶
func CustomerPasswordResetByStoreID(ctx context.Context, db DB, storeID int64) ([]*CustomerPasswordReset, error)
CustomerPasswordResetByStoreID retrieves a row from 'public.customer_password_reset' as a CustomerPasswordReset.
Generated from index 'idx_customer_password_reset_store_id'.
func CustomerPasswordResetByToken ¶
func CustomerPasswordResetByToken(ctx context.Context, db DB, token string) (*CustomerPasswordReset, error)
CustomerPasswordResetByToken retrieves a row from 'public.customer_password_reset' as a CustomerPasswordReset.
Generated from index 'customer_password_reset_token_key'.
func (*CustomerPasswordReset) Customer ¶
Customer returns the Customer associated with the CustomerPasswordReset's (CustomerID).
Generated from foreign key 'customer_password_reset_customer_id_fkey'.
func (*CustomerPasswordReset) Delete ¶
func (cpr *CustomerPasswordReset) Delete(ctx context.Context, db DB) error
Delete deletes the CustomerPasswordReset from the database.
func (*CustomerPasswordReset) Deleted ¶
func (cpr *CustomerPasswordReset) Deleted() bool
Deleted returns true when the CustomerPasswordReset has been marked for deletion from the database.
func (*CustomerPasswordReset) Exists ¶
func (cpr *CustomerPasswordReset) Exists() bool
Exists returns true when the CustomerPasswordReset exists in the database.
func (*CustomerPasswordReset) Insert ¶
func (cpr *CustomerPasswordReset) Insert(ctx context.Context, db DB) error
Insert inserts the CustomerPasswordReset to the database.
func (*CustomerPasswordReset) Save ¶
func (cpr *CustomerPasswordReset) Save(ctx context.Context, db DB) error
Save saves the CustomerPasswordReset to the database.
type DB ¶
type DB interface { ExecContext(context.Context, string, ...interface{}) (sql.Result, error) QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) QueryRowContext(context.Context, string, ...interface{}) *sql.Row }
DB is the common interface for database operations that can be used with types from schema 'public'.
This works with both database/sql.DB and database/sql.Tx.
type ErrDecodeFailed ¶
type ErrDecodeFailed struct {
Err error
}
ErrDecodeFailed is the decode failed error.
func (*ErrDecodeFailed) Error ¶
func (err *ErrDecodeFailed) Error() string
Error satisfies the error interface.
func (*ErrDecodeFailed) Unwrap ¶
func (err *ErrDecodeFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type ErrInsertFailed ¶
type ErrInsertFailed struct {
Err error
}
ErrInsertFailed is the insert failed error.
func (*ErrInsertFailed) Error ¶
func (err *ErrInsertFailed) Error() string
Error satisfies the error interface.
func (*ErrInsertFailed) Unwrap ¶
func (err *ErrInsertFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type ErrInvalidAddressKind ¶
type ErrInvalidAddressKind string
ErrInvalidAddressKind is the invalid AddressKind error.
func (ErrInvalidAddressKind) Error ¶
func (err ErrInvalidAddressKind) Error() string
Error satisfies the error interface.
type ErrInvalidCartStatus ¶
type ErrInvalidCartStatus string
ErrInvalidCartStatus is the invalid CartStatus error.
func (ErrInvalidCartStatus) Error ¶
func (err ErrInvalidCartStatus) Error() string
Error satisfies the error interface.
type ErrInvalidTransactionKind ¶
type ErrInvalidTransactionKind string
ErrInvalidTransactionKind is the invalid TransactionKind error.
func (ErrInvalidTransactionKind) Error ¶
func (err ErrInvalidTransactionKind) Error() string
Error satisfies the error interface.
type ErrUpdateFailed ¶
type ErrUpdateFailed struct {
Err error
}
ErrUpdateFailed is the update failed error.
func (*ErrUpdateFailed) Error ¶
func (err *ErrUpdateFailed) Error() string
Error satisfies the error interface.
func (*ErrUpdateFailed) Unwrap ¶
func (err *ErrUpdateFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type ErrUpsertFailed ¶
type ErrUpsertFailed struct {
Err error
}
ErrUpsertFailed is the upsert failed error.
func (*ErrUpsertFailed) Error ¶
func (err *ErrUpsertFailed) Error() string
Error satisfies the error interface.
func (*ErrUpsertFailed) Unwrap ¶
func (err *ErrUpsertFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type Error ¶
type Error string
Error is an error.
const ( // ErrAlreadyExists is the already exists error. ErrAlreadyExists Error = "already exists" // ErrDoesNotExist is the does not exist error. ErrDoesNotExist Error = "does not exist" // ErrMarkedForDeletion is the marked for deletion error. ErrMarkedForDeletion Error = "marked for deletion" )
Error values.
const ErrInvalidStringSlice Error = "invalid StringSlice"
ErrInvalidStringSlice is the invalid StringSlice error.
type InventoryBrand ¶
type InventoryBrand struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Name string `json:"name" db:"name"` // name // contains filtered or unexported fields }
InventoryBrand represents a row from 'public.inventory_brand'.
func InventoryBrandByID ¶
InventoryBrandByID retrieves a row from 'public.inventory_brand' as a InventoryBrand.
Generated from index 'inventory_brand_pkey'.
func (*InventoryBrand) Delete ¶
func (ib *InventoryBrand) Delete(ctx context.Context, db DB) error
Delete deletes the InventoryBrand from the database.
func (*InventoryBrand) Deleted ¶
func (ib *InventoryBrand) Deleted() bool
Deleted returns true when the InventoryBrand has been marked for deletion from the database.
func (*InventoryBrand) Exists ¶
func (ib *InventoryBrand) Exists() bool
Exists returns true when the InventoryBrand exists in the database.
func (*InventoryBrand) Insert ¶
func (ib *InventoryBrand) Insert(ctx context.Context, db DB) error
Insert inserts the InventoryBrand to the database.
func (*InventoryBrand) Save ¶
func (ib *InventoryBrand) Save(ctx context.Context, db DB) error
Save saves the InventoryBrand to the database.
type InventoryItem ¶
type InventoryItem struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Sku string `json:"sku" db:"sku"` // sku Name string `json:"name" db:"name"` // name SupplierID int64 `json:"supplier_id" db:"supplier_id"` // supplier_id BrandID int64 `json:"brand_id" db:"brand_id"` // brand_id // contains filtered or unexported fields }
InventoryItem represents a row from 'public.inventory_item'.
func InventoryItemByID ¶
InventoryItemByID retrieves a row from 'public.inventory_item' as a InventoryItem.
Generated from index 'inventory_item_pkey'.
func (*InventoryItem) Delete ¶
func (ii *InventoryItem) Delete(ctx context.Context, db DB) error
Delete deletes the InventoryItem from the database.
func (*InventoryItem) Deleted ¶
func (ii *InventoryItem) Deleted() bool
Deleted returns true when the InventoryItem has been marked for deletion from the database.
func (*InventoryItem) Exists ¶
func (ii *InventoryItem) Exists() bool
Exists returns true when the InventoryItem exists in the database.
func (*InventoryItem) Insert ¶
func (ii *InventoryItem) Insert(ctx context.Context, db DB) error
Insert inserts the InventoryItem to the database.
func (*InventoryItem) Save ¶
func (ii *InventoryItem) Save(ctx context.Context, db DB) error
Save saves the InventoryItem to the database.
type InventoryStock ¶
type InventoryStock struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id WarehouseID int64 `json:"warehouse_id" db:"warehouse_id"` // warehouse_id InventoryItemID int64 `json:"inventory_item_id" db:"inventory_item_id"` // inventory_item_id Quantity int `json:"quantity" db:"quantity"` // quantity // contains filtered or unexported fields }
InventoryStock represents a row from 'public.inventory_stock'.
func InventoryStockByID ¶
InventoryStockByID retrieves a row from 'public.inventory_stock' as a InventoryStock.
Generated from index 'inventory_stock_pkey'.
func (*InventoryStock) Delete ¶
func (is *InventoryStock) Delete(ctx context.Context, db DB) error
Delete deletes the InventoryStock from the database.
func (*InventoryStock) Deleted ¶
func (is *InventoryStock) Deleted() bool
Deleted returns true when the InventoryStock has been marked for deletion from the database.
func (*InventoryStock) Exists ¶
func (is *InventoryStock) Exists() bool
Exists returns true when the InventoryStock exists in the database.
func (*InventoryStock) Insert ¶
func (is *InventoryStock) Insert(ctx context.Context, db DB) error
Insert inserts the InventoryStock to the database.
func (*InventoryStock) Save ¶
func (is *InventoryStock) Save(ctx context.Context, db DB) error
Save saves the InventoryStock to the database.
type InventorySupplier ¶
type InventorySupplier struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Name string `json:"name" db:"name"` // name // contains filtered or unexported fields }
InventorySupplier represents a row from 'public.inventory_supplier'.
func InventorySupplierByID ¶
InventorySupplierByID retrieves a row from 'public.inventory_supplier' as a InventorySupplier.
Generated from index 'inventory_supplier_pkey'.
func (*InventorySupplier) Delete ¶
func (is *InventorySupplier) Delete(ctx context.Context, db DB) error
Delete deletes the InventorySupplier from the database.
func (*InventorySupplier) Deleted ¶
func (is *InventorySupplier) Deleted() bool
Deleted returns true when the InventorySupplier has been marked for deletion from the database.
func (*InventorySupplier) Exists ¶
func (is *InventorySupplier) Exists() bool
Exists returns true when the InventorySupplier exists in the database.
func (*InventorySupplier) Insert ¶
func (is *InventorySupplier) Insert(ctx context.Context, db DB) error
Insert inserts the InventorySupplier to the database.
func (*InventorySupplier) Save ¶
func (is *InventorySupplier) Save(ctx context.Context, db DB) error
Save saves the InventorySupplier to the database.
type NullAddressKind ¶
type NullAddressKind struct { AddressKind AddressKind // Valid is true if AddressKind is not null. Valid bool }
NullAddressKind represents a null 'address_kind' enum for schema 'public'.
func (*NullAddressKind) Scan ¶
func (nak *NullAddressKind) Scan(v interface{}) error
Scan satisfies the sql.Scanner interface.
type NullCartStatus ¶
type NullCartStatus struct { CartStatus CartStatus // Valid is true if CartStatus is not null. Valid bool }
NullCartStatus represents a null 'cart_status' enum for schema 'public'.
func (*NullCartStatus) Scan ¶
func (ncs *NullCartStatus) Scan(v interface{}) error
Scan satisfies the sql.Scanner interface.
type NullTransactionKind ¶
type NullTransactionKind struct { TransactionKind TransactionKind // Valid is true if TransactionKind is not null. Valid bool }
NullTransactionKind represents a null 'transaction_kind' enum for schema 'public'.
func (*NullTransactionKind) Scan ¶
func (ntk *NullTransactionKind) Scan(v interface{}) error
Scan satisfies the sql.Scanner interface.
type Option ¶
type Option struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Name string `json:"name" db:"name"` // name DisplayName string `json:"display_name" db:"display_name"` // display_name // contains filtered or unexported fields }
Option represents a row from 'public.option'.
func OptionByID ¶
OptionByID retrieves a row from 'public.option' as a Option.
Generated from index 'option_pkey'.
func OptionByName ¶
OptionByName retrieves a row from 'public.option' as a Option.
Generated from index 'option_name_key'.
func (*Option) Deleted ¶
Deleted returns true when the Option has been marked for deletion from the database.
type OptionItem ¶
type OptionItem struct { ID int64 `json:"id" db:"id"` // id OptionID int64 `json:"option_id" db:"option_id"` // option_id Name string `json:"name" db:"name"` // name DisplayName string `json:"display_name" db:"display_name"` // display_name SortOrder int `json:"sort_order" db:"sort_order"` // sort_order // contains filtered or unexported fields }
OptionItem represents a row from 'public.option_item'.
func OptionItemByID ¶
OptionItemByID retrieves a row from 'public.option_item' as a OptionItem.
Generated from index 'option_item_pkey'.
func OptionItemByName ¶
OptionItemByName retrieves a row from 'public.option_item' as a OptionItem.
Generated from index 'option_item_name_key'.
func (*OptionItem) Delete ¶
func (oi *OptionItem) Delete(ctx context.Context, db DB) error
Delete deletes the OptionItem from the database.
func (*OptionItem) Deleted ¶
func (oi *OptionItem) Deleted() bool
Deleted returns true when the OptionItem has been marked for deletion from the database.
func (*OptionItem) Exists ¶
func (oi *OptionItem) Exists() bool
Exists returns true when the OptionItem exists in the database.
func (*OptionItem) Insert ¶
func (oi *OptionItem) Insert(ctx context.Context, db DB) error
Insert inserts the OptionItem to the database.
func (*OptionItem) Option ¶
Option returns the Option associated with the OptionItem's (OptionID).
Generated from foreign key 'option_item_option_id_fkey'.
func (*OptionItem) Save ¶
func (oi *OptionItem) Save(ctx context.Context, db DB) error
Save saves the OptionItem to the database.
type PaymentGateway ¶
type PaymentGateway struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Name string `json:"name" db:"name"` // name // contains filtered or unexported fields }
PaymentGateway represents a row from 'public.payment_gateway'.
func PaymentGatewayByID ¶
PaymentGatewayByID retrieves a row from 'public.payment_gateway' as a PaymentGateway.
Generated from index 'payment_gateway_pkey'.
func (*PaymentGateway) Delete ¶
func (pg *PaymentGateway) Delete(ctx context.Context, db DB) error
Delete deletes the PaymentGateway from the database.
func (*PaymentGateway) Deleted ¶
func (pg *PaymentGateway) Deleted() bool
Deleted returns true when the PaymentGateway has been marked for deletion from the database.
func (*PaymentGateway) Exists ¶
func (pg *PaymentGateway) Exists() bool
Exists returns true when the PaymentGateway exists in the database.
func (*PaymentGateway) Insert ¶
func (pg *PaymentGateway) Insert(ctx context.Context, db DB) error
Insert inserts the PaymentGateway to the database.
func (*PaymentGateway) Save ¶
func (pg *PaymentGateway) Save(ctx context.Context, db DB) error
Save saves the PaymentGateway to the database.
type PaymentTransaction ¶
type PaymentTransaction struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id GatewayID sql.NullInt64 `json:"gateway_id" db:"gateway_id"` // gateway_id ReferenceCode string `json:"reference_code" db:"reference_code"` // reference_code AuthCode string `json:"auth_code" db:"auth_code"` // auth_code Response string `json:"response" db:"response"` // response Amount sql.NullInt64 `json:"amount" db:"amount"` // amount Currency sql.NullString `json:"currency" db:"currency"` // currency Kind TransactionKind `json:"kind" db:"kind"` // kind IsRecurring sql.NullBool `json:"is_recurring" db:"is_recurring"` // is_recurring // contains filtered or unexported fields }
PaymentTransaction represents a row from 'public.payment_transaction'.
func PaymentTransactionByID ¶
PaymentTransactionByID retrieves a row from 'public.payment_transaction' as a PaymentTransaction.
Generated from index 'payment_transaction_pkey'.
func PaymentTransactionByKind ¶
func PaymentTransactionByKind(ctx context.Context, db DB, kind TransactionKind) ([]*PaymentTransaction, error)
PaymentTransactionByKind retrieves a row from 'public.payment_transaction' as a PaymentTransaction.
Generated from index 'idx_payment_transaction_kind'.
func PaymentTransactionByReferenceCode ¶
func PaymentTransactionByReferenceCode(ctx context.Context, db DB, referenceCode string) ([]*PaymentTransaction, error)
PaymentTransactionByReferenceCode retrieves a row from 'public.payment_transaction' as a PaymentTransaction.
Generated from index 'idx_payment_transaction_reference_code'.
func (*PaymentTransaction) Delete ¶
func (pt *PaymentTransaction) Delete(ctx context.Context, db DB) error
Delete deletes the PaymentTransaction from the database.
func (*PaymentTransaction) Deleted ¶
func (pt *PaymentTransaction) Deleted() bool
Deleted returns true when the PaymentTransaction has been marked for deletion from the database.
func (*PaymentTransaction) Exists ¶
func (pt *PaymentTransaction) Exists() bool
Exists returns true when the PaymentTransaction exists in the database.
func (*PaymentTransaction) Insert ¶
func (pt *PaymentTransaction) Insert(ctx context.Context, db DB) error
Insert inserts the PaymentTransaction to the database.
func (*PaymentTransaction) Save ¶
func (pt *PaymentTransaction) Save(ctx context.Context, db DB) error
Save saves the PaymentTransaction to the database.
type PermissionGroup ¶
type PermissionGroup struct { ID int64 `json:"id" db:"id"` // id GroupName string `json:"group_name" db:"group_name"` // group_name // contains filtered or unexported fields }
PermissionGroup represents a row from 'public.permission_group'.
func PermissionGroupByGroupName ¶
func PermissionGroupByGroupName(ctx context.Context, db DB, groupName string) (*PermissionGroup, error)
PermissionGroupByGroupName retrieves a row from 'public.permission_group' as a PermissionGroup.
Generated from index 'permission_group_group_name_key'.
func PermissionGroupByID ¶
PermissionGroupByID retrieves a row from 'public.permission_group' as a PermissionGroup.
Generated from index 'permission_group_pkey'.
func (*PermissionGroup) Delete ¶
func (pg *PermissionGroup) Delete(ctx context.Context, db DB) error
Delete deletes the PermissionGroup from the database.
func (*PermissionGroup) Deleted ¶
func (pg *PermissionGroup) Deleted() bool
Deleted returns true when the PermissionGroup has been marked for deletion from the database.
func (*PermissionGroup) Exists ¶
func (pg *PermissionGroup) Exists() bool
Exists returns true when the PermissionGroup exists in the database.
func (*PermissionGroup) Insert ¶
func (pg *PermissionGroup) Insert(ctx context.Context, db DB) error
Insert inserts the PermissionGroup to the database.
func (*PermissionGroup) Save ¶
func (pg *PermissionGroup) Save(ctx context.Context, db DB) error
Save saves the PermissionGroup to the database.
type Price ¶
type Price struct { ID int64 `json:"id" db:"id"` // id VariantID int64 `json:"variant_id" db:"variant_id"` // variant_id SalePrice int64 `json:"sale_price" db:"sale_price"` // sale_price RetailPrice sql.NullInt64 `json:"retail_price" db:"retail_price"` // retail_price Currency sql.NullString `json:"currency" db:"currency"` // currency // contains filtered or unexported fields }
Price represents a row from 'public.price'.
func PriceByID ¶
PriceByID retrieves a row from 'public.price' as a Price.
Generated from index 'price_pkey'.
func PriceByVariantID ¶
PriceByVariantID retrieves a row from 'public.price' as a Price.
Generated from index 'idx_price_variant_id'.
func (*Price) Deleted ¶
Deleted returns true when the Price has been marked for deletion from the database.
type Product ¶
type Product struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Slug string `json:"slug" db:"slug"` // slug Name string `json:"name" db:"name"` // name ShortDescription sql.NullString `json:"short_description" db:"short_description"` // short_description Description sql.NullString `json:"description" db:"description"` // description MetaTitle sql.NullString `json:"meta_title" db:"meta_title"` // meta_title MetaDescription sql.NullString `json:"meta_description" db:"meta_description"` // meta_description MetaKeywords sql.NullString `json:"meta_keywords" db:"meta_keywords"` // meta_keywords Promotionable bool `json:"promotionable" db:"promotionable"` // promotionable Featured bool `json:"featured" db:"featured"` // featured AvailableOn sql.NullTime `json:"available_on" db:"available_on"` // available_on DiscontinueOn sql.NullTime `json:"discontinue_on" db:"discontinue_on"` // discontinue_on // contains filtered or unexported fields }
Product represents a row from 'public.product'.
func ProductByID ¶
ProductByID retrieves a row from 'public.product' as a Product.
Generated from index 'product_pkey'.
func ProductBySlug ¶
ProductBySlug retrieves a row from 'public.product' as a Product.
Generated from index 'product_slug_key'.
func ProductByStoreID ¶
ProductByStoreID retrieves a row from 'public.product' as a Product.
Generated from index 'idx_product_store_id'.
func (*Product) Deleted ¶
Deleted returns true when the Product has been marked for deletion from the database.
type ProductCategory ¶
type ProductCategory struct { ProductID int64 `json:"product_id" db:"product_id"` // product_id CategoryID int64 `json:"category_id" db:"category_id"` // category_id // contains filtered or unexported fields }
ProductCategory represents a row from 'public.product_category'.
func ProductCategoryByProductIDCategoryID ¶
func ProductCategoryByProductIDCategoryID(ctx context.Context, db DB, productID, categoryID int64) (*ProductCategory, error)
ProductCategoryByProductIDCategoryID retrieves a row from 'public.product_category' as a ProductCategory.
Generated from index 'product_category_pkey'.
func (*ProductCategory) Category ¶
Category returns the Category associated with the ProductCategory's (CategoryID).
Generated from foreign key 'product_category_category_id_fkey'.
func (*ProductCategory) Delete ¶
func (pc *ProductCategory) Delete(ctx context.Context, db DB) error
Delete deletes the ProductCategory from the database.
func (*ProductCategory) Deleted ¶
func (pc *ProductCategory) Deleted() bool
Deleted returns true when the ProductCategory has been marked for deletion from the database.
func (*ProductCategory) Exists ¶
func (pc *ProductCategory) Exists() bool
Exists returns true when the ProductCategory exists in the database.
type ProductOption ¶
type ProductOption struct { ProductID int64 `json:"product_id" db:"product_id"` // product_id OptionID int64 `json:"option_id" db:"option_id"` // option_id // contains filtered or unexported fields }
ProductOption represents a row from 'public.product_option'.
func ProductOptionByProductIDOptionID ¶
func ProductOptionByProductIDOptionID(ctx context.Context, db DB, productID, optionID int64) (*ProductOption, error)
ProductOptionByProductIDOptionID retrieves a row from 'public.product_option' as a ProductOption.
Generated from index 'product_option_pkey'.
func (*ProductOption) Delete ¶
func (po *ProductOption) Delete(ctx context.Context, db DB) error
Delete deletes the ProductOption from the database.
func (*ProductOption) Deleted ¶
func (po *ProductOption) Deleted() bool
Deleted returns true when the ProductOption has been marked for deletion from the database.
func (*ProductOption) Exists ¶
func (po *ProductOption) Exists() bool
Exists returns true when the ProductOption exists in the database.
func (*ProductOption) Insert ¶
func (po *ProductOption) Insert(ctx context.Context, db DB) error
Insert inserts the ProductOption to the database.
type ProductProperty ¶
type ProductProperty struct { ProductID int64 `json:"product_id" db:"product_id"` // product_id PropertyID int64 `json:"property_id" db:"property_id"` // property_id // contains filtered or unexported fields }
ProductProperty represents a row from 'public.product_property'.
func ProductPropertyByProductIDPropertyID ¶
func ProductPropertyByProductIDPropertyID(ctx context.Context, db DB, productID, propertyID int64) (*ProductProperty, error)
ProductPropertyByProductIDPropertyID retrieves a row from 'public.product_property' as a ProductProperty.
Generated from index 'product_property_pkey'.
func (*ProductProperty) Delete ¶
func (pp *ProductProperty) Delete(ctx context.Context, db DB) error
Delete deletes the ProductProperty from the database.
func (*ProductProperty) Deleted ¶
func (pp *ProductProperty) Deleted() bool
Deleted returns true when the ProductProperty has been marked for deletion from the database.
func (*ProductProperty) Exists ¶
func (pp *ProductProperty) Exists() bool
Exists returns true when the ProductProperty exists in the database.
func (*ProductProperty) Insert ¶
func (pp *ProductProperty) Insert(ctx context.Context, db DB) error
Insert inserts the ProductProperty to the database.
type Property ¶
type Property struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Name string `json:"name" db:"name"` // name DisplayName string `json:"display_name" db:"display_name"` // display_name Fiterable bool `json:"fiterable" db:"fiterable"` // fiterable FilterParam string `json:"filter_param" db:"filter_param"` // filter_param // contains filtered or unexported fields }
Property represents a row from 'public.property'.
func PropertyByID ¶
PropertyByID retrieves a row from 'public.property' as a Property.
Generated from index 'property_pkey'.
func PropertyByName ¶
PropertyByName retrieves a row from 'public.property' as a Property.
Generated from index 'property_name_key'.
func (*Property) Deleted ¶
Deleted returns true when the Property has been marked for deletion from the database.
type Store ¶
type Store struct { ID int64 `json:"id" db:"id"` // id IsDefault bool `json:"is_default" db:"is_default"` // is_default Name string `json:"name" db:"name"` // name Description sql.NullString `json:"description" db:"description"` // description URL string `json:"url" db:"url"` // url // contains filtered or unexported fields }
Store represents a row from 'public.store'.
func StoreByID ¶
StoreByID retrieves a row from 'public.store' as a Store.
Generated from index 'store_pkey'.
func StoreByNameURL ¶
StoreByNameURL retrieves a row from 'public.store' as a Store.
Generated from index 'store_name_url_key'.
func (*Store) Deleted ¶
Deleted returns true when the Store has been marked for deletion from the database.
type StoreAddress ¶
type StoreAddress struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Kind AddressKind `json:"kind" db:"kind"` // kind IsDefault bool `json:"is_default" db:"is_default"` // is_default Address sql.NullString `json:"address" db:"address"` // address City sql.NullString `json:"city" db:"city"` // city StateProvince sql.NullString `json:"state_province" db:"state_province"` // state_province PostalCode sql.NullString `json:"postal_code" db:"postal_code"` // postal_code Country sql.NullString `json:"country" db:"country"` // country // contains filtered or unexported fields }
StoreAddress represents a row from 'public.store_address'.
func StoreAddressByID ¶
StoreAddressByID retrieves a row from 'public.store_address' as a StoreAddress.
Generated from index 'store_address_pkey'.
func (*StoreAddress) Delete ¶
func (sa *StoreAddress) Delete(ctx context.Context, db DB) error
Delete deletes the StoreAddress from the database.
func (*StoreAddress) Deleted ¶
func (sa *StoreAddress) Deleted() bool
Deleted returns true when the StoreAddress has been marked for deletion from the database.
func (*StoreAddress) Exists ¶
func (sa *StoreAddress) Exists() bool
Exists returns true when the StoreAddress exists in the database.
func (*StoreAddress) Insert ¶
func (sa *StoreAddress) Insert(ctx context.Context, db DB) error
Insert inserts the StoreAddress to the database.
func (*StoreAddress) Save ¶
func (sa *StoreAddress) Save(ctx context.Context, db DB) error
Save saves the StoreAddress to the database.
type StoreProduct ¶
type StoreProduct struct { StoreID int64 `json:"store_id" db:"store_id"` // store_id ProductID int64 `json:"product_id" db:"product_id"` // product_id // contains filtered or unexported fields }
StoreProduct represents a row from 'public.store_product'.
func StoreProductByStoreIDProductID ¶
func StoreProductByStoreIDProductID(ctx context.Context, db DB, storeID, productID int64) (*StoreProduct, error)
StoreProductByStoreIDProductID retrieves a row from 'public.store_product' as a StoreProduct.
Generated from index 'store_product_pkey'.
func (*StoreProduct) Delete ¶
func (sp *StoreProduct) Delete(ctx context.Context, db DB) error
Delete deletes the StoreProduct from the database.
func (*StoreProduct) Deleted ¶
func (sp *StoreProduct) Deleted() bool
Deleted returns true when the StoreProduct has been marked for deletion from the database.
func (*StoreProduct) Exists ¶
func (sp *StoreProduct) Exists() bool
Exists returns true when the StoreProduct exists in the database.
func (*StoreProduct) Insert ¶
func (sp *StoreProduct) Insert(ctx context.Context, db DB) error
Insert inserts the StoreProduct to the database.
type StoreSetting ¶
type StoreSetting struct { ID int64 `json:"id" db:"id"` // id StoreID int64 `json:"store_id" db:"store_id"` // store_id Config []byte `json:"config" db:"config"` // config // contains filtered or unexported fields }
StoreSetting represents a row from 'public.store_setting'.
func StoreSettingByID ¶
StoreSettingByID retrieves a row from 'public.store_setting' as a StoreSetting.
Generated from index 'store_setting_pkey'.
func StoreSettingByStoreID ¶
StoreSettingByStoreID retrieves a row from 'public.store_setting' as a StoreSetting.
Generated from index 'store_setting_store_id_key'.
func (*StoreSetting) Delete ¶
func (ss *StoreSetting) Delete(ctx context.Context, db DB) error
Delete deletes the StoreSetting from the database.
func (*StoreSetting) Deleted ¶
func (ss *StoreSetting) Deleted() bool
Deleted returns true when the StoreSetting has been marked for deletion from the database.
func (*StoreSetting) Exists ¶
func (ss *StoreSetting) Exists() bool
Exists returns true when the StoreSetting exists in the database.
func (*StoreSetting) Insert ¶
func (ss *StoreSetting) Insert(ctx context.Context, db DB) error
Insert inserts the StoreSetting to the database.
func (*StoreSetting) Save ¶
func (ss *StoreSetting) Save(ctx context.Context, db DB) error
Save saves the StoreSetting to the database.
func (*StoreSetting) Store ¶
Store returns the Store associated with the StoreSetting's (StoreID).
Generated from foreign key 'store_setting_store_id_fkey'.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(v interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type TransactionKind ¶
type TransactionKind uint16
TransactionKind is the 'transaction_kind' enum type from schema 'public'.
const ( // TransactionKindUnknown is the 'unknown' transaction_kind. TransactionKindUnknown TransactionKind = 1 // TransactionKindSale is the 'sale' transaction_kind. TransactionKindSale TransactionKind = 2 // TransactionKindRefund is the 'refund' transaction_kind. TransactionKindRefund TransactionKind = 3 // TransactionKindChargeback is the 'chargeback' transaction_kind. TransactionKindChargeback TransactionKind = 4 )
TransactionKind values.
func (TransactionKind) MarshalText ¶
func (tk TransactionKind) MarshalText() ([]byte, error)
MarshalText marshals TransactionKind into text.
func (*TransactionKind) Scan ¶
func (tk *TransactionKind) Scan(v interface{}) error
Scan satisfies the sql.Scanner interface.
func (TransactionKind) String ¶
func (tk TransactionKind) String() string
String satisfies the fmt.Stringer interface.
func (*TransactionKind) UnmarshalText ¶
func (tk *TransactionKind) UnmarshalText(buf []byte) error
UnmarshalText unmarshals TransactionKind from text.
type User ¶
type User struct { ID int64 `json:"id" db:"id"` // id FirstName string `json:"first_name" db:"first_name"` // first_name LastName string `json:"last_name" db:"last_name"` // last_name Email string `json:"email" db:"email"` // email Password string `json:"password" db:"password"` // password // contains filtered or unexported fields }
User represents a row from 'public.users'.
func UserByEmail ¶
UserByEmail retrieves a row from 'public.users' as a User.
Generated from index 'users_email_key'.
func UserByID ¶
UserByID retrieves a row from 'public.users' as a User.
Generated from index 'users_pkey'.
func (*User) Deleted ¶
Deleted returns true when the User has been marked for deletion from the database.
type UsersPasswordReset ¶
type UsersPasswordReset struct { ID int64 `json:"id" db:"id"` // id UsersID int64 `json:"users_id" db:"users_id"` // users_id Token string `json:"token" db:"token"` // token RedeemedAt sql.NullTime `json:"redeemed_at" db:"redeemed_at"` // redeemed_at ExpiredAt sql.NullTime `json:"expired_at" db:"expired_at"` // expired_at // contains filtered or unexported fields }
UsersPasswordReset represents a row from 'public.users_password_reset'.
func UsersPasswordResetByID ¶
UsersPasswordResetByID retrieves a row from 'public.users_password_reset' as a UsersPasswordReset.
Generated from index 'users_password_reset_pkey'.
func UsersPasswordResetByToken ¶
func UsersPasswordResetByToken(ctx context.Context, db DB, token string) (*UsersPasswordReset, error)
UsersPasswordResetByToken retrieves a row from 'public.users_password_reset' as a UsersPasswordReset.
Generated from index 'users_password_reset_token_key'.
func (*UsersPasswordReset) Delete ¶
func (upr *UsersPasswordReset) Delete(ctx context.Context, db DB) error
Delete deletes the UsersPasswordReset from the database.
func (*UsersPasswordReset) Deleted ¶
func (upr *UsersPasswordReset) Deleted() bool
Deleted returns true when the UsersPasswordReset has been marked for deletion from the database.
func (*UsersPasswordReset) Exists ¶
func (upr *UsersPasswordReset) Exists() bool
Exists returns true when the UsersPasswordReset exists in the database.
func (*UsersPasswordReset) Insert ¶
func (upr *UsersPasswordReset) Insert(ctx context.Context, db DB) error
Insert inserts the UsersPasswordReset to the database.
func (*UsersPasswordReset) Save ¶
func (upr *UsersPasswordReset) Save(ctx context.Context, db DB) error
Save saves the UsersPasswordReset to the database.
func (*UsersPasswordReset) Update ¶
func (upr *UsersPasswordReset) Update(ctx context.Context, db DB) error
Update updates a UsersPasswordReset in the database.
type UsersPermissionGroup ¶
type UsersPermissionGroup struct { UserID int64 `json:"user_id" db:"user_id"` // user_id PermissionGroupID int64 `json:"permission_group_id" db:"permission_group_id"` // permission_group_id // contains filtered or unexported fields }
UsersPermissionGroup represents a row from 'public.users_permission_group'.
func UsersPermissionGroupByUserIDPermissionGroupID ¶
func UsersPermissionGroupByUserIDPermissionGroupID(ctx context.Context, db DB, userID, permissionGroupID int64) (*UsersPermissionGroup, error)
UsersPermissionGroupByUserIDPermissionGroupID retrieves a row from 'public.users_permission_group' as a UsersPermissionGroup.
Generated from index 'users_permission_group_pkey'.
func (*UsersPermissionGroup) Delete ¶
func (upg *UsersPermissionGroup) Delete(ctx context.Context, db DB) error
Delete deletes the UsersPermissionGroup from the database.
func (*UsersPermissionGroup) Deleted ¶
func (upg *UsersPermissionGroup) Deleted() bool
Deleted returns true when the UsersPermissionGroup has been marked for deletion from the database.
func (*UsersPermissionGroup) Exists ¶
func (upg *UsersPermissionGroup) Exists() bool
Exists returns true when the UsersPermissionGroup exists in the database.
func (*UsersPermissionGroup) Insert ¶
func (upg *UsersPermissionGroup) Insert(ctx context.Context, db DB) error
Insert inserts the UsersPermissionGroup to the database.
func (*UsersPermissionGroup) PermissionGroup ¶
func (upg *UsersPermissionGroup) PermissionGroup(ctx context.Context, db DB) (*PermissionGroup, error)
PermissionGroup returns the PermissionGroup associated with the UsersPermissionGroup's (PermissionGroupID).
Generated from foreign key 'users_permission_group_permission_group_id_fkey'.
type Variant ¶
type Variant struct { ID int64 `json:"id" db:"id"` // id ProductID int64 `json:"product_id" db:"product_id"` // product_id IsDefault bool `json:"is_default" db:"is_default"` // is_default Sku string `json:"sku" db:"sku"` // sku SortOrder int `json:"sort_order" db:"sort_order"` // sort_order CostAmount sql.NullInt64 `json:"cost_amount" db:"cost_amount"` // cost_amount CostCurrency sql.NullString `json:"cost_currency" db:"cost_currency"` // cost_currency TrackInventory bool `json:"track_inventory" db:"track_inventory"` // track_inventory TaxCategoryID sql.NullInt64 `json:"tax_category_id" db:"tax_category_id"` // tax_category_id ShippingCategoryID sql.NullInt64 `json:"shipping_category_id" db:"shipping_category_id"` // shipping_category_id DiscontinueOn sql.NullTime `json:"discontinue_on" db:"discontinue_on"` // discontinue_on Weight sql.NullFloat64 `json:"weight" db:"weight"` // weight Height sql.NullFloat64 `json:"height" db:"height"` // height Width sql.NullFloat64 `json:"width" db:"width"` // width Depth sql.NullFloat64 `json:"depth" db:"depth"` // depth // contains filtered or unexported fields }
Variant represents a row from 'public.variant'.
func VariantByID ¶
VariantByID retrieves a row from 'public.variant' as a Variant.
Generated from index 'variant_pkey'.
func VariantByIsDefault ¶
VariantByIsDefault retrieves a row from 'public.variant' as a Variant.
Generated from index 'idx_variant_is_default'.
func VariantByProductID ¶
VariantByProductID retrieves a row from 'public.variant' as a Variant.
Generated from index 'idx_variant_product_id'.
func VariantBySku ¶
VariantBySku retrieves a row from 'public.variant' as a Variant.
Generated from index 'variant_sku_key'.
func (*Variant) Deleted ¶
Deleted returns true when the Variant has been marked for deletion from the database.
func (*Variant) Product ¶
Product returns the Product associated with the Variant's (ProductID).
Generated from foreign key 'variant_product_id_fkey'.
Source Files ¶
- addresskind.xo.go
- archetype.xo.go
- archetypecategory.xo.go
- archetypeoption.xo.go
- archetypeproperty.xo.go
- asset.xo.go
- cart.xo.go
- cartitem.xo.go
- cartstatus.xo.go
- category.xo.go
- customer.xo.go
- customeraddress.xo.go
- customerpasswordreset.xo.go
- db.xo.go
- inventorybrand.xo.go
- inventoryitem.xo.go
- inventorystock.xo.go
- inventorysupplier.xo.go
- option.xo.go
- optionitem.xo.go
- paymentgateway.xo.go
- paymenttransaction.xo.go
- permissiongroup.xo.go
- price.xo.go
- product.xo.go
- productcategory.xo.go
- productoption.xo.go
- productproperty.xo.go
- property.xo.go
- store.xo.go
- storeaddress.xo.go
- storeproduct.xo.go
- storesetting.xo.go
- transactionkind.xo.go
- user.xo.go
- userspasswordreset.xo.go
- userspermissiongroup.xo.go
- variant.xo.go