40 lines
783 B
PHP
40 lines
783 B
PHP
<?php
|
|
|
|
namespace lib\Models;
|
|
|
|
use lib\Entities\AdddbEntity as Entity;
|
|
|
|
class AddDbModel extends CommonModel
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
} //
|
|
|
|
final public function getTable(): string
|
|
{
|
|
return 'adddb';
|
|
}
|
|
final public function getPKField(): string
|
|
{
|
|
return 'addDB_num';
|
|
}
|
|
final public function getTitleField(): string
|
|
{
|
|
return 'addDB_case';
|
|
}
|
|
|
|
final public function getEntity(): Entity
|
|
{
|
|
return new Entity($this->getResult());
|
|
} //
|
|
final public function getEntitys(): array
|
|
{
|
|
$entitys = [];
|
|
foreach ($this->getResults() as $row) {
|
|
$entitys[] = new Entity($row);
|
|
}
|
|
return $entitys;
|
|
} //
|
|
} //Class
|