pretty sure this was it

This commit is contained in:
slong753 2023-03-29 21:37:26 -05:00
parent c9d1274edc
commit e126a75f7a
2 changed files with 13 additions and 23 deletions

View file

@ -70,19 +70,6 @@ class Asset extends Depreciable
*/ */
protected $injectUniqueIdentifier = true; protected $injectUniqueIdentifier = true;
// We set these as protected dates so that they will be easily accessible via Carbon
protected $dates = [
'created_at',
'updated_at',
'deleted_at',
'purchase_date',
'last_checkout',
'expected_checkin',
'last_audit_date',
'next_audit_date'
];
protected $casts = [ protected $casts = [
'purchase_date' => 'date', 'purchase_date' => 'date',
'last_checkout' => 'datetime', 'last_checkout' => 'datetime',
@ -96,6 +83,14 @@ class Asset extends Depreciable
'rtd_company_id' => 'integer', 'rtd_company_id' => 'integer',
'supplier_id' => 'integer', 'supplier_id' => 'integer',
'byod' => 'boolean', 'byod' => 'boolean',
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
'purchase_date' => 'datetime',
'last_checkout' => 'datetime',
'expected_checkin' => 'datetime',
'last_audit_date' => 'datetime',
'next_audit_date' => 'datetime',
]; ];
protected $rules = [ protected $rules = [

View file

@ -73,18 +73,13 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'location_id' => 'integer', 'location_id' => 'integer',
'company_id' => 'integer', 'company_id' => 'integer',
'vip' => 'boolean', 'vip' => 'boolean',
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
'start_date' => 'datetime:Y-m-d',
'end_date' => 'datetime:Y-m-d',
]; ];
protected $dates = [
'created_at',
'updated_at',
'deleted_at',
'start_date' => 'date_format:Y-m-d',
'end_date' => 'date_format:Y-m-d',
];
/** /**
* Model validation rules * Model validation rules
* *