40 lines
808 B
PHP
40 lines
808 B
PHP
<?php
|
|||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class CopperConvertRequest extends Model
|
||
|
|
{
|
||
|
|
protected $fillable = [
|
||
|
|
'customer_id',
|
||
|
|
'status',
|
||
|
|
'source',
|
||
|
|
'source_product_id',
|
||
|
|
'asset_unit',
|
||
|
|
'consumed_amount',
|
||
|
|
'leftover_amount',
|
||
|
|
'source_unit_price',
|
||
|
|
'wire15_product_id',
|
||
|
|
'wire15_rings',
|
||
|
|
'wire15_unit_price',
|
||
|
|
'wire25_product_id',
|
||
|
|
'wire25_rings',
|
||
|
|
'wire25_unit_price',
|
||
|
|
'sell_order_id',
|
||
|
|
'buy15_order_id',
|
||
|
|
'buy25_order_id',
|
||
|
|
'admin_id',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'consumed_amount' => 'float',
|
||
|
|
'leftover_amount' => 'float',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function customer()
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Customer::class);
|
||
|
|
}
|
||
|
|
}
|