TagFriend
        
        extends Model
    
    
            
            in package
            
        
    
            
            implements
                            Entity,                             TagFriendModel,                             IsNotifyInterface,                             HasUrl                    
    
            
            Uses
                            HasEntity,                             HasFactory,                             HasUserMorph,                             HasOwnerMorph,                             HasItemMorph                    
    
Class TagFriend.
Table of Contents
Interfaces
- Entity
 - Interface Entity.
 - TagFriendModel
 - Interface TempFileModel.
 - IsNotifyInterface
 - Interface Entity.
 - HasUrl
 
Constants
- ENTITY_TYPE = 'tag_friend'
 
Properties
- $content : string|null
 - $id : int
 - $is_mention : int
 - $px : float
 - $py : float
 - $timestamps : mixed
 - $casts : array<string, string>
 - $fillable : array<string|int, string>
 - $table : mixed
 
Methods
- entityId() : int
 - entityType() : string
 - factory() : TagFriendFactory
 - getItemAttribute() : mixed
 - getOwnerAttribute() : mixed
 - getOwnerEntityAttribute() : mixed
 - getUserAttribute() : mixed
 - getUserEntityAttribute() : mixed
 - isOwner() : bool
 - check if $user is the owner of entity.
 - isUser() : bool
 - check if $user is the user (creator) of entity.
 - item() : MorphTo|null
 - itemId() : int
 - itemType() : string
 - moduleName() : string
 - owner() : MorphTo
 - ownerEntity() : BelongsTo
 - ownerId() : int
 - ownerType() : string
 - toLink() : string|null
 - toNotification() : array<int, mixed>|null
 - creator result must contain User owner.
 - toRouter() : string|null
 - toUrl() : string|null
 - user() : MorphTo
 - userEntity() : BelongsTo
 - userId() : int
 - userType() : string
 - newFactory() : TagFriendFactory
 
Constants
ENTITY_TYPE
    public
        mixed
    ENTITY_TYPE
    = 'tag_friend'
    
    
    
Properties
$content
    public
        string|null
    $content
    
    
    
    
$id
    public
        int
    $id
    
    
    
    
$is_mention
    public
        int
    $is_mention
    
    
    
    
$px
    public
        float
    $px
    
    
    
    
$py
    public
        float
    $py
    
    
    
    
$timestamps
    public
        mixed
    $timestamps
     = false
    
    
    
$casts
    protected
        array<string, string>
    $casts
     = ['px' => 'float', 'py' => 'float', 'is_mention' => 'boolean']
    
    
    
$fillable
    protected
        array<string|int, string>
    $fillable
     = ['user_id', 'user_type', 'owner_id', 'owner_type', 'item_id', 'item_type', 'px', 'py', 'is_mention', 'content', 'send_notification']
    
    
    
$table
    protected
        mixed
    $table
     = 'friend_tag_friends'
    
    
    
Methods
entityId()
    public
                    entityId() : int
    Return values
intentityType()
    public
                    entityType() : string
    Return values
stringfactory()
    public
            static        factory(mixed $parameters) : TagFriendFactory
    Parameters
- $parameters : mixed
 
Return values
TagFriendFactorygetItemAttribute()
    public
                    getItemAttribute() : mixed
    getOwnerAttribute()
    public
                    getOwnerAttribute() : mixed
    getOwnerEntityAttribute()
    public
                    getOwnerEntityAttribute() : mixed
    getUserAttribute()
    public
                    getUserAttribute() : mixed
    getUserEntityAttribute()
    public
                    getUserEntityAttribute() : mixed
    isOwner()
check if $user is the owner of entity.
    public
                    isOwner(User $user) : bool
    Parameters
- $user : User
 
Return values
boolisUser()
check if $user is the user (creator) of entity.
    public
                    isUser(User $user) : bool
    Parameters
- $user : User
 
Return values
boolitem()
    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
stringowner()
    public
                    owner() : MorphTo
    Return values
MorphToownerEntity()
    public
                    ownerEntity() : BelongsTo
    Return values
BelongsToownerId()
    public
                    ownerId() : int
    Return values
intownerType()
    public
                    ownerType() : string
    Return values
stringtoLink()
    public
                    toLink() : string|null
    Return values
string|nulltoNotification()
creator result must contain User owner.
    public
                    toNotification() : array<int, mixed>|null
    Tags
Return values
array<int, mixed>|nulltoRouter()
    public
                    toRouter() : string|null
    Return values
string|nulltoUrl()
    public
                    toUrl() : string|null
    Return values
string|nulluser()
    public
                    user() : MorphTo
    Return values
MorphTouserEntity()
    public
                    userEntity() : BelongsTo
    Return values
BelongsTouserId()
    public
                    userId() : int
    Return values
intuserType()
    public
                    userType() : string
    Return values
stringnewFactory()
    protected
            static        newFactory() : TagFriendFactory