feat: add new cast attributes for models including sewing_cost, other_cost, marketplace_settings_snapshot, year, month, stock, reject_stock, and retail_stock
This commit is contained in:
parent
38c486d11d
commit
26945160a2
@ -23,6 +23,8 @@ protected function casts(): array
|
||||
'status' => CuttingStatus::class,
|
||||
'total_material_cost' => 'integer',
|
||||
'cost_per_unit' => 'integer',
|
||||
'sewing_cost' => 'integer',
|
||||
'other_cost' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@ protected function casts(): array
|
||||
'nego_price' => 'integer',
|
||||
'total_amount' => 'integer',
|
||||
'cogs' => 'integer',
|
||||
'marketplace_settings_snapshot' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ class OwnerVerificationRequest extends Model
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'payload' => 'array',
|
||||
'verified_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
@ -22,6 +22,8 @@ protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'status' => PayrollPeriodStatus::class,
|
||||
'year' => 'integer',
|
||||
'month' => 'integer',
|
||||
'closed_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
@ -16,6 +16,15 @@ class ProductVariant extends Model implements HasMedia
|
||||
{
|
||||
use HasFactory, InteractsWithMedia, SoftDeletes;
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'stock' => 'integer',
|
||||
'reject_stock' => 'integer',
|
||||
'retail_stock' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function orderItems(): HasMany
|
||||
{
|
||||
return $this->hasMany(OrderItem::class);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user