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.
 
 

40 lines
777 B

<?php
declare (strict_types=1);
namespace App\Model\v3;
/**
*/
class UserRelationBind extends Model
{
/**
* 社区服务点类型
*/
const BIND_TYPE_COMMUNITY = 1;
/**
* 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)) : '';
}
}