2025-09-02 17:22:56 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace app\common\model;
|
|
|
|
|
|
|
|
|
|
use support\Model;
|
|
|
|
|
|
|
|
|
|
class StockOrderAccounts extends Model
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The connection name for the model.
|
|
|
|
|
*
|
|
|
|
|
* @var string|null
|
|
|
|
|
*/
|
|
|
|
|
protected $connection = 'mysql';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The table associated with the model.
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $table = 'stock_order_accounts';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The primary key associated with the table.
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $primaryKey = 'id';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Indicates if the model should be timestamped.
|
|
|
|
|
*
|
|
|
|
|
* @var bool
|
|
|
|
|
*/
|
|
|
|
|
public $timestamps = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected $dateFormat = 'U';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 允许自动填充模型字段
|
|
|
|
|
*/
|
|
|
|
|
protected $fillable = ['id', 'order_id', 'seq_no', 'remit_country_id', 'remit_country_name_snapshot', 'remit_date', 'currency_code', 'currency_name_snapshot', 'account_id', 'account_name_snapshot', 'remitter_name', 'amount', 'created_at', 'updated_at'];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 不允许自动填充模型字段
|
|
|
|
|
*/
|
|
|
|
|
protected $guarded = [];
|
2025-09-04 11:52:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 关联主订单
|
|
|
|
|
*/
|
|
|
|
|
public function order()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(StockOrders::class, 'order_id', 'id');
|
|
|
|
|
}
|
2025-09-02 17:22:56 +08:00
|
|
|
}
|