RoleAuth.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace App\Models;
  3. // use Illuminate\Contracts\Authenticate\MustVerifyEmail;
  4. use DateTimeInterface;
  5. use Illuminate\Database\Eloquent\Factories\HasFactory;
  6. use Illuminate\Database\Eloquent\Model;
  7. use Illuminate\Database\Eloquent\SoftDeletes;
  8. use Illuminate\Foundation\Auth\User as Authenticatable;
  9. use Illuminate\Notifications\Notifiable;
  10. use Laravel\Sanctum\HasApiTokens;
  11. use Tymon\JWTAuth\Contracts\JWTSubject;
  12. class RoleAuth extends Model
  13. {
  14. use HasFactory, SoftDeletes;
  15. // 设置表名
  16. protected $table = 'role_auth';
  17. /**
  18. * 日期时间的存储格式
  19. *
  20. * @var string
  21. */
  22. // protected $dateFormat = 'Y-m-d H:i:s';
  23. /**
  24. * The attributes that are mass assignable.
  25. *
  26. * @var array<int, string>
  27. */
  28. protected $fillable = [];
  29. /**
  30. * The attributes that should be hidden for serialization.
  31. *
  32. * @var array<int, string>
  33. */
  34. protected $hidden = [];
  35. /**
  36. * The attributes that should be cast.
  37. *
  38. * @var array<string, string>
  39. */
  40. protected $casts = [
  41. // 'create_time' => 'datetime', //'datetime:Y-m-d H:i:s'
  42. // 'password' => 'hashed',
  43. ];
  44. // protected function serializeDate(DateTimeInterface $date): string
  45. // {
  46. // return $date->format('Y-m-d H:i:s');
  47. // }
  48. }