- Created ExampleTest and RoutesTest for basic application response and route testing. - Implemented IsolatedDatabaseTestCase for isolated database testing. - Added unit tests for various models and services including Contract, CPE, and LeadDetail. - Developed request validation tests for CreateClientRequest, UpdateClientRequest, and ContractRequest. - Introduced Vite configuration for asset management in the Laravel application.
26 lines
485 B
PHP
26 lines
485 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Supplier extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name',
|
|
'status',
|
|
'color'
|
|
];
|
|
|
|
// Opcional: se tiveres uma relação com contracts
|
|
public function previousContracts()
|
|
{
|
|
return $this->hasMany(Contract::class, 'previous_supplier_id');
|
|
}
|
|
|
|
public function newContracts()
|
|
{
|
|
return $this->hasMany(Contract::class, 'new_supplier_id');
|
|
}
|
|
}
|