Genereted models by console phpci:generate command
This commit is contained in:
parent
6a23c79919
commit
94b2a8a5c5
8 changed files with 639 additions and 759 deletions
|
|
@ -16,9 +16,11 @@ use PHPCI\Model\BuildMeta;
|
|||
*/
|
||||
class BuildMetaStoreBase extends Store
|
||||
{
|
||||
protected $tableName = 'build_meta';
|
||||
protected $modelName = '\PHPCI\Model\BuildMeta';
|
||||
protected $primaryKey = 'id';
|
||||
protected $tableName = 'build_meta';
|
||||
|
||||
protected $modelName = '\PHPCI\Model\BuildMeta';
|
||||
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
public function getByPrimaryKey($value, $useConnection = 'read')
|
||||
{
|
||||
|
|
@ -32,7 +34,7 @@ class BuildMetaStoreBase extends Store
|
|||
}
|
||||
|
||||
$query = 'SELECT * FROM `build_meta` WHERE `id` = :id LIMIT 1';
|
||||
$stmt = Database::getConnection($useConnection)->prepare($query);
|
||||
$stmt = Database::getConnection($useConnection)->prepare($query);
|
||||
$stmt->bindValue(':id', $value);
|
||||
|
||||
if ($stmt->execute()) {
|
||||
|
|
@ -40,7 +42,6 @@ class BuildMetaStoreBase extends Store
|
|||
return new BuildMeta($data);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -51,15 +52,13 @@ class BuildMetaStoreBase extends Store
|
|||
}
|
||||
|
||||
$add = '';
|
||||
|
||||
if ($limit) {
|
||||
$add .= ' LIMIT ' . $limit;
|
||||
}
|
||||
|
||||
$count = null;
|
||||
|
||||
$query = 'SELECT * FROM `build_meta` WHERE `build_id` = :build_id' . $add;
|
||||
$stmt = Database::getConnection($useConnection)->prepare($query);
|
||||
$stmt = Database::getConnection($useConnection)->prepare($query);
|
||||
$stmt->bindValue(':build_id', $value);
|
||||
|
||||
if ($stmt->execute()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue