40 lines
900 B
PHP
40 lines
900 B
PHP
|
|
<?php
|
||
|
|
include_once __DIR__ . "/mysql-database-service.php";
|
||
|
|
|
||
|
|
class AccesslogModel extends MySqlDatabaseService
|
||
|
|
{
|
||
|
|
protected $_table = 'accesslog';
|
||
|
|
protected $_primary_key = 'id';
|
||
|
|
protected $_return_type = 'array';
|
||
|
|
protected $_allowed_fields = [
|
||
|
|
'id', 'relationship_num', 'ip'
|
||
|
|
];
|
||
|
|
protected $_label_fields = [
|
||
|
|
'ID', 'Relationship #', 'IP',
|
||
|
|
];
|
||
|
|
protected $_use_timestamps = true;
|
||
|
|
protected $_created_field = 'created_at';
|
||
|
|
protected $_updated_field = 'updated_at';
|
||
|
|
protected $_validation_rules = [
|
||
|
|
['relationship_num', 'Relationship #', 'required'],
|
||
|
|
];
|
||
|
|
protected $_validation_edit_rules = [
|
||
|
|
['relationship_num', 'Relationship #', 'required'],
|
||
|
|
];
|
||
|
|
protected $_validation_messages = [
|
||
|
|
['relationship_num', 'Relationship #', 'required'],
|
||
|
|
];
|
||
|
|
|
||
|
|
public function __construct()
|
||
|
|
{
|
||
|
|
parent::__construct();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function get_mapping()
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
// TODO: ADD MAPPING
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|