<?php

namespace App\Domains\Virtual\Repositories;

use App\Core\Repository;
use App\Models\Virtual\OrderFlowPackageCards as Model;
use App\Domains\Virtual\Repositories\Concerns\OrderCardConcern;

class OrderFlowPackageCardsRepository extends Repository
{
    use OrderCardConcern;

    /**
     * 是否关闭缓存
     *
     * @var boolean
     */
    protected $cacheSkip = false;

    /**
     * 是否开启数据转化
     *
     * @var bool
     */
    protected $needTransform = false;

    /**
     * @var array
     */
    protected $fieldSearchable = [
        'id'         => '=',
        'created_at' => 'like',
    ];

    /**
     * 数据格式化
     *
     * @param mixed $result
     *
     * @return mixed
     */
    public function transform($model)
    {
        return $model->toArray();
    }

    public function model()
    {
        return Model::class;
    }
}
