walletservice/app/Models/Tax.php

48 lines
713 B
PHP
Raw Normal View History

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Tax
*
* @property int $id
* @property string $nom
* @property string $type
* @property float $valeur
* @property string $destination
* @property int $idConfig
*
* @property ConfigWallet $config_wallet
*
* @package App\Models
*/
class Tax extends Model
{
protected $table = 'taxes';
public $timestamps = false;
protected $casts = [
'valeur' => 'float',
'idConfig' => 'int'
];
protected $fillable = [
'nom',
'type',
'valeur',
'destination',
'idConfig'
];
public function config_wallet()
{
return $this->belongsTo(ConfigWallet::class, 'idConfig');
}
}