<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use DB;

class Ticket extends Model{
    use HasFactory;
    protected $table = 'ticket';
    
    protected $fillable = [
        'user_id',
        'contact',
        'email_id',
        'title',
        'description',
        'comment',
        'status',
        'image',
        'ticket_image',
        'priority',
        'date',
        'remark'
    ];

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