- handle contact PATCH failures by checking model save result and returning HTTP 400 with the model error message - update ContactDetailModel nested updates to enforce active-detail checks and use model update() with explicit failure propagation - extend contact patch assertions and align test-create variants expectations to status=success for POST responses - refresh composer lock metadata/dependency constraints and include generated docs/data/test files updated during normalization - impact: API contract unchanged except clearer 400 error responses on invalid contact detail updates
18 lines
494 B
PHP
Executable File
18 lines
494 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models\Organization;
|
|
|
|
use App\Models\BaseModel;
|
|
|
|
class HostComParaModel extends BaseModel {
|
|
protected $table = 'hostcompara';
|
|
protected $primaryKey = 'HostAppID';
|
|
protected $allowedFields = ['HostAppID', 'HostIP', 'HostPort', 'HostPwd', 'CreateDate', 'EndDate'];
|
|
|
|
protected $useTimestamps = true;
|
|
protected $createdField = 'CreateDate';
|
|
protected $updatedField = '';
|
|
protected $useSoftDeletes = true;
|
|
protected $deletedField = 'EndDate';
|
|
}
|