PointStatistic
extends Model
in package
implements
Entity, HasAmounts
Uses
HasEntity, HasAmountsTrait, HasFactory
Class PointStatistic.
Tags
Table of Contents
Interfaces
- Entity
- Interface Entity.
- HasAmounts
- Trait HasAmounts
Constants
- ENTITY_TYPE = 'activitypoint_statistic'
Properties
- $available_points : int
- $current_points : int
- $id : int
- $incrementing : mixed
- $total_bought : int
- $total_earned : int
- $total_received : int
- $total_retrieved : int
- $total_sent : int
- $total_spent : int
- $userEntity : UserEntity|null
- $casts : array<string|int, string>
- $fillable : array<string|int, string>
- $table : mixed
Methods
- decrementAmount() : int
- decrementTotalItem() : void
- entityId() : int
- entityType() : string
- factory() : PointStatisticFactory
- getAvailablePointsAttribute() : int
- getUserEntityAttribute() : mixed
- incrementAmount() : int
- incrementTotalItem() : void
- incrementTotalView() : void
- moduleName() : string
- updateTotalBought() : int
- updateTotalEarned() : int
- updateTotalReceived() : int
- updateTotalRetrieved() : int
- updateTotalSent() : int
- updateTotalSpent() : int
- userEntity() : BelongsTo
- userId() : mixed
- userType() : mixed
- handleNegativeNumber() : void
- newFactory() : PointStatisticFactory
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'activitypoint_statistic'
Properties
$available_points
public
int
$available_points
$current_points
public
int
$current_points
$id
public
int
$id
$incrementing
public
mixed
$incrementing
= false
$total_bought
public
int
$total_bought
$total_earned
public
int
$total_earned
$total_received
public
int
$total_received
$total_retrieved
public
int
$total_retrieved
$total_sent
public
int
$total_sent
$total_spent
public
int
$total_spent
$userEntity
public
UserEntity|null
$userEntity
$casts
protected
array<string|int, string>
$casts
= ['current_points' => 'integer', 'total_earned' => 'integer', 'total_bought' => 'integer', 'total_sent' => 'integer', 'total_spent' => 'integer', 'total_received' => 'integer', 'total_retrieved' => 'integer']
$fillable
protected
array<string|int, string>
$fillable
= ['id', 'current_points', 'total_earned', 'total_bought', 'total_sent', 'total_spent', 'total_received', 'total_retrieved']
$table
protected
mixed
$table
= 'apt_statistics'
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 $count, mixed $state) : PointStatisticFactory
Parameters
- $count : mixed
- $state : mixed
Return values
PointStatisticFactorygetAvailablePointsAttribute()
public
getAvailablePointsAttribute() : int
Return values
intgetUserEntityAttribute()
public
getUserEntityAttribute() : 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
moduleName()
public
moduleName() : string
Return values
stringupdateTotalBought()
public
updateTotalBought(int $amount) : int
Parameters
- $amount : int
Return values
intupdateTotalEarned()
public
updateTotalEarned(int $amount) : int
Parameters
- $amount : int
Return values
intupdateTotalReceived()
public
updateTotalReceived(int $amount) : int
Parameters
- $amount : int
Return values
intupdateTotalRetrieved()
public
updateTotalRetrieved(int $amount) : int
Parameters
- $amount : int
Return values
intupdateTotalSent()
public
updateTotalSent(int $amount) : int
Parameters
- $amount : int
Return values
intupdateTotalSpent()
public
updateTotalSpent(int $amount) : int
Parameters
- $amount : int
Return values
intuserEntity()
public
userEntity() : BelongsTo
Return values
BelongsTouserId()
public
userId() : mixed
userType()
public
userType() : mixed
handleNegativeNumber()
protected
handleNegativeNumber(string $column) : void
Parameters
- $column : string
newFactory()
protected
static newFactory() : PointStatisticFactory