OAuthClient.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Module\OAuth\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * App\Module\OAuth\Models\OAuthClient
  6. *
  7. * field start
  8. * @property int $id
  9. * @property string $name 客户端名称
  10. * @property string $client_id 客户端ID
  11. * @property string $client_secret 客户端密钥
  12. * @property string $redirect_uri 回调地址
  13. * @property object|array $grant_types 授权类型
  14. * @property object|array $scope 权限范围
  15. * @property int $user_id 关联用户ID
  16. * @property \Carbon\Carbon $created_at
  17. * @property \Carbon\Carbon $updated_at
  18. * field end
  19. */
  20. class OAuthClient extends Model
  21. {
  22. protected $table = 'oauth_clients';
  23. // attrlist start
  24. protected $fillable = [
  25. 'id',
  26. 'name',
  27. 'client_id',
  28. 'client_secret',
  29. 'redirect_uri',
  30. 'grant_types',
  31. 'scope',
  32. 'user_id',
  33. ];
  34. // attrlist end
  35. protected $casts = [
  36. 'grant_types' => 'array',
  37. 'scope' => 'array',
  38. ];
  39. }