MetaFox

SavedAgg extends Model
in package
implements Entity, HasAmounts Uses HasEntity, HasFactory, HasUserMorph, HasUserAsOwnerMorph, HasAmountsTrait

Class SavedAgg.

Table of Contents

Interfaces

Entity
Interface Entity.
HasAmounts
Trait HasAmounts

Constants

ENTITY_TYPE  = 'saved_aggregation'

Properties

$id  : int
$item_type  : string
$timestamps  : mixed
$total_saved  : int
$user_id  : int
$user_type  : string
$fillable  : array<string|int, string>
$table  : mixed

Methods

decrementAmount()  : int
decrementTotalItem()  : void
entityId()  : int
entityType()  : string
factory()  : SavedAggFactory
getUserAttribute()  : mixed
getUserEntityAttribute()  : mixed
incrementAmount()  : int
incrementTotalItem()  : void
incrementTotalView()  : void
isUser()  : bool
check if $user is the user (creator) of entity.
moduleName()  : string
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
user()  : MorphTo
userEntity()  : BelongsTo
userId()  : int
userType()  : string
handleNegativeNumber()  : void
newFactory()  : SavedAggFactory

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'saved_aggregation'

Properties

$timestamps

public mixed $timestamps = false

$fillable

protected array<string|int, string> $fillable = ['user_id', 'user_type', 'item_type', 'total_saved']

$table

protected mixed $table = 'saved_aggregations'

Methods

decrementAmount()

public decrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
$column : string
$amount : int = 1
Return values
int

entityId()

public entityId() : int
Return values
int

entityType()

public entityType() : string
Return values
string

factory()

public static factory(mixed $parameters) : SavedAggFactory
Parameters
$parameters : mixed
Return values
SavedAggFactory

getUserEntityAttribute()

public getUserEntityAttribute() : mixed

incrementAmount()

public incrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
$column : string
$amount : int = 1
Return values
int

isUser()

check if $user is the user (creator) of entity.

public isUser(User $user) : bool
Parameters
$user : User
Return values
bool

moduleName()

public moduleName() : string
Return values
string

userEntity()

public userEntity() : BelongsTo
Return values
BelongsTo

userType()

public userType() : string
Return values
string

handleNegativeNumber()

protected handleNegativeNumber(string $column) : void
Parameters
$column : string

newFactory()

protected static newFactory() : SavedAggFactory
Return values
SavedAggFactory

        
On this page

Search results