RecordRow.php 765 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. ];
  27. public function causal()
  28. {
  29. return $this->belongsTo(Causal::class);
  30. }
  31. public function course()
  32. {
  33. return $this->belongsTo(Course::class);
  34. }
  35. }