@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
/**
|
||||
* @property array<string, mixed> $weights
|
||||
* @property array<string, mixed>|null $commercial_terms Stored JSON is validated against the pricing contract before comparison.
|
||||
* @property array<string, mixed>|null $exchange_basis Frozen process rate for original foreign-currency amounts.
|
||||
*/
|
||||
class Quotation extends Model
|
||||
{
|
||||
@@ -19,7 +20,7 @@ class Quotation extends Model
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['weights' => 'array', 'commercial_terms' => 'array', 'valid_until' => 'date:Y-m-d'];
|
||||
return ['weights' => 'array', 'commercial_terms' => 'array', 'exchange_basis' => 'array', 'valid_until' => 'date:Y-m-d'];
|
||||
}
|
||||
|
||||
/** @return BelongsTo<Supplier, $this> */
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Models;
|
||||
|
||||
use App\Models\Concerns\AppendOnlyInventoryRecord;
|
||||
use App\Models\Concerns\BelongsToTenant;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/** @property int $id
|
||||
@@ -13,6 +14,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property int $revision
|
||||
* @property string $account_identifier
|
||||
* @property string $beneficiary
|
||||
* @property string|null $account_key
|
||||
*/
|
||||
class SupplierBankDetail extends Model
|
||||
{
|
||||
@@ -28,4 +30,12 @@ class SupplierBankDetail extends Model
|
||||
{
|
||||
return ['account_identifier' => 'encrypted', 'beneficiary' => 'encrypted', 'evidence_reference' => 'encrypted', 'reason' => 'encrypted'];
|
||||
}
|
||||
|
||||
/** Missing column means the preserved legacy chain, including before installation.
|
||||
* @return Attribute<string|null,never>
|
||||
*/
|
||||
protected function accountKey(): Attribute
|
||||
{
|
||||
return Attribute::get(fn (?string $value): ?string => $value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user