47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Business;
|
|
|
|
use App\Abstracts\Model;
|
|
|
|
class ThirdPartyWarehouseQuote extends Model
|
|
{
|
|
public const STATUS_ACTIVE = 'active';
|
|
|
|
public const STATUS_INACTIVE = 'inactive';
|
|
|
|
protected $table = 'business_third_party_warehouse_quotes';
|
|
|
|
protected $fillable = [
|
|
'company_id',
|
|
'warehouse_name',
|
|
'inbound_rate_per_ton',
|
|
'outbound_rate_per_order',
|
|
'pieces_per_pallet',
|
|
'pallet_area_sqm',
|
|
'storage_rate_per_sqm_month',
|
|
'effective_at',
|
|
'status',
|
|
'remark',
|
|
'created_by',
|
|
'updated_by',
|
|
];
|
|
|
|
protected $casts = [
|
|
'company_id' => 'integer',
|
|
'inbound_rate_per_ton' => 'decimal:4',
|
|
'outbound_rate_per_order' => 'decimal:4',
|
|
'pieces_per_pallet' => 'decimal:4',
|
|
'pallet_area_sqm' => 'decimal:4',
|
|
'storage_rate_per_sqm_month' => 'decimal:4',
|
|
'effective_at' => 'date:Y-m-d',
|
|
'created_by' => 'integer',
|
|
'updated_by' => 'integer',
|
|
];
|
|
|
|
public function statusLabel(): string
|
|
{
|
|
return $this->status === self::STATUS_ACTIVE ? '已启用' : '已停用';
|
|
}
|
|
}
|