23 lines
811 B
PHP
23 lines
811 B
PHP
<?php
|
|
namespace App\Models\Location;
|
|
use App\Models\BaseModel;
|
|
|
|
class LocationAddressModel extends BaseModel {
|
|
protected $table = 'locationaddress';
|
|
protected $primaryKey = 'LocationID';
|
|
protected $allowedFields = ['LocationID', 'Street1', 'Street2', 'City', 'Province', 'PostCode', 'GeoLocationSystem', 'GeoLocationData', 'CreateDate', 'EndDate'];
|
|
|
|
protected $useTimestamps = true;
|
|
protected $createdField = 'CreateDate';
|
|
protected $updatedField = '';
|
|
protected $useSoftDeletes = true;
|
|
protected $deletedField = 'EndDate';
|
|
|
|
protected $beforeInsert = ['normalizeDatesToUTC'];
|
|
protected $beforeUpdate = ['normalizeDatesToUTC'];
|
|
protected $afterFind = ['convertDatesToUTCISO'];
|
|
protected $afterInsert = ['convertDatesToUTCISO'];
|
|
protected $afterUpdate = ['convertDatesToUTCISO'];
|
|
|
|
}
|