diff --git a/app/Controllers/Admin/Customer/ClientController.php b/app/Controllers/Admin/Customer/ClientController.php index 6b18446..fc2547c 100644 --- a/app/Controllers/Admin/Customer/ClientController.php +++ b/app/Controllers/Admin/Customer/ClientController.php @@ -4,7 +4,6 @@ namespace App\Controllers\Admin\Customer; use App\Helpers\Customer\ClientHelper; use App\Services\Customer\ClientService; -use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; diff --git a/app/Database/dbmsv2.vuerd.json b/app/Database/dbmsv2.vuerd.json index eb67c19..0db1bb2 100644 --- a/app/Database/dbmsv2.vuerd.json +++ b/app/Database/dbmsv2.vuerd.json @@ -4,8 +4,8 @@ "settings": { "width": 3000, "height": 3000, - "scrollTop": -991.0994, - "scrollLeft": -952.1533, + "scrollTop": -962.0994, + "scrollLeft": -672.1533, "zoomLevel": 0.79, "show": 511, "database": 4, diff --git a/app/Database/dbmsv2_init.sql b/app/Database/dbmsv2_init.sql index 879f824..96e9a70 100644 --- a/app/Database/dbmsv2_init.sql +++ b/app/Database/dbmsv2_init.sql @@ -557,4 +557,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!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 diff --git a/app/Language/en/Customer/Client.php b/app/Language/en/Customer/Client.php index 3d8a86e..36c2516 100644 --- a/app/Language/en/Customer/Client.php +++ b/app/Language/en/Customer/Client.php @@ -2,7 +2,9 @@ return [ 'title' => "고객정보", 'label' => [ + 'user_uid' => "관리자UID", 'code' => "고객코드", + 'site' => "사이틍구분", 'email' => "메일", 'phone' => "연락처", 'role' => "권한", @@ -15,6 +17,11 @@ return [ 'created_at' => "등록일", 'deleted_at' => "삭제일", ], + "SITE" => [ + "prime" => "PRIME", + "itsolution" => "ITSOLUTION", + "gdidc" => "GDIDC", + ], "ROLE" => [ "user" => "일반회원", "vip" => "VIP회원", diff --git a/app/Models/Customer/ClientModel.php b/app/Models/Customer/ClientModel.php index f4137f4..78ae8d8 100644 --- a/app/Models/Customer/ClientModel.php +++ b/app/Models/Customer/ClientModel.php @@ -14,6 +14,7 @@ class ClientModel extends CustomerModel protected $primaryKey = self::PK; protected $returnType = ClientEntity::class; protected $allowedFields = [ + "user_uid", "site", "code", "name", @@ -36,6 +37,9 @@ class ClientModel extends CustomerModel throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); } switch ($field) { + case "user_uid": + $rule = "required|numeric"; + break; case "code": $rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]"; $rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : ""; diff --git a/app/Models/Customer/ServiceModel.php b/app/Models/Customer/ServiceModel.php index 5813b0a..69eace7 100644 --- a/app/Models/Customer/ServiceModel.php +++ b/app/Models/Customer/ServiceModel.php @@ -8,7 +8,7 @@ use tidy; class ServiceModel extends CustomerModel { const TABLE = "serviceinfo"; - const PK = "code"; + const PK = "uid"; const TITLE = "code"; protected $table = self::TABLE; // protected $useAutoIncrement = false; @@ -36,15 +36,15 @@ class ServiceModel extends CustomerModel throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true)); } switch ($field) { - case $this->getPKField(): + case "code": $rule = "required|trim|alpha_numeric|min_length[4]|max_length[20]"; $rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : ""; break; case "user_uid": + case "clientinfo_uid": case "amount": $rule = "required|numeric"; break; - case "clientinfo_uid": case "type": case "location": case "status": diff --git a/app/Services/Customer/ClientService.php b/app/Services/Customer/ClientService.php index dca7131..06e14ea 100644 --- a/app/Services/Customer/ClientService.php +++ b/app/Services/Customer/ClientService.php @@ -14,19 +14,19 @@ class ClientService extends CustomerService } public function getFormFields(): array { - return ['name', 'email', 'phone', 'role']; + return ['site', 'name', 'email', 'phone', 'role']; } public function getFilterFields(): array { - return ['role', 'status']; + return ['site', 'role', 'status']; } public function getBatchJobFields(): array { - return ['status']; + return ['site', 'role', 'status']; } 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 처리 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); } } diff --git a/app/Services/Equipment/ServerService.php b/app/Services/Equipment/ServerService.php index e5abcd4..4b4d9ab 100644 --- a/app/Services/Equipment/ServerService.php +++ b/app/Services/Equipment/ServerService.php @@ -16,13 +16,10 @@ class ServerService extends EquipmentService public function getFormFields(): array { return [ - "clientinfo_uid", - "serviceinfo_uid", "code", "type", "title", "price", - "total_price", "manufactur_at", "format_at", "status", @@ -30,11 +27,11 @@ class ServerService extends EquipmentService } public function getFilterFields(): array { - return ['status']; + return ['clientinfo_uid', 'serviceinfo_uid', 'status']; } public function getBatchJobFields(): array { - return ['type', 'status']; + return ['clientinfo_uid', 'type', 'status']; } public function getIndexFields(): array { @@ -46,7 +43,7 @@ class ServerService extends EquipmentService //OrderBy 처리 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); } }