Files
fdesk/app/common/model/UserGroup.php
T

56 lines
1014 B
PHP
Raw Normal View History

2025-10-10 11:09:37 +00:00
<?php
namespace app\common\model;
use support\Model;
class UserGroup extends Model
{
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'mysql';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'user_group';
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
protected $dateFormat = 'U';
/**
* 允许自动填充模型字段
*/
2025-10-11 08:41:11 +00:00
protected $fillable = ['id', 'title', 'scenario_code', 'sort', 'status', 'created_at', 'updated_at'];
2025-10-10 11:09:37 +00:00
/**
* 不允许自动填充模型字段
*/
protected $guarded = [];
public function groupMembers()
{
return $this->hasMany(UserGroupMembers::class, 'group_id', 'id');
}
}