User.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Foundation\Auth\User as Authenticatable;
  5. use Illuminate\Notifications\Notifiable;
  6. use Laravel\Sanctum\HasApiTokens;
  7. use Illuminate\Support\Facades\Hash;
  8. class User extends Authenticatable
  9. {
  10. use HasApiTokens, HasFactory, Notifiable;
  11. /**
  12. * The table associated with the model.
  13. *
  14. * @var string
  15. */
  16. protected $table = 'usuarios';
  17. /**
  18. * Indicates if the model should be timestamped.
  19. *
  20. * @var bool
  21. */
  22. public $timestamps = false;
  23. /**
  24. * The primary key associated with the table.
  25. *
  26. * @var string
  27. */
  28. protected $primaryKey = 'idUsuario';
  29. /**
  30. * The "type" of the primary key ID.
  31. *
  32. * @var string
  33. */
  34. protected $keyType = 'string';
  35. /**
  36. * Indicates if the IDs are auto-incrementing.
  37. *
  38. * @var bool
  39. */
  40. public $incrementing = false;
  41. protected $fillable = [
  42. 'idEscuela',
  43. 'estatus',
  44. 'idUsuario',
  45. 'tipoUsuario',
  46. 'primerNombre',
  47. 'segundoNombre',
  48. 'apellidoPaterno',
  49. 'apellidoMaterno',
  50. 'alias',
  51. 'contrasenaHash',
  52. 'correo',
  53. 'grado',
  54. ];
  55. /**
  56. * The attributes that should be hidden for serialization.
  57. *
  58. * @var array<int, string>
  59. */
  60. protected $hidden = [
  61. 'contrasenaHash',
  62. ];
  63. }