<?php

namespace App\Models;

use App\Models\ValidationModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

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

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

    /**
     * Array of validation rules.
     *
     * @var  array
     */
    protected static $rules = [
        'name'   => 'required',
    ];

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}
