cfmgrv3 init...2
This commit is contained in:
parent
4d840ecd98
commit
bd2791f1ed
@ -76,6 +76,10 @@ class AccountModel extends Model
|
||||
$this->where('created_at >=', $start);
|
||||
$this->where('created_at <=', $end);
|
||||
}
|
||||
public function setIndexOrderBy($field, $order = 'ASC')
|
||||
{
|
||||
$this->orderBy("title ASC, {$field} {$order}");
|
||||
}
|
||||
|
||||
//존재하는지 체크
|
||||
public function isUniqueApikey(string $uid): bool
|
||||
|
||||
@ -68,6 +68,10 @@ class AuthModel extends Model
|
||||
$this->where('created_at >=', $start);
|
||||
$this->where('created_at <=', $end);
|
||||
}
|
||||
public function setIndexOrderBy($field, $order = 'ASC')
|
||||
{
|
||||
$this->orderBy("id ASC, {$field} {$order}");
|
||||
}
|
||||
|
||||
//도메인이 이미 존재하는지 체크
|
||||
public function isUniqueApikey(string $uid): bool
|
||||
|
||||
@ -65,4 +65,8 @@ class LoggerModel extends Model
|
||||
$this->where('created_at >=', $start);
|
||||
$this->where('created_at <=', $end);
|
||||
}
|
||||
public function setIndexOrderBy($field, $order = 'ASC')
|
||||
{
|
||||
$this->orderBy("title ASC, {$field} {$order}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,4 +64,8 @@ class MapurlModel extends Model
|
||||
$this->where('created_at >=', $start);
|
||||
$this->where('created_at <=', $end);
|
||||
}
|
||||
public function setIndexOrderBy($field, $order = 'ASC')
|
||||
{
|
||||
$this->orderBy("oldurl ASC, {$field} {$order}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Entities\UserEntity;
|
||||
use CodeIgniter\Model;
|
||||
|
||||
@ -53,7 +54,9 @@ class UserModel extends Model
|
||||
public function getEntity(int $uid): null|UserEntity
|
||||
{
|
||||
$entity = $this->asObject(UserEntity::class)->where('uid', $uid)->first();
|
||||
if(is_null($entity)){ throw new \Exception(__METHOD__."에서 {$uid} 해당 정보가 없습니다."); }
|
||||
if (is_null($entity)) {
|
||||
throw new \Exception(__METHOD__ . "에서 {$uid} 해당 정보가 없습니다.");
|
||||
}
|
||||
return $entity;;
|
||||
}
|
||||
|
||||
@ -67,4 +70,8 @@ class UserModel extends Model
|
||||
$this->where('created_at >=', $start);
|
||||
$this->where('created_at <=', $end);
|
||||
}
|
||||
public function setIndexOrderBy($field, $order = 'ASC')
|
||||
{
|
||||
$this->orderBy("name ASC, {$field} {$order}");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user