32 lines
801 B
PHP
32 lines
801 B
PHP
<?php
|
|
|
|
namespace App\Services\Admin;
|
|
|
|
use App\Models\ConstFlow;
|
|
use Slowlyo\OwlAdmin\Services\AdminService;
|
|
use App\Filters\Admin\ConstFlowFilter;
|
|
|
|
/**
|
|
* 费用明细
|
|
*
|
|
* @method ConstFlow getModel()
|
|
* @method ConstFlow|\Illuminate\Database\Query\Builder query()
|
|
*/
|
|
class ConstFlowService extends BaseService
|
|
{
|
|
protected string $modelName = ConstFlow::class;
|
|
|
|
protected string $modelFilterName = ConstFlowFilter::class;
|
|
|
|
protected array $withRelationships = ['oldman'];
|
|
|
|
public function makeFeelist(ConstFlow $flow)
|
|
{
|
|
return (new OldmenService())->makeFeelist($flow->const_type, array_merge($flow->extends, [
|
|
'oldman_id' => $flow->oldman_id,
|
|
'live_in_at' => $flow->start_at,
|
|
'avliable_at' => $flow->end_at
|
|
]));
|
|
}
|
|
}
|