WuYongJie 2b6c4030e5
Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
chore: 补充财务与支付模块源码
2026-07-20 18:40:05 +08:00

52 lines
1.1 KiB
PHP

<?php
namespace Modules\EcommerceFinance\Models;
use App\Abstracts\Model;
use App\Models\Banking\Account;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Store extends Model
{
protected $table = 'ec_stores';
protected $fillable = [
'company_id',
'channel_id',
'name',
'external_id',
'settlement_account_id',
'timezone',
'currency_code',
'enabled',
'created_by',
'created_from',
];
public function channel(): BelongsTo
{
return $this->belongsTo(Channel::class);
}
public function settlementAccount(): BelongsTo
{
return $this->belongsTo(Account::class, 'settlement_account_id');
}
public function importBatches(): HasMany
{
return $this->hasMany(ImportBatch::class);
}
public function orders(): HasMany
{
return $this->hasMany(Order::class);
}
public function settlements(): HasMany
{
return $this->hasMany(Settlement::class);
}
}