MetaFox

ReportOwner extends Model
in package
implements Entity, HasAmounts Uses HasEntity, HasFactory, HasOwnerMorph, HasItemMorph, HasAmountsTrait

Class ReportOwner.

Table of Contents

Interfaces

Entity
Interface Entity.
HasAmounts
Trait HasAmounts

Constants

ENTITY_TYPE  = 'report_owner'

Properties

$created_at  : string
$id  : int
$total_report  : int
$updated_at  : string
$userReports  : ReportOwnerUser
$fillable  : array<string|int, string>
$table  : mixed

Methods

decrementAmount()  : int
decrementTotalItem()  : void
entityId()  : int
entityType()  : string
factory()  : ReportOwnerFactory
getItemAttribute()  : mixed
getOwnerAttribute()  : mixed
getOwnerEntityAttribute()  : mixed
incrementAmount()  : int
incrementTotalItem()  : void
incrementTotalView()  : void
isOwner()  : bool
check if $user is the owner of entity.
item()  : MorphTo|null
itemId()  : int
itemType()  : string
moduleName()  : string
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
userReports()  : HasMany
handleNegativeNumber()  : void
newFactory()  : ReportOwnerFactory

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'report_owner'

Properties

$fillable

protected array<string|int, string> $fillable = ['owner_id', 'owner_type', 'item_id', 'item_type', 'total_report']

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) : ReportOwnerFactory
Parameters
$parameters : mixed
Return values
ReportOwnerFactory

getOwnerEntityAttribute()

public getOwnerEntityAttribute() : mixed

incrementAmount()

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

isOwner()

check if $user is the owner of entity.

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

item()

public item() : MorphTo|null
Return values
MorphTo|null

itemType()

public itemType() : string
Return values
string

moduleName()

public moduleName() : string
Return values
string

ownerEntity()

public ownerEntity() : BelongsTo
Return values
BelongsTo

ownerType()

public ownerType() : string
Return values
string

userReports()

public userReports() : HasMany
Return values
HasMany

handleNegativeNumber()

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

newFactory()

protected static newFactory() : ReportOwnerFactory
Return values
ReportOwnerFactory

        
On this page

Search results