RecordRow.php 894 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class RecordRow extends Model
  6. {
  7. use HasFactory;
  8. protected $table = 'records_rows';
  9. protected $fillable = [
  10. 'record_id',
  11. 'causal_id',
  12. 'course_id',
  13. 'when',
  14. 'amount',
  15. 'vat_id',
  16. 'note',
  17. 'commercial',
  18. 'aliquota_iva',
  19. 'imponibile',
  20. 'imposta',
  21. 'divisa',
  22. 'quantita',
  23. 'numero_linea',
  24. 'sconto',
  25. 'prediscount_amount',
  26. 'subscription_id',
  27. ];
  28. public function causal()
  29. {
  30. return $this->belongsTo(Causal::class);
  31. }
  32. public function course()
  33. {
  34. return $this->belongsTo(Course::class);
  35. }
  36. public function subscription()
  37. {
  38. return $this->belongsTo(Subscription::class);
  39. }
  40. }