CollectionStatistic
extends Model
in package
implements
Entity, HasTotalItem
Uses
HasEntity, HasItemMorph, HasAmountsTrait
Class CollectionStatistic.
Table of Contents
Interfaces
- Entity
- Interface Entity.
- HasTotalItem
- Interface Entity.
Constants
- ENTITY_TYPE = 'photo_collection_statistic'
Properties
- $data : array<string|int, mixed>
- $id : int
- $item : Content|null
- $item_id : int
- $item_type : string
- $timestamps : mixed
- $total_photo : int
- $total_video : int
- $guarded : array<string|int, string>
- $table : mixed
Methods
- decrementAmount() : int
- decrementTotalColumn() : int
- decrementTotalItem() : void
- entityId() : int
- entityType() : string
- getItemAttribute() : mixed
- incrementAmount() : int
- incrementTotalColumn() : int
- incrementTotalItem() : void
- incrementTotalView() : void
- item() : MorphTo|null
- itemId() : int
- itemType() : string
- moduleName() : string
- toAggregateData() : array<string, mixed>
- handleNegativeNumber() : void
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'photo_collection_statistic'
Properties
$data
public
array<string|int, mixed>
$data
$id
public
int
$id
$item
public
Content|null
$item
$item_id
public
int
$item_id
$item_type
public
string
$item_type
$timestamps
public
mixed
$timestamps
= false
$total_photo
public
int
$total_photo
$total_video
public
int
$total_video
$guarded
protected
array<string|int, string>
$guarded
= []
$table
protected
mixed
$table
= 'photo_collection_statistic'
Methods
decrementAmount()
public
decrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : string
- $amount : int = 1
Return values
intdecrementTotalColumn()
public
decrementTotalColumn(string $type[, int $amount = 1 ]) : int
Parameters
- $type : string
- $amount : int = 1
Return values
intdecrementTotalItem()
public
decrementTotalItem() : void
entityId()
public
entityId() : int
Return values
intentityType()
public
entityType() : string
Return values
stringgetItemAttribute()
public
getItemAttribute() : mixed
incrementAmount()
public
incrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : string
- $amount : int = 1
Return values
intincrementTotalColumn()
public
incrementTotalColumn(string $type[, int $amount = 1 ]) : int
Parameters
- $type : string
- $amount : int = 1
Return values
intincrementTotalItem()
public
incrementTotalItem() : void
incrementTotalView()
public
incrementTotalView() : void
item()
public
item() : MorphTo|null
Return values
MorphTo|nullitemId()
public
itemId() : int
Return values
intitemType()
public
itemType() : string
Return values
stringmoduleName()
public
moduleName() : string
Return values
stringtoAggregateData()
public
toAggregateData() : array<string, mixed>
Return values
array<string, mixed>handleNegativeNumber()
protected
handleNegativeNumber(string $column) : void
Parameters
- $column : string