UserGroup.php 757 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Builder;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * 用户分组控制
  7. *
  8. * @property int $id
  9. * @property string $name 分组名称
  10. * @property array|null $nodes 关联的节点ID,多个用,号分隔
  11. * @method static Builder|UserGroup newModelQuery()
  12. * @method static Builder|UserGroup newQuery()
  13. * @method static Builder|UserGroup query()
  14. * @method static Builder|UserGroup whereId($value)
  15. * @method static Builder|UserGroup whereName($value)
  16. * @method static Builder|UserGroup whereNodes($value)
  17. * @mixin \Eloquent
  18. */
  19. class UserGroup extends Model {
  20. public $timestamps = false;
  21. protected $table = 'user_group';
  22. protected $casts = [
  23. 'nodes' => 'array'
  24. ];
  25. }