<?php

namespace App\Modules\Stock;

use App\Models\ValidationModel;

class Supplier extends ValidationModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'suppliers';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['name', 'xero_id'];

    /**
     * Array of validation rules.
     *
     * @var  array 
     */
    protected static $rules = [
        'name' => 'required|unique:suppliers,name,$id',
    ];
}
