StudentHistory.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Database\Eloquent\SoftDeletes;
  6. /**
  7. * @property int $id
  8. * @property int $student_id
  9. * @property int $user_id
  10. * @property string $event_type
  11. * @property string $description
  12. * @property \Illuminate\Support\Carbon|null $created_at
  13. * @property \Illuminate\Support\Carbon|null $updated_at
  14. * @property \Illuminate\Support\Carbon|null $deleted_at
  15. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory newModelQuery()
  16. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory newQuery()
  17. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory onlyTrashed()
  18. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory query()
  19. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory whereCreatedAt($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory whereDeletedAt($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory whereDescription($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory whereEventType($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory whereId($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory whereStudentId($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory whereUpdatedAt($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory whereUserId($value)
  27. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory withTrashed(bool $withTrashed = true)
  28. * @method static \Illuminate\Database\Eloquent\Builder<static>|StudentHistory withoutTrashed()
  29. * @mixin \Eloquent
  30. */
  31. class StudentHistory extends Model
  32. {
  33. use HasFactory, SoftDeletes;
  34. protected $table = 'student_histories';
  35. protected $guarded = [
  36. 'id', // Add more fields that shouldn't be edited here
  37. ];
  38. protected $casts = [
  39. 'created_at' => 'datetime',
  40. 'updated_at' => 'datetime',
  41. 'deleted_at' => 'datetime',
  42. // Add your casts here (e.g., 'is_active' => 'boolean')
  43. ];
  44. // Relationships
  45. // Business Logic Methods
  46. // Custom Finders
  47. // Query Scopes
  48. }