Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

34 lines
698 B
PHP

<?php
namespace Modules\PMS\Models;
use Illuminate\Database\Eloquent\Model;
use Modules\Employee\Models\Employee;
class Ticket extends Model
{
/**
* The attributes that are mass assignable.
*/
protected $table = 'tbl_tickets';
protected $fillable = ['subject', 'employee_id', 'assign_group_id', 'project_id', 'desc', 'file', 'ticket_type', 'status'];
const STATUS = [
1 => 'Pending',
2 => 'Approved',
3 => 'Rejected',
];
public function project()
{
return $this->belongsTo(Project::class, 'project_id');
}
public function employee()
{
return $this->belongsTo(Employee::class, 'employee_id');
}
}