Documentation
¶
Index ¶
- Constants
- type Category
- func (category *Category) CreatedAt() string
- func (category *Category) CreatedAtCarbon() *carbon.Carbon
- func (category *Category) CustomerID() string
- func (category *Category) Description() string
- func (category *Category) ID() string
- func (category *Category) IsActive() bool
- func (category *Category) IsDraft() bool
- func (category *Category) IsInactive() bool
- func (category *Category) IsSoftDeleted() bool
- func (category *Category) Memo() string
- func (category *Category) Meta(name string) string
- func (category *Category) Metas() (map[string]string, error)
- func (category *Category) ParentID() string
- func (category *Category) SetCreatedAt(createdAt string) CategoryInterface
- func (category *Category) SetCustomerID(id string) CategoryInterface
- func (category *Category) SetDescription(description string) CategoryInterface
- func (category *Category) SetID(id string) CategoryInterface
- func (category *Category) SetMemo(memo string) CategoryInterface
- func (category *Category) SetMeta(name string, value string) error
- func (category *Category) SetMetas(metas map[string]string) error
- func (category *Category) SetParentID(parentID string) CategoryInterface
- func (category *Category) SetSoftDeletedAt(softDeletedAt string) CategoryInterface
- func (category *Category) SetStatus(status string) CategoryInterface
- func (category *Category) SetTitle(title string) CategoryInterface
- func (category *Category) SetUpdatedAt(updatedAt string) CategoryInterface
- func (category *Category) SoftDeletedAt() string
- func (category *Category) SoftDeletedAtCarbon() *carbon.Carbon
- func (category *Category) Status() string
- func (category *Category) Title() string
- func (category *Category) UpdatedAt() string
- func (category *Category) UpdatedAtCarbon() *carbon.Carbon
- func (category *Category) UpsertMetas(metas map[string]string) error
- type CategoryInterface
- type CategoryQueryInterface
- type Discount
- func (d *Discount) Amount() float64
- func (d *Discount) Code() string
- func (d *Discount) CreatedAt() string
- func (d *Discount) CreatedAtCarbon() *carbon.Carbon
- func (d *Discount) Description() string
- func (d *Discount) EndsAt() string
- func (d *Discount) EndsAtCarbon() *carbon.Carbon
- func (o *Discount) ID() string
- func (d *Discount) Memo() string
- func (d *Discount) Meta(name string) string
- func (d *Discount) MetaRemove(name string) error
- func (d *Discount) Metas() (map[string]string, error)
- func (d *Discount) MetasRemove(names []string) error
- func (d *Discount) MetasUpsert(metas map[string]string) error
- func (d *Discount) SetAmount(amount float64) DiscountInterface
- func (d *Discount) SetCode(code string) DiscountInterface
- func (d *Discount) SetCreatedAt(createdAt string) DiscountInterface
- func (d *Discount) SetDescription(description string) DiscountInterface
- func (d *Discount) SetEndsAt(endsAt string) DiscountInterface
- func (o *Discount) SetID(id string) DiscountInterface
- func (d *Discount) SetMemo(memo string) DiscountInterface
- func (d *Discount) SetMeta(name string, value string) error
- func (d *Discount) SetMetas(metas map[string]string) error
- func (d *Discount) SetSoftDeletedAt(deletedAt string) DiscountInterface
- func (d *Discount) SetStartsAt(startsAt string) DiscountInterface
- func (d *Discount) SetStatus(status string) DiscountInterface
- func (d *Discount) SetTitle(title string) DiscountInterface
- func (d *Discount) SetType(type_ string) DiscountInterface
- func (d *Discount) SetUpdatedAt(updatedAt string) DiscountInterface
- func (d *Discount) SoftDeletedAt() string
- func (d *Discount) SoftDeletedAtCarbon() *carbon.Carbon
- func (d *Discount) StartsAt() string
- func (d *Discount) StartsAtCarbon() *carbon.Carbon
- func (d *Discount) Status() string
- func (d *Discount) Title() string
- func (d *Discount) Type() string
- func (d *Discount) UpdatedAt() string
- func (d *Discount) UpdatedAtCarbon() *carbon.Carbon
- type DiscountInterface
- type DiscountQueryInterface
- type Media
- func (o *Media) CreatedAt() string
- func (o *Media) CreatedAtCarbon() *carbon.Carbon
- func (o *Media) Description() string
- func (o *Media) EntityID() string
- func (o *Media) ID() string
- func (o *Media) Memo() string
- func (order *Media) Meta(name string) string
- func (order *Media) Metas() (map[string]string, error)
- func (o *Media) Sequence() int
- func (o *Media) SetCreatedAt(createdAt string) MediaInterface
- func (o *Media) SetDescription(description string) MediaInterface
- func (o *Media) SetEntityID(entityID string) MediaInterface
- func (o *Media) SetID(id string) MediaInterface
- func (o *Media) SetMemo(memo string) MediaInterface
- func (order *Media) SetMeta(name string, value string) error
- func (order *Media) SetMetas(metas map[string]string) error
- func (o *Media) SetSequence(sequence int) MediaInterface
- func (o *Media) SetSoftDeletedAt(softDeletedAt string) MediaInterface
- func (o *Media) SetStatus(status string) MediaInterface
- func (o *Media) SetTitle(title string) MediaInterface
- func (o *Media) SetType(type_ string) MediaInterface
- func (o *Media) SetURL(url string) MediaInterface
- func (o *Media) SetUpdatedAt(updatedAt string) MediaInterface
- func (o *Media) SoftDeletedAt() string
- func (o *Media) SoftDeletedAtCarbon() *carbon.Carbon
- func (o *Media) Status() string
- func (o *Media) Title() string
- func (o *Media) Type() string
- func (o *Media) URL() string
- func (o *Media) UpdatedAt() string
- func (o *Media) UpdatedAtCarbon() *carbon.Carbon
- func (order *Media) UpsertMetas(metas map[string]string) error
- type MediaInterface
- type MediaQueryInterface
- type NewStoreOptions
- type Order
- func (order *Order) CreatedAt() string
- func (order *Order) CreatedAtCarbon() *carbon.Carbon
- func (order *Order) CustomerID() string
- func (order *Order) ID() string
- func (order *Order) IsAwaitingFulfillment() bool
- func (order *Order) IsAwaitingPayment() bool
- func (order *Order) IsAwaitingPickup() bool
- func (order *Order) IsAwaitingShipment() bool
- func (order *Order) IsCancelled() bool
- func (order *Order) IsCompleted() bool
- func (order *Order) IsDeclined() bool
- func (order *Order) IsDisputed() bool
- func (order *Order) IsManualVerificationRequired() bool
- func (order *Order) IsPending() bool
- func (order *Order) IsRefunded() bool
- func (order *Order) IsShipped() bool
- func (order *Order) Memo() string
- func (order *Order) Meta(name string) string
- func (order *Order) Metas() (map[string]string, error)
- func (order *Order) Price() string
- func (order *Order) PriceFloat() float64
- func (order *Order) Quantity() string
- func (order *Order) QuantityInt() int64
- func (order *Order) SetCreatedAt(createdAt string) OrderInterface
- func (order *Order) SetCustomerID(id string) OrderInterface
- func (order *Order) SetID(id string) OrderInterface
- func (order *Order) SetMemo(memo string) OrderInterface
- func (order *Order) SetMeta(name string, value string) error
- func (order *Order) SetMetas(metas map[string]string) error
- func (order *Order) SetPrice(price string) OrderInterface
- func (order *Order) SetPriceFloat(price float64) OrderInterface
- func (order *Order) SetQuantity(quantity string) OrderInterface
- func (order *Order) SetQuantityInt(quantity int64) OrderInterface
- func (order *Order) SetSoftDeletedAt(deletedAt string) OrderInterface
- func (order *Order) SetStatus(status string) OrderInterface
- func (order *Order) SetUpdatedAt(updatedAt string) OrderInterface
- func (order *Order) SoftDeletedAt() string
- func (order *Order) SoftDeletedAtCarbon() *carbon.Carbon
- func (order *Order) Status() string
- func (order *Order) UpdatedAt() string
- func (order *Order) UpdatedAtCarbon() *carbon.Carbon
- func (order *Order) UpsertMetas(metas map[string]string) error
- type OrderInterface
- type OrderLineItem
- func (o *OrderLineItem) CreatedAt() string
- func (o *OrderLineItem) CreatedAtCarbon() *carbon.Carbon
- func (o *OrderLineItem) ID() string
- func (o *OrderLineItem) Memo() string
- func (o *OrderLineItem) Meta(name string) string
- func (o *OrderLineItem) Metas() (map[string]string, error)
- func (o *OrderLineItem) OrderID() string
- func (o *OrderLineItem) Price() string
- func (o *OrderLineItem) PriceFloat() float64
- func (o *OrderLineItem) ProductID() string
- func (o *OrderLineItem) Quantity() string
- func (o *OrderLineItem) QuantityInt() int64
- func (o *OrderLineItem) SetCreatedAt(createdAt string) OrderLineItemInterface
- func (o *OrderLineItem) SetID(id string) OrderLineItemInterface
- func (o *OrderLineItem) SetMemo(memo string) OrderLineItemInterface
- func (o *OrderLineItem) SetMeta(name string, value string) error
- func (o *OrderLineItem) SetMetas(metas map[string]string) error
- func (o *OrderLineItem) SetOrderID(orderID string) OrderLineItemInterface
- func (o *OrderLineItem) SetPrice(price string) OrderLineItemInterface
- func (o *OrderLineItem) SetPriceFloat(price float64) OrderLineItemInterface
- func (o *OrderLineItem) SetProductID(productID string) OrderLineItemInterface
- func (o *OrderLineItem) SetQuantity(quantity string) OrderLineItemInterface
- func (o *OrderLineItem) SetQuantityInt(quantity int64) OrderLineItemInterface
- func (o *OrderLineItem) SetSoftDeletedAt(deletedAt string) OrderLineItemInterface
- func (o *OrderLineItem) SetStatus(status string) OrderLineItemInterface
- func (o *OrderLineItem) SetTitle(title string) OrderLineItemInterface
- func (o *OrderLineItem) SetUpdatedAt(updatedAt string) OrderLineItemInterface
- func (o *OrderLineItem) SoftDeletedAt() string
- func (o *OrderLineItem) SoftDeletedAtCarbon() *carbon.Carbon
- func (o *OrderLineItem) Status() string
- func (o *OrderLineItem) Title() string
- func (o *OrderLineItem) UpdatedAt() string
- func (o *OrderLineItem) UpdatedAtCarbon() *carbon.Carbon
- func (o *OrderLineItem) UpsertMetas(metas map[string]string) error
- type OrderLineItemInterface
- type OrderLineItemQueryInterface
- type OrderQueryInterface
- type Product
- func (product *Product) CreatedAt() string
- func (product *Product) CreatedAtCarbon() *carbon.Carbon
- func (product *Product) Description() string
- func (product *Product) ID() string
- func (product *Product) IsActive() bool
- func (product *Product) IsDisabled() bool
- func (product *Product) IsDraft() bool
- func (product *Product) IsFree() bool
- func (product *Product) IsSoftDeleted() bool
- func (product *Product) Memo() string
- func (product *Product) Meta(name string) string
- func (product *Product) Metas() (map[string]string, error)
- func (product *Product) Price() string
- func (product *Product) PriceFloat() float64
- func (product *Product) Quantity() string
- func (product *Product) QuantityInt() int64
- func (product *Product) SetCreatedAt(createdAt string) ProductInterface
- func (product *Product) SetDescription(description string) ProductInterface
- func (product *Product) SetID(id string) ProductInterface
- func (product *Product) SetMemo(memo string) ProductInterface
- func (product *Product) SetMeta(name string, value string) error
- func (product *Product) SetMetas(metas map[string]string) error
- func (product *Product) SetPrice(price string) ProductInterface
- func (product *Product) SetPriceFloat(price float64) ProductInterface
- func (product *Product) SetQuantity(quantity string) ProductInterface
- func (product *Product) SetQuantityInt(quantity int64) ProductInterface
- func (product *Product) SetShortDescription(shortDescription string) ProductInterface
- func (product *Product) SetSoftDeletedAt(deletedAt string) ProductInterface
- func (product *Product) SetStatus(status string) ProductInterface
- func (product *Product) SetTitle(title string) ProductInterface
- func (product *Product) SetUpdatedAt(updatedAt string) ProductInterface
- func (product *Product) ShortDescription() string
- func (product *Product) Slug() string
- func (product *Product) SoftDeletedAt() string
- func (product *Product) SoftDeletedAtCarbon() *carbon.Carbon
- func (product *Product) Status() string
- func (product *Product) Title() string
- func (product *Product) UpdatedAt() string
- func (product *Product) UpdatedAtCarbon() *carbon.Carbon
- func (product *Product) UpsertMetas(metas map[string]string) error
- type ProductInterface
- type ProductQueryInterface
- type Store
- func (store *Store) AutoMigrate() error
- func (store *Store) CategoryCount(ctx context.Context, options CategoryQueryInterface) (int64, error)
- func (store *Store) CategoryCreate(ctx context.Context, category CategoryInterface) error
- func (store *Store) CategoryDelete(ctx context.Context, category CategoryInterface) error
- func (store *Store) CategoryDeleteByID(ctx context.Context, id string) error
- func (store *Store) CategoryFindByID(ctx context.Context, id string) (CategoryInterface, error)
- func (store *Store) CategoryList(ctx context.Context, options CategoryQueryInterface) ([]CategoryInterface, error)
- func (store *Store) CategorySoftDelete(ctx context.Context, category CategoryInterface) error
- func (store *Store) CategorySoftDeleteByID(ctx context.Context, id string) error
- func (store *Store) CategoryTableName() string
- func (store *Store) CategoryUpdate(ctx context.Context, category CategoryInterface) (err error)
- func (store *Store) DB() *sql.DB
- func (store *Store) DiscountCount(ctx context.Context, options DiscountQueryInterface) (int64, error)
- func (store *Store) DiscountCreate(ctx context.Context, discount DiscountInterface) error
- func (store *Store) DiscountDelete(ctx context.Context, discount DiscountInterface) error
- func (store *Store) DiscountDeleteByID(ctx context.Context, id string) error
- func (store *Store) DiscountFindByCode(ctx context.Context, code string) (DiscountInterface, error)
- func (store *Store) DiscountFindByID(ctx context.Context, id string) (DiscountInterface, error)
- func (store *Store) DiscountList(ctx context.Context, options DiscountQueryInterface) ([]DiscountInterface, error)
- func (store *Store) DiscountSoftDelete(ctx context.Context, discount DiscountInterface) error
- func (store *Store) DiscountSoftDeleteByID(ctx context.Context, id string) error
- func (store *Store) DiscountTableName() string
- func (store *Store) DiscountUpdate(ctx context.Context, discount DiscountInterface) error
- func (store *Store) EnableDebug(debug bool, sqlLogger ...*slog.Logger)
- func (store *Store) MediaCount(ctx context.Context, options MediaQueryInterface) (int64, error)
- func (store *Store) MediaCreate(ctx context.Context, media MediaInterface) error
- func (store *Store) MediaDelete(ctx context.Context, media MediaInterface) error
- func (store *Store) MediaDeleteByID(ctx context.Context, id string) error
- func (store *Store) MediaFindByID(ctx context.Context, id string) (MediaInterface, error)
- func (store *Store) MediaList(ctx context.Context, options MediaQueryInterface) ([]MediaInterface, error)
- func (store *Store) MediaSoftDelete(ctx context.Context, media MediaInterface) error
- func (store *Store) MediaSoftDeleteByID(ctx context.Context, id string) error
- func (store *Store) MediaTableName() string
- func (store *Store) MediaUpdate(ctx context.Context, media MediaInterface) (err error)
- func (store *Store) OrderCount(ctx context.Context, options OrderQueryInterface) (int64, error)
- func (store *Store) OrderCreate(ctx context.Context, order OrderInterface) error
- func (store *Store) OrderDelete(ctx context.Context, order OrderInterface) error
- func (store *Store) OrderDeleteByID(ctx context.Context, id string) error
- func (store *Store) OrderFindByID(ctx context.Context, id string) (OrderInterface, error)
- func (store *Store) OrderLineItemCount(ctx context.Context, options OrderLineItemQueryInterface) (int64, error)
- func (store *Store) OrderLineItemCreate(ctx context.Context, orderLineItem OrderLineItemInterface) error
- func (store *Store) OrderLineItemDelete(ctx context.Context, orderLineItem OrderLineItemInterface) error
- func (store *Store) OrderLineItemDeleteByID(ctx context.Context, id string) error
- func (store *Store) OrderLineItemFindByID(ctx context.Context, id string) (OrderLineItemInterface, error)
- func (store *Store) OrderLineItemList(ctx context.Context, options OrderLineItemQueryInterface) ([]OrderLineItemInterface, error)
- func (store *Store) OrderLineItemSoftDelete(ctx context.Context, orderLineItem OrderLineItemInterface) error
- func (store *Store) OrderLineItemSoftDeleteByID(ctx context.Context, id string) error
- func (store *Store) OrderLineItemTableName() string
- func (store *Store) OrderLineItemUpdate(ctx context.Context, orderLineItem OrderLineItemInterface) error
- func (store *Store) OrderList(ctx context.Context, options OrderQueryInterface) ([]OrderInterface, error)
- func (store *Store) OrderSoftDelete(ctx context.Context, order OrderInterface) error
- func (store *Store) OrderSoftDeleteByID(ctx context.Context, id string) error
- func (store *Store) OrderTableName() string
- func (store *Store) OrderUpdate(ctx context.Context, order OrderInterface) error
- func (store *Store) ProductCount(ctx context.Context, options ProductQueryInterface) (int64, error)
- func (store *Store) ProductCreate(ctx context.Context, product ProductInterface) error
- func (store *Store) ProductDelete(ctx context.Context, product ProductInterface) error
- func (store *Store) ProductDeleteByID(ctx context.Context, id string) error
- func (store *Store) ProductFindByID(ctx context.Context, id string) (ProductInterface, error)
- func (store *Store) ProductList(ctx context.Context, options ProductQueryInterface) ([]ProductInterface, error)
- func (store *Store) ProductSoftDelete(ctx context.Context, product ProductInterface) error
- func (store *Store) ProductSoftDeleteByID(ctx context.Context, id string) error
- func (store *Store) ProductTableName() string
- func (store *Store) ProductUpdate(ctx context.Context, product ProductInterface) error
- type StoreInterface
Constants ¶
const CATEGORY_STATUS_ACTIVE = "active"
const CATEGORY_STATUS_DRAFT = "draft"
const CATEGORY_STATUS_INACTIVE = "inactive"
const COLUMN_AMOUNT = "amount"
const COLUMN_CODE = "code"
const COLUMN_CREATED_AT = "created_at"
const COLUMN_CUSTOMER_ID = "customer_id"
const COLUMN_DESCRIPTION = "description"
const COLUMN_ENDS_AT = "ends_at"
const COLUMN_ENTITY_ID = "entity_id"
const COLUMN_ID = "id"
const COLUMN_MEDIA_TYPE = "media_type"
const COLUMN_MEDIA_URL = "media_url"
const COLUMN_MEMO = "memo"
const COLUMN_METAS = "metas"
const COLUMN_ORDER_ID = "order_id"
const COLUMN_PARENT_ID = "parent_id"
const COLUMN_PRICE = "price"
const COLUMN_PRODUCT_ID = "product_id"
const COLUMN_QUANTITY = "quantity"
const COLUMN_SEQUENCE = "sequence"
const COLUMN_SHORT_DESCRIPTION = "short_description"
const COLUMN_SOFT_DELETED_AT = "soft_deleted_at"
const COLUMN_STARTS_AT = "starts_at"
const COLUMN_STATUS = "status"
const COLUMN_TITLE = "title"
const COLUMN_TYPE = "type"
const COLUMN_UPDATED_AT = "updated_at"
const DISCOUNT_DURATION_FOREVER = "forever"
const DISCOUNT_DURATION_MONTHS = "months"
const DISCOUNT_DURATION_ONCE = "once"
const DISCOUNT_STATUS_ACTIVE = "active"
const DISCOUNT_STATUS_DRAFT = "draft"
const DISCOUNT_STATUS_INACTIVE = "inactive"
const DISCOUNT_TYPE_AMOUNT = "amount"
const DISCOUNT_TYPE_PERCENT = "percent"
const MEDIA_STATUS_ACTIVE = "active"
const MEDIA_STATUS_DRAFT = "draft"
const MEDIA_STATUS_INACTIVE = "inactive"
const MEDIA_TYPE_IMAGE_JPG = "image/jpeg"
const MEDIA_TYPE_IMAGE_PNG = "image/png"
const MEDIA_TYPE_VIDEO_MP4 = "video/mp4"
const ORDER_STATUS_AWAITING_FULFILLMENT = "awaiting_fulfillment"
Customer has completed the checkout process and payment has been confirmed.
const ORDER_STATUS_AWAITING_PAYMENT = "awaiting_payment"
Customer has completed the checkout process, but payment has yet to be confirmed.
const ORDER_STATUS_AWAITING_PICKUP = "awaiting_pickup"
Order has been packaged and is awaiting customer pickup from a seller-specified location.
const ORDER_STATUS_AWAITING_SHIPMENT = "awaiting_shipment"
Order has been pulled and packaged and is awaiting collection from a shipping provider.
const ORDER_STATUS_CANCELLED = "cancelled"
Seller has cancelled an order, due to a stock inconsistency or other reasons. Cancelling an order will not refund the order.
const ORDER_STATUS_COMPLETED = "completed"
Order has been shipped/picked up, and receipt is confirmed; client has paid for their digital product, and their file(s) are available for download.
const ORDER_STATUS_DECLINED = "declined"
Seller has marked the order as declined.
const ORDER_STATUS_DISPUTED = "disputed"
Customer has initiated a dispute resolution process for the PayPal transaction that paid for the order or the seller has marked the order as a fraudulent order.
const ORDER_STATUS_MANUAL_VERIFICATION_REQUIRED = "manual_verification_required"
Order on hold while some aspect, such as tax-exempt documentation, is manually confirmed. Orders with this status must be updated manually.
const ORDER_STATUS_PARTIALLY_REFUNDED = "partially_refunded"
Seller has partially refunded the order.
const ORDER_STATUS_PARTIALLY_SHIPPED = "partially_shipped"
Only some items in the order have been shipped.
const ORDER_STATUS_PENDING = "pending"
Customer started the checkout process but did not complete it.
const ORDER_STATUS_REFUNDED = "refunded"
Seller has used the Refund action to refund the whole order. A listing of all orders with a "Refunded" status can be found under the More tab of the View Orders screen.
const ORDER_STATUS_SHIPPED = "shipped"
Order has been shipped, but receipt has not been confirmed; seller has used the Ship Items action. A listing of all orders with a "Shipped" status can be found under the More tab of the View Orders screen.
const PRODUCT_STATUS_ACTIVE = "active"
const PRODUCT_STATUS_DISABLED = "disabled"
const PRODUCT_STATUS_DRAFT = "draft"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct {
dataobject.DataObject
}
func (*Category) CreatedAtCarbon ¶
func (*Category) CustomerID ¶
func (*Category) Description ¶
func (*Category) IsInactive ¶
func (*Category) IsSoftDeleted ¶
func (*Category) SetCreatedAt ¶
func (category *Category) SetCreatedAt(createdAt string) CategoryInterface
func (*Category) SetCustomerID ¶
func (category *Category) SetCustomerID(id string) CategoryInterface
func (*Category) SetDescription ¶
func (category *Category) SetDescription(description string) CategoryInterface
func (*Category) SetID ¶
func (category *Category) SetID(id string) CategoryInterface
func (*Category) SetMemo ¶
func (category *Category) SetMemo(memo string) CategoryInterface
func (*Category) SetMetas ¶
SetMetas stores metas as json string Warning: it overwrites any existing metas
func (*Category) SetParentID ¶
func (category *Category) SetParentID(parentID string) CategoryInterface
func (*Category) SetSoftDeletedAt ¶
func (category *Category) SetSoftDeletedAt(softDeletedAt string) CategoryInterface
func (*Category) SetStatus ¶
func (category *Category) SetStatus(status string) CategoryInterface
func (*Category) SetTitle ¶
func (category *Category) SetTitle(title string) CategoryInterface
func (*Category) SetUpdatedAt ¶
func (category *Category) SetUpdatedAt(updatedAt string) CategoryInterface
func (*Category) SoftDeletedAt ¶
func (*Category) SoftDeletedAtCarbon ¶
func (*Category) UpdatedAtCarbon ¶
type CategoryInterface ¶
type CategoryInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
CreatedAt() string
CreatedAtCarbon() *carbon.Carbon
SetCreatedAt(createdAt string) CategoryInterface
Description() string
SetDescription(description string) CategoryInterface
ID() string
SetID(id string) CategoryInterface
Memo() string
SetMemo(memo string) CategoryInterface
Metas() (map[string]string, error)
Meta(name string) string
SetMeta(name string, value string) error
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
ParentID() string
SetParentID(parentID string) CategoryInterface
Status() string
SetStatus(status string) CategoryInterface
Title() string
SetTitle(title string) CategoryInterface
SoftDeletedAt() string
SoftDeletedAtCarbon() *carbon.Carbon
SetSoftDeletedAt(deletedAt string) CategoryInterface
UpdatedAt() string
UpdatedAtCarbon() *carbon.Carbon
SetUpdatedAt(updatedAt string) CategoryInterface
}
func NewCategory ¶
func NewCategory() CategoryInterface
type CategoryQueryInterface ¶
type CategoryQueryInterface interface {
Validate() error
Columns() []string
SetColumns(columns []string) CategoryQueryInterface
HasCountOnly() bool
IsCountOnly() bool
SetCountOnly(countOnly bool) CategoryQueryInterface
HasID() bool
ID() string
SetID(id string) CategoryQueryInterface
HasIDIn() bool
IDIn() []string
SetIDIn(idIn []string) CategoryQueryInterface
HasLimit() bool
Limit() int
SetLimit(limit int) CategoryQueryInterface
HasOffset() bool
Offset() int
SetOffset(offset int) CategoryQueryInterface
HasOrderBy() bool
OrderBy() string
SetOrderBy(orderBy string) CategoryQueryInterface
HasSortDirection() bool
SortDirection() string
SetSortDirection(sortDirection string) CategoryQueryInterface
HasParentID() bool
ParentID() string
SetParentID(parentID string) CategoryQueryInterface
HasSoftDeletedIncluded() bool
SoftDeletedIncluded() bool
SetSoftDeletedIncluded(softDeletedIncluded bool) CategoryQueryInterface
HasStatus() bool
Status() string
SetStatus(status string) CategoryQueryInterface
HasTitleLike() bool
TitleLike() string
SetTitleLike(titleLike string) CategoryQueryInterface
// contains filtered or unexported methods
}
func NewCategoryQuery ¶
func NewCategoryQuery() CategoryQueryInterface
type Discount ¶
type Discount struct {
dataobject.DataObject
}
func (*Discount) CreatedAtCarbon ¶
func (*Discount) Description ¶
func (*Discount) EndsAtCarbon ¶
func (*Discount) MetaRemove ¶
func (*Discount) MetasRemove ¶
func (*Discount) SetAmount ¶
func (d *Discount) SetAmount(amount float64) DiscountInterface
func (*Discount) SetCode ¶
func (d *Discount) SetCode(code string) DiscountInterface
func (*Discount) SetCreatedAt ¶
func (d *Discount) SetCreatedAt(createdAt string) DiscountInterface
func (*Discount) SetDescription ¶
func (d *Discount) SetDescription(description string) DiscountInterface
func (*Discount) SetEndsAt ¶
func (d *Discount) SetEndsAt(endsAt string) DiscountInterface
func (*Discount) SetID ¶
func (o *Discount) SetID(id string) DiscountInterface
SetID sets the ID of the exam
func (*Discount) SetMemo ¶
func (d *Discount) SetMemo(memo string) DiscountInterface
func (*Discount) SetMetas ¶
SetMetas stores metas as json string Warning: it overwrites any existing metas
func (*Discount) SetSoftDeletedAt ¶
func (d *Discount) SetSoftDeletedAt(deletedAt string) DiscountInterface
func (*Discount) SetStartsAt ¶
func (d *Discount) SetStartsAt(startsAt string) DiscountInterface
func (*Discount) SetStatus ¶
func (d *Discount) SetStatus(status string) DiscountInterface
func (*Discount) SetTitle ¶
func (d *Discount) SetTitle(title string) DiscountInterface
func (*Discount) SetType ¶
func (d *Discount) SetType(type_ string) DiscountInterface
func (*Discount) SetUpdatedAt ¶
func (d *Discount) SetUpdatedAt(updatedAt string) DiscountInterface
func (*Discount) SoftDeletedAt ¶
func (*Discount) SoftDeletedAtCarbon ¶
func (*Discount) StartsAtCarbon ¶
func (*Discount) UpdatedAtCarbon ¶
type DiscountInterface ¶
type DiscountInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
Amount() float64
SetAmount(amount float64) DiscountInterface
Code() string
SetCode(code string) DiscountInterface
CreatedAt() string
CreatedAtCarbon() *carbon.Carbon
SetCreatedAt(createdAt string) DiscountInterface
Description() string
SetDescription(description string) DiscountInterface
EndsAt() string
EndsAtCarbon() *carbon.Carbon
SetEndsAt(endsAt string) DiscountInterface
ID() string
SetID(id string) DiscountInterface
Memo() string
SetMemo(memo string) DiscountInterface
Meta(name string) string
MetaRemove(name string) error
SetMeta(name string, value string) error
Metas() (map[string]string, error)
MetasRemove(names []string) error
MetasUpsert(metas map[string]string) error
SetMetas(metas map[string]string) error
SoftDeletedAt() string
SoftDeletedAtCarbon() *carbon.Carbon
SetSoftDeletedAt(deletedAt string) DiscountInterface
StartsAt() string
StartsAtCarbon() *carbon.Carbon
SetStartsAt(startsAt string) DiscountInterface
Status() string
SetStatus(status string) DiscountInterface
Title() string
SetTitle(title string) DiscountInterface
Type() string
SetType(type_ string) DiscountInterface
UpdatedAt() string
UpdatedAtCarbon() *carbon.Carbon
SetUpdatedAt(updatedAt string) DiscountInterface
}
func NewDiscount ¶
func NewDiscount() DiscountInterface
func NewDiscountFromExistingData ¶
func NewDiscountFromExistingData(data map[string]string) DiscountInterface
type DiscountQueryInterface ¶
type DiscountQueryInterface interface {
Validate() error
Columns() []string
SetColumns(columns []string) DiscountQueryInterface
HasCountOnly() bool
IsCountOnly() bool
SetCountOnly(countOnly bool) DiscountQueryInterface
HasCreatedAtGte() bool
CreatedAtGte() string
SetCreatedAtGte(createdAtGte string) DiscountQueryInterface
HasCreatedAtLte() bool
CreatedAtLte() string
SetCreatedAtLte(createdAtLte string) DiscountQueryInterface
HasCode() bool
Code() string
SetCode(code string) DiscountQueryInterface
HasID() bool
ID() string
SetID(id string) DiscountQueryInterface
HasIDIn() bool
IDIn() []string
SetIDIn(idIn []string) DiscountQueryInterface
HasLimit() bool
Limit() int
SetLimit(limit int) DiscountQueryInterface
HasOffset() bool
Offset() int
SetOffset(offset int) DiscountQueryInterface
HasOrderBy() bool
OrderBy() string
SetOrderBy(discountBy string) DiscountQueryInterface
HasSortDirection() bool
SortDirection() string
SetSortDirection(sortDirection string) DiscountQueryInterface
HasSoftDeletedIncluded() bool
SoftDeletedIncluded() bool
SetSoftDeletedIncluded(softDeletedIncluded bool) DiscountQueryInterface
HasStatus() bool
Status() string
SetStatus(status string) DiscountQueryInterface
HasStatusIn() bool
StatusIn() []string
SetStatusIn(statusIn []string) DiscountQueryInterface
// contains filtered or unexported methods
}
func NewDiscountQuery ¶
func NewDiscountQuery() DiscountQueryInterface
type Media ¶
type Media struct {
dataobject.DataObject
}
func (*Media) CreatedAtCarbon ¶
func (*Media) Description ¶
func (*Media) SetCreatedAt ¶
func (o *Media) SetCreatedAt(createdAt string) MediaInterface
func (*Media) SetDescription ¶
func (o *Media) SetDescription(description string) MediaInterface
func (*Media) SetEntityID ¶
func (o *Media) SetEntityID(entityID string) MediaInterface
func (*Media) SetID ¶
func (o *Media) SetID(id string) MediaInterface
func (*Media) SetMemo ¶
func (o *Media) SetMemo(memo string) MediaInterface
func (*Media) SetMetas ¶
SetMetas stores metas as json string Warning: it overwrites any existing metas
func (*Media) SetSequence ¶
func (o *Media) SetSequence(sequence int) MediaInterface
func (*Media) SetSoftDeletedAt ¶
func (o *Media) SetSoftDeletedAt(softDeletedAt string) MediaInterface
func (*Media) SetStatus ¶
func (o *Media) SetStatus(status string) MediaInterface
func (*Media) SetTitle ¶
func (o *Media) SetTitle(title string) MediaInterface
func (*Media) SetType ¶
func (o *Media) SetType(type_ string) MediaInterface
func (*Media) SetURL ¶
func (o *Media) SetURL(url string) MediaInterface
func (*Media) SetUpdatedAt ¶
func (o *Media) SetUpdatedAt(updatedAt string) MediaInterface
func (*Media) SoftDeletedAt ¶
func (*Media) SoftDeletedAtCarbon ¶
func (*Media) UpdatedAtCarbon ¶
type MediaInterface ¶
type MediaInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
CreatedAt() string
CreatedAtCarbon() *carbon.Carbon
SetCreatedAt(createdAt string) MediaInterface
Description() string
SetDescription(description string) MediaInterface
EntityID() string
SetEntityID(entityID string) MediaInterface
ID() string
SetID(id string) MediaInterface
Memo() string
SetMemo(memo string) MediaInterface
Metas() (map[string]string, error)
Meta(name string) string
SetMeta(name string, value string) error
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
Sequence() int
SetSequence(sequence int) MediaInterface
SoftDeletedAt() string
SoftDeletedAtCarbon() *carbon.Carbon
SetSoftDeletedAt(softDeletedAt string) MediaInterface
Status() string
SetStatus(status string) MediaInterface
Title() string
SetTitle(title string) MediaInterface
Type() string
SetType(type_ string) MediaInterface
URL() string
SetURL(url string) MediaInterface
UpdatedAt() string
UpdatedAtCarbon() *carbon.Carbon
SetUpdatedAt(updatedAt string) MediaInterface
}
func NewMedia ¶
func NewMedia() MediaInterface
type MediaQueryInterface ¶
type MediaQueryInterface interface {
Validate() error
Columns() []string
SetColumns(columns []string) MediaQueryInterface
HasCountOnly() bool
IsCountOnly() bool
SetCountOnly(countOnly bool) MediaQueryInterface
HasEntityID() bool
EntityID() string
SetEntityID(entityID string) MediaQueryInterface
HasID() bool
ID() string
SetID(id string) MediaQueryInterface
HasIDIn() bool
IDIn() []string
SetIDIn(idIn []string) MediaQueryInterface
HasLimit() bool
Limit() int
SetLimit(limit int) MediaQueryInterface
HasOffset() bool
Offset() int
SetOffset(offset int) MediaQueryInterface
HasOrderBy() bool
OrderBy() string
SetOrderBy(orderBy string) MediaQueryInterface
HasSortDirection() bool
SortDirection() string
SetSortDirection(sortDirection string) MediaQueryInterface
HasSoftDeletedIncluded() bool
SoftDeletedIncluded() bool
SetSoftDeletedIncluded(softDeletedIncluded bool) MediaQueryInterface
HasStatus() bool
Status() string
SetStatus(status string) MediaQueryInterface
HasTitleLike() bool
TitleLike() string
SetTitleLike(titleLike string) MediaQueryInterface
HasType() bool
Type() string
SetType(mediaType string) MediaQueryInterface
// contains filtered or unexported methods
}
func NewMediaQuery ¶
func NewMediaQuery() MediaQueryInterface
type NewStoreOptions ¶
type NewStoreOptions struct {
CategoryTableName string
DiscountTableName string
MediaTableName string
OrderTableName string
OrderLineItemTableName string
ProductTableName string
DB *sql.DB
DbDriverName string
AutomigrateEnabled bool
DebugEnabled bool
}
NewStoreOptions define the options for creating a new block store
type Order ¶
type Order struct {
dataobject.DataObject
}
func (*Order) CreatedAtCarbon ¶
func (*Order) CustomerID ¶
func (*Order) IsAwaitingFulfillment ¶
func (*Order) IsAwaitingPayment ¶
func (*Order) IsAwaitingPickup ¶
func (*Order) IsAwaitingShipment ¶
func (*Order) IsCancelled ¶
func (*Order) IsCompleted ¶
func (*Order) IsDeclined ¶
func (*Order) IsDisputed ¶
func (*Order) IsManualVerificationRequired ¶
func (*Order) IsRefunded ¶
func (*Order) PriceFloat ¶
func (*Order) QuantityInt ¶
func (*Order) SetCreatedAt ¶
func (order *Order) SetCreatedAt(createdAt string) OrderInterface
func (*Order) SetCustomerID ¶
func (order *Order) SetCustomerID(id string) OrderInterface
func (*Order) SetID ¶
func (order *Order) SetID(id string) OrderInterface
func (*Order) SetMemo ¶
func (order *Order) SetMemo(memo string) OrderInterface
func (*Order) SetMetas ¶
SetMetas stores metas as json string Warning: it overwrites any existing metas
func (*Order) SetPrice ¶
func (order *Order) SetPrice(price string) OrderInterface
func (*Order) SetPriceFloat ¶
func (order *Order) SetPriceFloat(price float64) OrderInterface
func (*Order) SetQuantity ¶
func (order *Order) SetQuantity(quantity string) OrderInterface
func (*Order) SetQuantityInt ¶
func (order *Order) SetQuantityInt(quantity int64) OrderInterface
func (*Order) SetSoftDeletedAt ¶
func (order *Order) SetSoftDeletedAt(deletedAt string) OrderInterface
func (*Order) SetStatus ¶
func (order *Order) SetStatus(status string) OrderInterface
func (*Order) SetUpdatedAt ¶
func (order *Order) SetUpdatedAt(updatedAt string) OrderInterface
func (*Order) SoftDeletedAt ¶
func (*Order) SoftDeletedAtCarbon ¶
func (*Order) UpdatedAtCarbon ¶
type OrderInterface ¶
type OrderInterface interface {
// Inherited from DataObject
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
// Methods
IsAwaitingFulfillment() bool
IsAwaitingPayment() bool
IsAwaitingPickup() bool
IsAwaitingShipment() bool
IsCancelled() bool
IsCompleted() bool
IsDeclined() bool
IsDisputed() bool
IsManualVerificationRequired() bool
IsPending() bool
IsRefunded() bool
IsShipped() bool
// Setters and Getters
CreatedAt() string
CreatedAtCarbon() *carbon.Carbon
SetCreatedAt(createdAt string) OrderInterface
CustomerID() string
SetCustomerID(customerID string) OrderInterface
ID() string
SetID(id string) OrderInterface
Memo() string
SetMemo(memo string) OrderInterface
Meta(name string) string
SetMeta(name string, value string) error
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
Price() string
SetPrice(price string) OrderInterface
PriceFloat() float64
SetPriceFloat(price float64) OrderInterface
Quantity() string
SetQuantity(quantity string) OrderInterface
QuantityInt() int64
SetQuantityInt(quantity int64) OrderInterface
SoftDeletedAt() string
SoftDeletedAtCarbon() *carbon.Carbon
SetSoftDeletedAt(deletedAt string) OrderInterface
Status() string
SetStatus(status string) OrderInterface
UpdatedAt() string
UpdatedAtCarbon() *carbon.Carbon
SetUpdatedAt(updatedAt string) OrderInterface
}
func NewOrder ¶
func NewOrder() OrderInterface
type OrderLineItem ¶
type OrderLineItem struct {
dataobject.DataObject
}
func (*OrderLineItem) CreatedAt ¶
func (o *OrderLineItem) CreatedAt() string
func (*OrderLineItem) CreatedAtCarbon ¶
func (o *OrderLineItem) CreatedAtCarbon() *carbon.Carbon
func (*OrderLineItem) ID ¶
func (o *OrderLineItem) ID() string
func (*OrderLineItem) Memo ¶
func (o *OrderLineItem) Memo() string
func (*OrderLineItem) Meta ¶
func (o *OrderLineItem) Meta(name string) string
func (*OrderLineItem) OrderID ¶
func (o *OrderLineItem) OrderID() string
func (*OrderLineItem) Price ¶
func (o *OrderLineItem) Price() string
func (*OrderLineItem) PriceFloat ¶
func (o *OrderLineItem) PriceFloat() float64
func (*OrderLineItem) ProductID ¶
func (o *OrderLineItem) ProductID() string
func (*OrderLineItem) Quantity ¶
func (o *OrderLineItem) Quantity() string
func (*OrderLineItem) QuantityInt ¶
func (o *OrderLineItem) QuantityInt() int64
func (*OrderLineItem) SetCreatedAt ¶
func (o *OrderLineItem) SetCreatedAt(createdAt string) OrderLineItemInterface
func (*OrderLineItem) SetID ¶
func (o *OrderLineItem) SetID(id string) OrderLineItemInterface
func (*OrderLineItem) SetMemo ¶
func (o *OrderLineItem) SetMemo(memo string) OrderLineItemInterface
func (*OrderLineItem) SetMetas ¶
func (o *OrderLineItem) SetMetas(metas map[string]string) error
SetMetas stores metas as json string Warning: it overwrites any existing metas
func (*OrderLineItem) SetOrderID ¶
func (o *OrderLineItem) SetOrderID(orderID string) OrderLineItemInterface
func (*OrderLineItem) SetPrice ¶
func (o *OrderLineItem) SetPrice(price string) OrderLineItemInterface
func (*OrderLineItem) SetPriceFloat ¶
func (o *OrderLineItem) SetPriceFloat(price float64) OrderLineItemInterface
func (*OrderLineItem) SetProductID ¶
func (o *OrderLineItem) SetProductID(productID string) OrderLineItemInterface
func (*OrderLineItem) SetQuantity ¶
func (o *OrderLineItem) SetQuantity(quantity string) OrderLineItemInterface
func (*OrderLineItem) SetQuantityInt ¶
func (o *OrderLineItem) SetQuantityInt(quantity int64) OrderLineItemInterface
func (*OrderLineItem) SetSoftDeletedAt ¶
func (o *OrderLineItem) SetSoftDeletedAt(deletedAt string) OrderLineItemInterface
func (*OrderLineItem) SetStatus ¶
func (o *OrderLineItem) SetStatus(status string) OrderLineItemInterface
func (*OrderLineItem) SetTitle ¶
func (o *OrderLineItem) SetTitle(title string) OrderLineItemInterface
func (*OrderLineItem) SetUpdatedAt ¶
func (o *OrderLineItem) SetUpdatedAt(updatedAt string) OrderLineItemInterface
func (*OrderLineItem) SoftDeletedAt ¶
func (o *OrderLineItem) SoftDeletedAt() string
func (*OrderLineItem) SoftDeletedAtCarbon ¶
func (o *OrderLineItem) SoftDeletedAtCarbon() *carbon.Carbon
func (*OrderLineItem) Status ¶
func (o *OrderLineItem) Status() string
func (*OrderLineItem) Title ¶
func (o *OrderLineItem) Title() string
func (*OrderLineItem) UpdatedAt ¶
func (o *OrderLineItem) UpdatedAt() string
func (*OrderLineItem) UpdatedAtCarbon ¶
func (o *OrderLineItem) UpdatedAtCarbon() *carbon.Carbon
func (*OrderLineItem) UpsertMetas ¶
func (o *OrderLineItem) UpsertMetas(metas map[string]string) error
type OrderLineItemInterface ¶
type OrderLineItemInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
CreatedAt() string
CreatedAtCarbon() *carbon.Carbon
SetCreatedAt(createdAt string) OrderLineItemInterface
ID() string
SetID(id string) OrderLineItemInterface
Memo() string
SetMemo(memo string) OrderLineItemInterface
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
Meta(name string) string
SetMeta(name string, value string) error
UpsertMetas(metas map[string]string) error
OrderID() string
SetOrderID(orderID string) OrderLineItemInterface
Price() string
SetPrice(price string) OrderLineItemInterface
PriceFloat() float64
SetPriceFloat(price float64) OrderLineItemInterface
ProductID() string
SetProductID(productID string) OrderLineItemInterface
Quantity() string
SetQuantity(quantity string) OrderLineItemInterface
QuantityInt() int64
SetQuantityInt(quantity int64) OrderLineItemInterface
SoftDeletedAt() string
SoftDeletedAtCarbon() *carbon.Carbon
SetSoftDeletedAt(deletedAt string) OrderLineItemInterface
Status() string
SetStatus(status string) OrderLineItemInterface
Title() string
SetTitle(title string) OrderLineItemInterface
UpdatedAt() string
UpdatedAtCarbon() *carbon.Carbon
SetUpdatedAt(updatedAt string) OrderLineItemInterface
}
func NewOrderLineItem ¶
func NewOrderLineItem() OrderLineItemInterface
func NewOrderLineItemFromExistingData ¶
func NewOrderLineItemFromExistingData(data map[string]string) OrderLineItemInterface
type OrderLineItemQueryInterface ¶
type OrderLineItemQueryInterface interface {
Validate() error
Columns() []string
SetColumns(columns []string) OrderLineItemQueryInterface
HasCountOnly() bool
IsCountOnly() bool
SetCountOnly(countOnly bool) OrderLineItemQueryInterface
HasCreatedAtGte() bool
CreatedAtGte() string
SetCreatedAtGte(createdAtGte string) OrderLineItemQueryInterface
HasCreatedAtLte() bool
CreatedAtLte() string
SetCreatedAtLte(createdAtLte string) OrderLineItemQueryInterface
HasID() bool
ID() string
SetID(id string) OrderLineItemQueryInterface
HasIDIn() bool
IDIn() []string
SetIDIn(idIn []string) OrderLineItemQueryInterface
HasLimit() bool
Limit() int
SetLimit(limit int) OrderLineItemQueryInterface
HasOffset() bool
Offset() int
SetOffset(offset int) OrderLineItemQueryInterface
HasOrderBy() bool
OrderBy() string
SetOrderBy(orderBy string) OrderLineItemQueryInterface
HasOrderID() bool
OrderID() string
SetOrderID(orderID string) OrderLineItemQueryInterface
HasOrderIDIn() bool
OrderIDIn() []string
SetOrderIDIn(orderIDIn []string) OrderLineItemQueryInterface
HasProductID() bool
ProductID() string
SetProductID(productID string) OrderLineItemQueryInterface
HasSortDirection() bool
SortDirection() string
SetSortDirection(sortDirection string) OrderLineItemQueryInterface
HasSoftDeletedIncluded() bool
SoftDeletedIncluded() bool
SetSoftDeletedIncluded(softDeletedIncluded bool) OrderLineItemQueryInterface
HasStatus() bool
Status() string
SetStatus(status string) OrderLineItemQueryInterface
HasStatusIn() bool
StatusIn() []string
SetStatusIn(statusIn []string) OrderLineItemQueryInterface
// contains filtered or unexported methods
}
func NewOrderLineItemQuery ¶
func NewOrderLineItemQuery() OrderLineItemQueryInterface
type OrderQueryInterface ¶
type OrderQueryInterface interface {
Validate() error
Columns() []string
SetColumns(columns []string) OrderQueryInterface
HasCountOnly() bool
IsCountOnly() bool
SetCountOnly(countOnly bool) OrderQueryInterface
HasCreatedAtGte() bool
CreatedAtGte() string
SetCreatedAtGte(createdAtGte string) OrderQueryInterface
HasCreatedAtLte() bool
CreatedAtLte() string
SetCreatedAtLte(createdAtLte string) OrderQueryInterface
HasCustomerID() bool
CustomerID() string
SetCustomerID(customerID string) OrderQueryInterface
HasID() bool
ID() string
SetID(id string) OrderQueryInterface
HasIDIn() bool
IDIn() []string
SetIDIn(idIn []string) OrderQueryInterface
HasLimit() bool
Limit() int
SetLimit(limit int) OrderQueryInterface
HasOffset() bool
Offset() int
SetOffset(offset int) OrderQueryInterface
HasOrderBy() bool
OrderBy() string
SetOrderBy(orderBy string) OrderQueryInterface
HasSortDirection() bool
SortDirection() string
SetSortDirection(sortDirection string) OrderQueryInterface
HasSoftDeletedIncluded() bool
SoftDeletedIncluded() bool
SetSoftDeletedIncluded(softDeletedIncluded bool) OrderQueryInterface
HasStatus() bool
Status() string
SetStatus(status string) OrderQueryInterface
HasStatusIn() bool
StatusIn() []string
SetStatusIn(statusIn []string) OrderQueryInterface
// contains filtered or unexported methods
}
func NewOrderQuery ¶
func NewOrderQuery() OrderQueryInterface
type Product ¶
type Product struct {
dataobject.DataObject
}
func (*Product) CreatedAtCarbon ¶
func (*Product) Description ¶
func (*Product) IsDisabled ¶
func (*Product) IsSoftDeleted ¶
func (*Product) PriceFloat ¶
func (*Product) QuantityInt ¶
func (*Product) SetCreatedAt ¶
func (product *Product) SetCreatedAt(createdAt string) ProductInterface
func (*Product) SetDescription ¶
func (product *Product) SetDescription(description string) ProductInterface
func (*Product) SetID ¶
func (product *Product) SetID(id string) ProductInterface
func (*Product) SetMemo ¶
func (product *Product) SetMemo(memo string) ProductInterface
func (*Product) SetMetas ¶
SetMetas stores metas as json string Warning: it overwrites any existing metas
func (*Product) SetPrice ¶
func (product *Product) SetPrice(price string) ProductInterface
func (*Product) SetPriceFloat ¶
func (product *Product) SetPriceFloat(price float64) ProductInterface
func (*Product) SetQuantity ¶
func (product *Product) SetQuantity(quantity string) ProductInterface
func (*Product) SetQuantityInt ¶
func (product *Product) SetQuantityInt(quantity int64) ProductInterface
func (*Product) SetShortDescription ¶
func (product *Product) SetShortDescription(shortDescription string) ProductInterface
func (*Product) SetSoftDeletedAt ¶
func (product *Product) SetSoftDeletedAt(deletedAt string) ProductInterface
func (*Product) SetStatus ¶
func (product *Product) SetStatus(status string) ProductInterface
func (*Product) SetTitle ¶
func (product *Product) SetTitle(title string) ProductInterface
func (*Product) SetUpdatedAt ¶
func (product *Product) SetUpdatedAt(updatedAt string) ProductInterface
func (*Product) ShortDescription ¶
func (*Product) SoftDeletedAt ¶
func (*Product) SoftDeletedAtCarbon ¶
func (*Product) UpdatedAtCarbon ¶
type ProductInterface ¶
type ProductInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
IsActive() bool
IsDisabled() bool
IsDraft() bool
IsSoftDeleted() bool
IsFree() bool
Slug() string
CreatedAt() string
CreatedAtCarbon() *carbon.Carbon
SetCreatedAt(createdAt string) ProductInterface
Description() string
SetDescription(description string) ProductInterface
ID() string
SetID(id string) ProductInterface
Memo() string
SetMemo(memo string) ProductInterface
Meta(name string) string
SetMeta(name string, value string) error
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
Price() string
SetPrice(price string) ProductInterface
PriceFloat() float64
SetPriceFloat(price float64) ProductInterface
Quantity() string
SetQuantity(quantity string) ProductInterface
QuantityInt() int64
SetQuantityInt(quantity int64) ProductInterface
SoftDeletedAt() string
SoftDeletedAtCarbon() *carbon.Carbon
SetSoftDeletedAt(deletedAt string) ProductInterface
ShortDescription() string
SetShortDescription(shortDescription string) ProductInterface
Status() string
SetStatus(status string) ProductInterface
Title() string
SetTitle(title string) ProductInterface
UpdatedAt() string
UpdatedAtCarbon() *carbon.Carbon
SetUpdatedAt(updatedAt string) ProductInterface
}
func NewProduct ¶
func NewProduct() ProductInterface
func NewProductFromExistingData ¶
func NewProductFromExistingData(data map[string]string) ProductInterface
type ProductQueryInterface ¶
type ProductQueryInterface interface {
Validate() error
Columns() []string
SetColumns(columns []string) ProductQueryInterface
HasCountOnly() bool
IsCountOnly() bool
SetCountOnly(countOnly bool) ProductQueryInterface
HasCreatedAtGte() bool
CreatedAtGte() string
SetCreatedAtGte(createdAtGte string) ProductQueryInterface
HasCreatedAtLte() bool
CreatedAtLte() string
SetCreatedAtLte(createdAtLte string) ProductQueryInterface
HasID() bool
ID() string
SetID(id string) ProductQueryInterface
HasIDIn() bool
IDIn() []string
SetIDIn(idIn []string) ProductQueryInterface
HasLimit() bool
Limit() int
SetLimit(limit int) ProductQueryInterface
HasOffset() bool
Offset() int
SetOffset(offset int) ProductQueryInterface
HasOrderBy() bool
OrderBy() string
SetOrderBy(orderBy string) ProductQueryInterface
HasSortDirection() bool
SortDirection() string
SetSortDirection(sortDirection string) ProductQueryInterface
HasSoftDeletedIncluded() bool
SoftDeletedIncluded() bool
SetSoftDeletedIncluded(softDeletedIncluded bool) ProductQueryInterface
HasStatus() bool
Status() string
SetStatus(status string) ProductQueryInterface
HasStatusIn() bool
StatusIn() []string
SetStatusIn(statusIn []string) ProductQueryInterface
HasTitleLike() bool
TitleLike() string
SetTitleLike(titleLike string) ProductQueryInterface
// contains filtered or unexported methods
}
func NewProductQuery ¶
func NewProductQuery() ProductQueryInterface
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(opts NewStoreOptions) (*Store, error)
NewStore creates a new block store
func (*Store) CategoryCount ¶
func (*Store) CategoryCreate ¶
func (store *Store) CategoryCreate(ctx context.Context, category CategoryInterface) error
func (*Store) CategoryDelete ¶
func (store *Store) CategoryDelete(ctx context.Context, category CategoryInterface) error
func (*Store) CategoryDeleteByID ¶
func (*Store) CategoryFindByID ¶
func (*Store) CategoryList ¶
func (store *Store) CategoryList(ctx context.Context, options CategoryQueryInterface) ([]CategoryInterface, error)
func (*Store) CategorySoftDelete ¶
func (store *Store) CategorySoftDelete(ctx context.Context, category CategoryInterface) error
func (*Store) CategorySoftDeleteByID ¶
func (*Store) CategoryTableName ¶
func (*Store) CategoryUpdate ¶
func (store *Store) CategoryUpdate(ctx context.Context, category CategoryInterface) (err error)
func (*Store) DiscountCount ¶
func (*Store) DiscountCreate ¶
func (store *Store) DiscountCreate(ctx context.Context, discount DiscountInterface) error
func (*Store) DiscountDelete ¶
func (store *Store) DiscountDelete(ctx context.Context, discount DiscountInterface) error
func (*Store) DiscountDeleteByID ¶
func (*Store) DiscountFindByCode ¶
func (*Store) DiscountFindByID ¶
func (*Store) DiscountList ¶
func (store *Store) DiscountList(ctx context.Context, options DiscountQueryInterface) ([]DiscountInterface, error)
func (*Store) DiscountSoftDelete ¶
func (store *Store) DiscountSoftDelete(ctx context.Context, discount DiscountInterface) error
func (*Store) DiscountSoftDeleteByID ¶
func (*Store) DiscountTableName ¶
func (*Store) DiscountUpdate ¶
func (store *Store) DiscountUpdate(ctx context.Context, discount DiscountInterface) error
func (*Store) EnableDebug ¶
EnableDebug - enables the debug option
func (*Store) MediaCount ¶
func (*Store) MediaCreate ¶
func (store *Store) MediaCreate(ctx context.Context, media MediaInterface) error
func (*Store) MediaDelete ¶
func (store *Store) MediaDelete(ctx context.Context, media MediaInterface) error
func (*Store) MediaDeleteByID ¶
func (*Store) MediaFindByID ¶
func (*Store) MediaList ¶
func (store *Store) MediaList(ctx context.Context, options MediaQueryInterface) ([]MediaInterface, error)
func (*Store) MediaSoftDelete ¶
func (store *Store) MediaSoftDelete(ctx context.Context, media MediaInterface) error
func (*Store) MediaSoftDeleteByID ¶
func (*Store) MediaTableName ¶
func (*Store) MediaUpdate ¶
func (store *Store) MediaUpdate(ctx context.Context, media MediaInterface) (err error)
func (*Store) OrderCount ¶
func (*Store) OrderCreate ¶
func (store *Store) OrderCreate(ctx context.Context, order OrderInterface) error
func (*Store) OrderDelete ¶
func (store *Store) OrderDelete(ctx context.Context, order OrderInterface) error
func (*Store) OrderDeleteByID ¶
func (*Store) OrderFindByID ¶
func (*Store) OrderLineItemCount ¶
func (*Store) OrderLineItemCreate ¶
func (store *Store) OrderLineItemCreate(ctx context.Context, orderLineItem OrderLineItemInterface) error
func (*Store) OrderLineItemDelete ¶
func (store *Store) OrderLineItemDelete(ctx context.Context, orderLineItem OrderLineItemInterface) error
func (*Store) OrderLineItemDeleteByID ¶
func (*Store) OrderLineItemFindByID ¶
func (*Store) OrderLineItemList ¶
func (store *Store) OrderLineItemList(ctx context.Context, options OrderLineItemQueryInterface) ([]OrderLineItemInterface, error)
func (*Store) OrderLineItemSoftDelete ¶
func (store *Store) OrderLineItemSoftDelete(ctx context.Context, orderLineItem OrderLineItemInterface) error
func (*Store) OrderLineItemSoftDeleteByID ¶
func (*Store) OrderLineItemTableName ¶
func (*Store) OrderLineItemUpdate ¶
func (store *Store) OrderLineItemUpdate(ctx context.Context, orderLineItem OrderLineItemInterface) error
func (*Store) OrderList ¶
func (store *Store) OrderList(ctx context.Context, options OrderQueryInterface) ([]OrderInterface, error)
func (*Store) OrderSoftDelete ¶
func (store *Store) OrderSoftDelete(ctx context.Context, order OrderInterface) error
func (*Store) OrderSoftDeleteByID ¶
func (*Store) OrderTableName ¶
func (*Store) OrderUpdate ¶
func (store *Store) OrderUpdate(ctx context.Context, order OrderInterface) error
func (*Store) ProductCount ¶
func (*Store) ProductCreate ¶
func (store *Store) ProductCreate(ctx context.Context, product ProductInterface) error
func (*Store) ProductDelete ¶
func (store *Store) ProductDelete(ctx context.Context, product ProductInterface) error
func (*Store) ProductDeleteByID ¶
func (*Store) ProductFindByID ¶
func (*Store) ProductList ¶
func (store *Store) ProductList(ctx context.Context, options ProductQueryInterface) ([]ProductInterface, error)
func (*Store) ProductSoftDelete ¶
func (store *Store) ProductSoftDelete(ctx context.Context, product ProductInterface) error
func (*Store) ProductSoftDeleteByID ¶
func (*Store) ProductTableName ¶
func (*Store) ProductUpdate ¶
func (store *Store) ProductUpdate(ctx context.Context, product ProductInterface) error
type StoreInterface ¶
type StoreInterface interface {
AutoMigrate() error
DB() *sql.DB
EnableDebug(debug bool, sqlLogger ...*slog.Logger)
CategoryTableName() string
DiscountTableName() string
MediaTableName() string
OrderTableName() string
OrderLineItemTableName() string
ProductTableName() string
CategoryCount(ctx context.Context, options CategoryQueryInterface) (int64, error)
CategoryCreate(context context.Context, category CategoryInterface) error
CategoryDelete(context context.Context, category CategoryInterface) error
CategoryDeleteByID(context context.Context, categoryID string) error
CategoryFindByID(context context.Context, categoryID string) (CategoryInterface, error)
CategoryList(context context.Context, options CategoryQueryInterface) ([]CategoryInterface, error)
CategorySoftDelete(context context.Context, category CategoryInterface) error
CategorySoftDeleteByID(context context.Context, categoryID string) error
CategoryUpdate(contxt context.Context, category CategoryInterface) error
DiscountCount(ctx context.Context, options DiscountQueryInterface) (int64, error)
DiscountCreate(ctx context.Context, discount DiscountInterface) error
DiscountDelete(ctx context.Context, discount DiscountInterface) error
DiscountDeleteByID(ctx context.Context, discountID string) error
DiscountFindByID(ctx context.Context, discountID string) (DiscountInterface, error)
DiscountFindByCode(ctx context.Context, code string) (DiscountInterface, error)
DiscountList(ctx context.Context, options DiscountQueryInterface) ([]DiscountInterface, error)
DiscountSoftDelete(ctx context.Context, discount DiscountInterface) error
DiscountSoftDeleteByID(ctx context.Context, discountID string) error
DiscountUpdate(ctx context.Context, discount DiscountInterface) error
MediaCount(ctx context.Context, options MediaQueryInterface) (int64, error)
MediaCreate(ctx context.Context, media MediaInterface) error
MediaDelete(ctx context.Context, media MediaInterface) error
MediaDeleteByID(ctx context.Context, mediaID string) error
MediaFindByID(ctx context.Context, mediaID string) (MediaInterface, error)
MediaList(ctx context.Context, options MediaQueryInterface) ([]MediaInterface, error)
MediaSoftDelete(ctx context.Context, media MediaInterface) error
MediaSoftDeleteByID(ctx context.Context, mediaID string) error
MediaUpdate(ctx context.Context, media MediaInterface) error
OrderCount(ctx context.Context, options OrderQueryInterface) (int64, error)
OrderCreate(ctx context.Context, order OrderInterface) error
OrderDelete(ctx context.Context, order OrderInterface) error
OrderDeleteByID(ctx context.Context, id string) error
OrderFindByID(ctx context.Context, id string) (OrderInterface, error)
OrderList(ctx context.Context, options OrderQueryInterface) ([]OrderInterface, error)
OrderSoftDelete(ctx context.Context, order OrderInterface) error
OrderSoftDeleteByID(ctx context.Context, id string) error
OrderUpdate(ctx context.Context, order OrderInterface) error
OrderLineItemCount(ctx context.Context, options OrderLineItemQueryInterface) (int64, error)
OrderLineItemCreate(ctx context.Context, orderLineItem OrderLineItemInterface) error
OrderLineItemDelete(ctx context.Context, orderLineItem OrderLineItemInterface) error
OrderLineItemDeleteByID(ctx context.Context, id string) error
OrderLineItemFindByID(ctx context.Context, id string) (OrderLineItemInterface, error)
OrderLineItemList(ctx context.Context, options OrderLineItemQueryInterface) ([]OrderLineItemInterface, error)
OrderLineItemSoftDelete(ctx context.Context, orderLineItem OrderLineItemInterface) error
OrderLineItemSoftDeleteByID(ctx context.Context, id string) error
OrderLineItemUpdate(ctx context.Context, orderLineItem OrderLineItemInterface) error
ProductCount(ctx context.Context, options ProductQueryInterface) (int64, error)
ProductCreate(ctx context.Context, product ProductInterface) error
ProductDelete(ctx context.Context, product ProductInterface) error
ProductDeleteByID(ctx context.Context, productID string) error
ProductFindByID(ctx context.Context, productID string) (ProductInterface, error)
ProductList(ctx context.Context, options ProductQueryInterface) ([]ProductInterface, error)
ProductSoftDelete(ctx context.Context, product ProductInterface) error
ProductSoftDeleteByID(ctx context.Context, productID string) error
ProductUpdate(ctx context.Context, product ProductInterface) error
}
Source Files
¶
- Store.go
- consts.go
- interfaces.go
- query_category.go
- query_discount.go
- query_media.go
- query_order.go
- query_order_line_item.go
- query_product.go
- sqls.go
- store_category.go
- store_discount.go
- store_media.go
- store_new.go
- store_order.go
- store_product.go
- type_category.go
- type_discount.go
- type_media.go
- type_order.go
- type_order_line_item.go
- type_product.go