forked from admin/services_core
update api ticket type
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AuditLog extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'tenant_id',
|
||||
'module',
|
||||
'action',
|
||||
'table_name',
|
||||
'record_id',
|
||||
'old_values',
|
||||
'new_values',
|
||||
'ip_address',
|
||||
'user_agent',
|
||||
'description'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'old_values' => 'array',
|
||||
'new_values' => 'array',
|
||||
'created_at' => 'datetime'
|
||||
];
|
||||
}
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Ticket extends Model
|
||||
{
|
||||
use Auditable;
|
||||
|
||||
protected $fillable = [
|
||||
'ticket_no',
|
||||
'ticket_type_id',
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class TicketIncidentType extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
use Auditable;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TicketType extends Model
|
||||
{
|
||||
use Auditable;
|
||||
|
||||
protected $table = 'ticket_types';
|
||||
|
||||
protected $fillable = [
|
||||
@@ -16,13 +19,15 @@ class TicketType extends Model
|
||||
'require_photo',
|
||||
'require_material',
|
||||
'need_customer',
|
||||
'need_incident_type'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'need_approval' => 'boolean',
|
||||
'require_photo' => 'boolean',
|
||||
'need_approval' => 'boolean',
|
||||
'require_photo' => 'boolean',
|
||||
'require_material' => 'boolean',
|
||||
'need_customer' => 'boolean',
|
||||
'need_customer' => 'boolean',
|
||||
'need_incident_type' => 'boolean'
|
||||
];
|
||||
|
||||
/*
|
||||
@@ -38,4 +43,4 @@ class TicketType extends Model
|
||||
'ticket_type_id'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
// use App\Traits\Auditable;
|
||||
|
||||
|
||||
class User extends Authenticatable
|
||||
@@ -14,6 +15,7 @@ class User extends Authenticatable
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
use HasApiTokens;
|
||||
// use Audittable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
|
||||
Reference in New Issue
Block a user