LikeAgg
extends Model
in package
implements
HasAmounts, Entity
Uses
HasEntity, HasFactory, HasItemMorph, HasAmountsTrait
Class LikeAgg.
Table of Contents
Interfaces
- HasAmounts
- Trait HasAmounts
- Entity
- Interface Entity.
Constants
- ENTITY_TYPE = 'like_aggregation'
Properties
- $id : int
- $item_id : int
- $item_type : string
- $reaction : Reaction
- $reaction_id : int
- $total_reaction : int
- $fillable : array<string|int, string>
- $table : mixed
Methods
- decrementAmount() : int
- decrementTotalItem() : void
- entityId() : int
- entityType() : string
- factory() : LikeAggFactory
- getItemAttribute() : mixed
- incrementAmount() : int
- incrementTotalItem() : void
- incrementTotalView() : void
- item() : MorphTo|null
- itemId() : int
- itemType() : string
- moduleName() : string
- reaction() : BelongsTo
- handleNegativeNumber() : void
- newFactory() : LikeAggFactory
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'like_aggregation'
Properties
$id
public
int
$id
$item_id
public
int
$item_id
$item_type
public
string
$item_type
$reaction
public
Reaction
$reaction
$reaction_id
public
int
$reaction_id
$total_reaction
public
int
$total_reaction
$fillable
protected
array<string|int, string>
$fillable
= ['item_id', 'item_type', 'reaction_id']
$table
protected
mixed
$table
= 'like_aggregations'
Methods
decrementAmount()
public
decrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : string
- $amount : int = 1
Return values
intdecrementTotalItem()
public
decrementTotalItem() : void
entityId()
public
entityId() : int
Return values
intentityType()
public
entityType() : string
Return values
stringfactory()
public
static factory(mixed $parameters) : LikeAggFactory
Parameters
- $parameters : mixed
Return values
LikeAggFactorygetItemAttribute()
public
getItemAttribute() : mixed
incrementAmount()
public
incrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : 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
stringreaction()
public
reaction() : BelongsTo
Return values
BelongsTohandleNegativeNumber()
protected
handleNegativeNumber(string $column) : void
Parameters
- $column : string
newFactory()
protected
static newFactory() : LikeAggFactory