You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
692 B
34 lines
692 B
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace App\Model;
|
|
|
|
/**
|
|
*/
|
|
class UserRelationBind extends Model
|
|
{
|
|
/**
|
|
* The table associated with the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'lanzu_user_relation_bind';
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = ['bind_type', 'source_id', 'user_id', 'json_data'];
|
|
/**
|
|
* The attributes that should be cast to native types.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $casts = [];
|
|
|
|
public function setJsonDataAttribute($value)
|
|
{
|
|
$this->attributes['json_data'] = $value ? json_encode(json_decode($value, true)) : '';
|
|
}
|
|
|
|
}
|