<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

use App\Traits\ScopeActive;

class Software extends Model
{
	use ScopeActive;

	public const SOFTWARE_MAILER = 0x01;
	public const SOFTWARE_TOSSER = 0x02;

	/* ATTRIBUTES */

	public function getCodeAttribute($value)
	{
		return sprintf('%04X',$value);
	}

	public function getNameAttribute($value)
	{
		return $value ?: 'Unknown';
	}
}