dbmsv2 init...1
This commit is contained in:
parent
e5d3f0bb10
commit
0af2cef113
@ -4,7 +4,6 @@ namespace App\Controllers\Admin\Customer;
|
|||||||
|
|
||||||
use App\Helpers\Customer\ClientHelper;
|
use App\Helpers\Customer\ClientHelper;
|
||||||
use App\Services\Customer\ClientService;
|
use App\Services\Customer\ClientService;
|
||||||
use CodeIgniter\HTTP\RedirectResponse;
|
|
||||||
use CodeIgniter\HTTP\RequestInterface;
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"width": 3000,
|
"width": 3000,
|
||||||
"height": 3000,
|
"height": 3000,
|
||||||
"scrollTop": -991.0994,
|
"scrollTop": -962.0994,
|
||||||
"scrollLeft": -952.1533,
|
"scrollLeft": -672.1533,
|
||||||
"zoomLevel": 0.79,
|
"zoomLevel": 0.79,
|
||||||
"show": 511,
|
"show": 511,
|
||||||
"database": 4,
|
"database": 4,
|
||||||
|
|||||||
@ -557,4 +557,4 @@ UNLOCK TABLES;
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2025-08-20 11:06:56
|
-- Dump completed on 2025-08-20 11:20:06
|
||||||
|
|||||||
@ -2,7 +2,9 @@
|
|||||||
return [
|
return [
|
||||||
'title' => "고객정보",
|
'title' => "고객정보",
|
||||||
'label' => [
|
'label' => [
|
||||||
|
'user_uid' => "관리자UID",
|
||||||
'code' => "고객코드",
|
'code' => "고객코드",
|
||||||
|
'site' => "사이틍구분",
|
||||||
'email' => "메일",
|
'email' => "메일",
|
||||||
'phone' => "연락처",
|
'phone' => "연락처",
|
||||||
'role' => "권한",
|
'role' => "권한",
|
||||||
@ -15,6 +17,11 @@ return [
|
|||||||
'created_at' => "등록일",
|
'created_at' => "등록일",
|
||||||
'deleted_at' => "삭제일",
|
'deleted_at' => "삭제일",
|
||||||
],
|
],
|
||||||
|
"SITE" => [
|
||||||
|
"prime" => "PRIME",
|
||||||
|
"itsolution" => "ITSOLUTION",
|
||||||
|
"gdidc" => "GDIDC",
|
||||||
|
],
|
||||||
"ROLE" => [
|
"ROLE" => [
|
||||||
"user" => "일반회원",
|
"user" => "일반회원",
|
||||||
"vip" => "VIP회원",
|
"vip" => "VIP회원",
|
||||||
|
|||||||
@ -14,6 +14,7 @@ class ClientModel extends CustomerModel
|
|||||||
protected $primaryKey = self::PK;
|
protected $primaryKey = self::PK;
|
||||||
protected $returnType = ClientEntity::class;
|
protected $returnType = ClientEntity::class;
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
"user_uid",
|
||||||
"site",
|
"site",
|
||||||
"code",
|
"code",
|
||||||
"name",
|
"name",
|
||||||
@ -36,6 +37,9 @@ class ClientModel extends CustomerModel
|
|||||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||||
}
|
}
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
|
case "user_uid":
|
||||||
|
$rule = "required|numeric";
|
||||||
|
break;
|
||||||
case "code":
|
case "code":
|
||||||
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]";
|
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]";
|
||||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||||
|
|||||||
@ -8,7 +8,7 @@ use tidy;
|
|||||||
class ServiceModel extends CustomerModel
|
class ServiceModel extends CustomerModel
|
||||||
{
|
{
|
||||||
const TABLE = "serviceinfo";
|
const TABLE = "serviceinfo";
|
||||||
const PK = "code";
|
const PK = "uid";
|
||||||
const TITLE = "code";
|
const TITLE = "code";
|
||||||
protected $table = self::TABLE;
|
protected $table = self::TABLE;
|
||||||
// protected $useAutoIncrement = false;
|
// protected $useAutoIncrement = false;
|
||||||
@ -36,15 +36,15 @@ class ServiceModel extends CustomerModel
|
|||||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||||
}
|
}
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case $this->getPKField():
|
case "code":
|
||||||
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]";
|
$rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]";
|
||||||
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
$rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : "";
|
||||||
break;
|
break;
|
||||||
case "user_uid":
|
case "user_uid":
|
||||||
|
case "clientinfo_uid":
|
||||||
case "amount":
|
case "amount":
|
||||||
$rule = "required|numeric";
|
$rule = "required|numeric";
|
||||||
break;
|
break;
|
||||||
case "clientinfo_uid":
|
|
||||||
case "type":
|
case "type":
|
||||||
case "location":
|
case "location":
|
||||||
case "status":
|
case "status":
|
||||||
|
|||||||
@ -14,19 +14,19 @@ class ClientService extends CustomerService
|
|||||||
}
|
}
|
||||||
public function getFormFields(): array
|
public function getFormFields(): array
|
||||||
{
|
{
|
||||||
return ['name', 'email', 'phone', 'role'];
|
return ['site', 'name', 'email', 'phone', 'role'];
|
||||||
}
|
}
|
||||||
public function getFilterFields(): array
|
public function getFilterFields(): array
|
||||||
{
|
{
|
||||||
return ['role', 'status'];
|
return ['site', 'role', 'status'];
|
||||||
}
|
}
|
||||||
public function getBatchJobFields(): array
|
public function getBatchJobFields(): array
|
||||||
{
|
{
|
||||||
return ['status'];
|
return ['site', 'role', 'status'];
|
||||||
}
|
}
|
||||||
public function getIndexFields(): array
|
public function getIndexFields(): array
|
||||||
{
|
{
|
||||||
return ['name', 'email', 'phone', 'role', 'account_balance', 'coupon_balance', 'point_balance', 'status', 'created_at', 'updated_at'];
|
return ['site', 'name', 'email', 'phone', 'role', 'account_balance', 'coupon_balance', 'point_balance', 'status', 'created_at', 'updated_at'];
|
||||||
}
|
}
|
||||||
//기본 기능부분
|
//기본 기능부분
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ class ClientService extends CustomerService
|
|||||||
//OrderBy 처리
|
//OrderBy 처리
|
||||||
public function setOrderBy(mixed $field = null, mixed $value = null): void
|
public function setOrderBy(mixed $field = null, mixed $value = null): void
|
||||||
{
|
{
|
||||||
$this->getModel()->orderBy("name", 'ASC');
|
$this->getModel()->orderBy("site ASC,name ASC");
|
||||||
parent::setOrderBy($field, $value);
|
parent::setOrderBy($field, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,13 +16,10 @@ class ServerService extends EquipmentService
|
|||||||
public function getFormFields(): array
|
public function getFormFields(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
"clientinfo_uid",
|
|
||||||
"serviceinfo_uid",
|
|
||||||
"code",
|
"code",
|
||||||
"type",
|
"type",
|
||||||
"title",
|
"title",
|
||||||
"price",
|
"price",
|
||||||
"total_price",
|
|
||||||
"manufactur_at",
|
"manufactur_at",
|
||||||
"format_at",
|
"format_at",
|
||||||
"status",
|
"status",
|
||||||
@ -30,11 +27,11 @@ class ServerService extends EquipmentService
|
|||||||
}
|
}
|
||||||
public function getFilterFields(): array
|
public function getFilterFields(): array
|
||||||
{
|
{
|
||||||
return ['status'];
|
return ['clientinfo_uid', 'serviceinfo_uid', 'status'];
|
||||||
}
|
}
|
||||||
public function getBatchJobFields(): array
|
public function getBatchJobFields(): array
|
||||||
{
|
{
|
||||||
return ['type', 'status'];
|
return ['clientinfo_uid', 'type', 'status'];
|
||||||
}
|
}
|
||||||
public function getIndexFields(): array
|
public function getIndexFields(): array
|
||||||
{
|
{
|
||||||
@ -46,7 +43,7 @@ class ServerService extends EquipmentService
|
|||||||
//OrderBy 처리
|
//OrderBy 처리
|
||||||
public function setOrderBy(mixed $field = null, mixed $value = null): void
|
public function setOrderBy(mixed $field = null, mixed $value = null): void
|
||||||
{
|
{
|
||||||
$this->getModel()->orderBy('title', 'ASC');
|
$this->getModel()->orderBy("code ASC,title ASC");
|
||||||
parent::setOrderBy($field, $value);
|
parent::setOrderBy($field, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user