<?php
namespace Modules\Contracts\Models;
class ContractStatus
{
    const NEW         = 'NEW';
    const IN_WORK     = "IN_WORK";
    const TREATY      = 'TREATY';       //Выплачено
    const RESERVATION = 'RESERVATION';  //бронь
    const SUCCESS     = "SUCCESS";
    const DECLINE     = "DECLINE";

    public static function getName($status)
    {
        return __('contracts.status_' . $status);
    }
    public static function getHtmlColor($status)
    {
        switch ( $status )
        {
            case self::NEW:
                return '#ccc';
            case self::RESERVATION:
                return '#4fb5e5';
            case self::IN_WORK:
                return '#e3e54f';
            case self::TREATY:
                return '#e3e54f';
            case self::SUCCESS:
                return '#4fe576';
            case self::DECLINE:
                return '#eb612c';
        }
        return '#ccc';
    }
}