<?php

namespace App\Repositories\Shop;

use App\Models\Shop\InvoicePayment;
use App\Traits\Model\Basic;

class InvoicePayments
{
    use Basic;

    public static function init()
    {
        return [
            'payment_types' => self::paymentTypes(),
        ];
    }

    public static function getPaymentType($id)
    {
        return self::paymentTypes()[$id] ?? false;
    }

    public static function paymentTypes()
    {
        return [
            '',
            'CB',
            'CHEQUE',
            'VIREMENT',
            'PRELEVEMENT',
        ];
    }

    public static function getModel()
    {
        return InvoicePayment::query();
    }
}
