MetaFox

PackagePurchase extends Model
in package
implements Entity, IsBillable Uses HasEntity, HasFactory, HasUserMorph, BillableTrait

Class PackagePurchase.

Tags
mixin

Builder

Table of Contents

Interfaces

Entity
Interface Entity.
IsBillable

Constants

ENTITY_TYPE  = 'activitypoint_package_purchase'
STATUS_FAILED  = 3
STATUS_INIT  = 1
STATUS_SUCCESS  = 2

Properties

$created_at  : string
$currency  : Currency
$gateway_id  : int
$id  : int
$package  : PointPackage
$points  : int
$price  : float
$status  : int
$updated_at  : string
$fillable  : array<string|int, string>
$table  : mixed

Methods

currency()  : BelongsTo
entityId()  : int
entityType()  : string
factory()  : PackagePurchaseFactory
getCurrency()  : string
getTotal()  : float
getUserAttribute()  : mixed
getUserEntityAttribute()  : mixed
isUser()  : bool
check if $user is the user (creator) of entity.
moduleName()  : string
package()  : BelongsTo
product()  : BelongsTo
toTitle()  : string
user()  : MorphTo
userEntity()  : BelongsTo
userId()  : int
userType()  : string
newFactory()  : PackagePurchaseFactory

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'activitypoint_package_purchase'

Properties

$fillable

protected array<string|int, string> $fillable = ['user_id', 'user_type', 'package_id', 'status', 'price', 'currency_id', 'gateway_id', 'points', 'created_at', 'updated_at']

Methods

entityId()

public entityId() : int
Return values
int

entityType()

public entityType() : string
Return values
string

factory()

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

getUserEntityAttribute()

public getUserEntityAttribute() : mixed

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

newFactory()

protected static newFactory() : PackagePurchaseFactory
Return values
PackagePurchaseFactory

        
On this page

Search results