diff --git a/app/Controllers/Admin/Customer/AccountController.php b/app/Controllers/Admin/Customer/AccountController.php new file mode 100644 index 0000000..63a5495 --- /dev/null +++ b/app/Controllers/Admin/Customer/AccountController.php @@ -0,0 +1,115 @@ +uri_path .= strtolower($this->getService()->getClassName()) . '/'; + $this->class_path = $this->getService()->getClassPath(); + $this->title = lang("{$this->getService()->getClassPath()}.title"); + $this->helper = $this->getHelper(); + } + public function getService(): AccountService + { + if (!$this->_service) { + $this->_service = new AccountService($this->request); + } + return $this->_service; + } + public function getHelper(): mixed + { + if (!$this->_helper) { + $this->_helper = new AccountHelper($this->request); + } + return $this->_helper; + } + //Index,FieldForm관련 + public function getFields(): array + { + return ['id', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role', 'status']; + } + public function getFilterFields(): array + { + return ['role', 'status']; + } + public function getBatchJobFields(): array + { + return ['status']; + } + protected function setValidation(Validation $validation, string $action, string $field, ?string $rule = null): Validation + { + switch ($field) { + case 'role': + //아래 Rule Array는 필드명.* checkbox를 사용 + $validation->setRule("{$field}.*", $field, $rule); + break; + default: + $validation = parent::setValidation($validation, $action, $field, $rule); + break; + } + return $validation; + } + //Index,FieldForm관련. + + protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string + { + switch ($action) { + case 'create': + case 'modify': + $url = base_url() . $this->uri_path . "view/" . $this->entity->getPK(); + $result = redirect()->to($url)->with('error', $message); + break; + default: + $result = parent::getResultPageByActon($action, $message); + break; + } + return $result; + } + + //생성 + protected function create_form_process(): void + { + $fields = [ + 'fields' => ['id', 'passwd', 'confirmpassword', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role'], + ]; + $this->init('create_form', $fields); + parent::create_form_process(); + } + protected function create_process(): mixed + { + $fields = [ + 'fields' => ['id', 'passwd', 'confirmpassword', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role'], + ]; + $this->init('create', $fields); + return parent::create_process(); + } + //수정 + protected function modify_form_process(mixed $uid): mixed + { + $fields = [ + 'fields' => ['id', 'passwd', 'confirmpassword', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role'], + ]; + $this->init('modify_form', $fields); + return parent::modify_form_process($uid); + } + protected function modify_process($uid): mixed + { + $fields = [ + 'fields' => ['id', 'passwd', 'confirmpassword', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role', 'status'], + ]; + $this->init('modify', $fields); + return parent::modify_process($uid); + } +} diff --git a/app/Controllers/Admin/Customer/ClientController.php b/app/Controllers/Admin/Customer/ClientController.php new file mode 100644 index 0000000..83c45e5 --- /dev/null +++ b/app/Controllers/Admin/Customer/ClientController.php @@ -0,0 +1,116 @@ +uri_path .= strtolower($this->getService()->getClassName()) . '/'; + $this->class_path = $this->getService()->getClassPath(); + $this->title = lang("{$this->getService()->getClassPath()}.title"); + $this->helper = $this->getHelper(); + } + public function getService(): ClientService + { + if (!$this->_service) { + $this->_service = new ClientService($this->request); + } + return $this->_service; + } + public function getHelper(): mixed + { + if (!$this->_helper) { + $this->_helper = new ClientHelper($this->request); + } + return $this->_helper; + } + //Index,FieldForm관련 + public function getFields(): array + { + return ['id', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role', 'status']; + } + public function getFilterFields(): array + { + return ['role', 'status']; + } + public function getBatchJobFields(): array + { + return ['status']; + } + protected function setValidation(Validation $validation, string $action, string $field, ?string $rule = null): Validation + { + switch ($field) { + case 'role': + //아래 Rule Array는 필드명.* checkbox를 사용 + $validation->setRule("{$field}.*", $field, $rule); + break; + default: + $validation = parent::setValidation($validation, $action, $field, $rule); + break; + } + return $validation; + } + //Index,FieldForm관련. + + protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string + { + switch ($action) { + case 'create': + case 'modify': + $url = base_url() . $this->uri_path . "view/" . $this->entity->getPK(); + $result = redirect()->to($url)->with('error', $message); + break; + default: + $result = parent::getResultPageByActon($action, $message); + break; + } + return $result; + } + + //생성 + protected function create_form_process(): void + { + $fields = [ + 'fields' => ['id', 'passwd', 'confirmpassword', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role'], + ]; + $this->init('create_form', $fields); + parent::create_form_process(); + } + protected function create_process(): mixed + { + $fields = [ + 'fields' => ['id', 'passwd', 'confirmpassword', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role'], + ]; + $this->init('create', $fields); + return parent::create_process(); + } + //수정 + protected function modify_form_process(mixed $uid): mixed + { + $fields = [ + 'fields' => ['id', 'passwd', 'confirmpassword', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role'], + ]; + $this->init('modify_form', $fields); + return parent::modify_form_process($uid); + } + protected function modify_process($uid): mixed + { + $fields = [ + 'fields' => ['id', 'passwd', 'confirmpassword', $this->getService()->getModel()::TITLE, 'email', 'mobile', 'role', 'status'], + ]; + $this->init('modify', $fields); + return parent::modify_process($uid); + } +} diff --git a/app/Controllers/Admin/Customer/CustomerController.php b/app/Controllers/Admin/Customer/CustomerController.php new file mode 100644 index 0000000..6dc8f23 --- /dev/null +++ b/app/Controllers/Admin/Customer/CustomerController.php @@ -0,0 +1,19 @@ +uri_path .= 'customer/'; + $this->uri_path .= "customer/"; + $this->view_path .= "customer" . DIRECTORY_SEPARATOR; + } +} diff --git a/app/Controllers/Admin/MyLogController.php b/app/Controllers/Admin/MyLogController.php index 0f8787d..cd94fa2 100644 --- a/app/Controllers/Admin/MyLogController.php +++ b/app/Controllers/Admin/MyLogController.php @@ -13,6 +13,7 @@ use App\Services\UserService; class MyLogController extends AdminController { + private $_helper = null; private $_userService = null; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { @@ -60,7 +61,6 @@ class MyLogController extends AdminController { switch ($field) { case 'user_uid': - // $this->getUserModel()->where('status', DEFAULTS['STATUS']); $options[$field] = $this->getUserService()->getFormFieldOption($field); // echo $this->getUserModel()->getLastQuery(); // dd($options); diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php index 54725c9..cf52e65 100644 --- a/app/Controllers/Admin/UserController.php +++ b/app/Controllers/Admin/UserController.php @@ -9,11 +9,13 @@ use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Validation\Validation; use Psr\Log\LoggerInterface; -use App\Helpers\UserHelper as Helper; -use App\Services\UserService as Service; +use App\Helpers\UserHelper; +use App\Services\UserService; class UserController extends AdminController { + private $_service = null; + private $_helper = null; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); @@ -22,17 +24,17 @@ class UserController extends AdminController $this->title = lang("{$this->getService()->getClassPath()}.title"); $this->helper = $this->getHelper(); } - final public function getService(): Service + final public function getService(): UserService { if (!$this->_service) { - $this->_service = new Service($this->request); + $this->_service = new UserService($this->request); } return $this->_service; } public function getHelper(): mixed { if (!$this->_helper) { - $this->_helper = new Helper($this->request); + $this->_helper = new UserHelper($this->request); } return $this->_helper; } @@ -69,8 +71,8 @@ class UserController extends AdminController switch ($action) { case 'create': case 'modify': - $url = base_url() . $this->uri_path . "view/" . $this->entity->getPK(); - $result = redirect()->to($url)->with('error', $message); + $this->getHelper()->setViewDatas($this->getViewDatas()); + $result = view($this->view_path . 'view', ['viewDatas' => $this->getViewDatas()]);; break; default: $result = parent::getResultPageByActon($action, $message); diff --git a/app/Controllers/Auth/AuthController.php b/app/Controllers/Auth/AuthController.php index dd01a14..1b8642d 100644 --- a/app/Controllers/Auth/AuthController.php +++ b/app/Controllers/Auth/AuthController.php @@ -9,45 +9,30 @@ use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; -use App\Helpers\AuthHelper as Helper; -use App\Libraries\MySocket\GoogleSocket\API as GoogleSocket; -use App\Services\UserService; -use App\Entities\UserEntity as Entity; +use App\Entities\UserEntity; +use App\Helpers\AuthHelper; abstract class AuthController extends CommonController { - private ?GoogleSocket $_socket = null; - private ?UserService $_userService = null; + private $_helper = null; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); $this->layout = "auth"; $this->uri_path = "auth/"; $this->view_path = "auth" . DIRECTORY_SEPARATOR; + $this->helper = $this->getHelper(); } - abstract protected function login_process(): Entity; + abstract protected function getSNSButton(): string; + abstract protected function login_process(): UserEntity; - final public function getSocket() - { - if (!$this->_socket) { - $this->_socket = new GoogleSocket(); - } - return $this->_socket; - } - public function getHelper(): mixed + final public function getHelper(): mixed { if (!$this->_helper) { - $this->_helper = new Helper($this->request); + $this->_helper = new AuthHelper($this->request); } return $this->_helper; } - final public function getUserService(): UserService - { - if (!$this->_userService) { - $this->_userService = new UserService($this->request); - } - return $this->_userService; - } //Index,FieldForm관련 public function getFields(): array @@ -84,9 +69,7 @@ abstract class AuthController extends CommonController try { $this->init(__FUNCTION__); helper(['form']); - //구글 로그인 BUTTON용 - // $this->google_url = $this->getSocket()->createAuthUrl(); - $this->google_url = ""; + $this->sns_buttoh = $this->getSNSButton(); $this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []]; return $this->getResultPageByActon($this->action); } catch (\Exception $e) { diff --git a/app/Controllers/Auth/GoogleController.php b/app/Controllers/Auth/GoogleController.php index c1c05f7..014da47 100644 --- a/app/Controllers/Auth/GoogleController.php +++ b/app/Controllers/Auth/GoogleController.php @@ -6,12 +6,15 @@ use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; -use App\Services\Auth\GoogleService as Service; -use App\Entities\UserEntity as Entity; +use App\Libraries\MySocket\GoogleSocket\API as GoogleSocket; +use App\Services\Auth\GoogleService; +use App\Entities\UserEntity; class GoogleController extends AuthController { - private ?Service $_service = null; + + private ?GoogleSocket $_socket = null; + private $_service = null; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); @@ -19,17 +22,29 @@ class GoogleController extends AuthController $this->class_path = $this->getService()->getClassPath(); $this->title = lang("{$this->getService()->getClassPath()}.title");; } - - final public function getService(): Service + final public function getSocket() + { + if (!$this->_socket) { + $this->_socket = new GoogleSocket(); + } + return $this->_socket; + } + final public function getService(): GoogleService { if (!$this->_service) { - $this->_service = new Service($this->getSocket(), $this->request); + $this->_service = new GoogleService($this->getSocket(), $this->request); } return $this->_service; } + public function getSNSButton(): string + { + //구글 로그인 BUTTON용 + return anchor($this->getSocket()->createAuthUrl(), ICONS['GOOGLE'] . 'Google 로그인', ["class" => "btn-google"]); + } + //로그인처리 - protected function login_process(): Entity + protected function login_process(): UserEntity { $access_code = $this->request->getVar('code'); if (!$access_code) { diff --git a/app/Controllers/Auth/LocalController.php b/app/Controllers/Auth/LocalController.php index 75d15c9..af1ce08 100644 --- a/app/Controllers/Auth/LocalController.php +++ b/app/Controllers/Auth/LocalController.php @@ -6,12 +6,12 @@ use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; -use App\Services\Auth\LocalService as Service; -use App\Entities\UserEntity as Entity; +use App\Entities\UserEntity; +use App\Services\Auth\LocalService; class LocalController extends AuthController { - private ?Service $_service = null; + private $_service = null; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); @@ -19,16 +19,20 @@ class LocalController extends AuthController $this->class_path = $this->getService()->getClassPath(); $this->title = lang("{$this->getService()->getClassPath()}.title");; } - final public function getService(): Service + final public function getService(): LocalService { if (!$this->_service) { - $this->_service = new Service($this->request); + $this->_service = new LocalService($this->request); } return $this->_service; } + public function getSNSButton(): string + { + return ""; + } //로그인처리 - protected function login_process(): Entity + protected function login_process(): UserEntity { $this->init(__FUNCTION__); $this->formDatas = $this->doValidate($this->action, $this->fields); diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index 6e922f0..fcc8ac8 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -17,7 +17,6 @@ use Psr\Log\LoggerInterface; use App\Libraries\LogCollector; use App\Services\MyLogService; -use App\Helpers\CommonHelper as Helper; abstract class CommonController extends BaseController { @@ -25,13 +24,14 @@ abstract class CommonController extends BaseController private $_myLogService = null; private $_viewDatas = []; abstract public function getService(): mixed; + abstract function getHelper(): mixed; abstract public function getFields(): array; abstract public function getFilterFields(): array; abstract public function getBatchJobFields(): array; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->_myAuth = service('myauth'); + $this->isLoggedIn = false; if ($this->getMyAuth()->isLoggedIn()) { $this->isLoggedIn = true; $this->myAuthName = $this->getMyAuth()->getNameByAuthInfo(); @@ -51,8 +51,15 @@ abstract class CommonController extends BaseController } final protected function getMyAuth(): mixed { + if (!$this->_myAuth) { + $this->_myAuth = service('myauth'); + } return $this->_myAuth; } + final public function getViewDatas(): array + { + return $this->_viewDatas; + } final public function getMyLogService(): mixed { if (!$this->_myLogService) { @@ -60,35 +67,16 @@ abstract class CommonController extends BaseController } return $this->_myLogService; } - public function getHelper(): mixed - { - if (!$this->_helper) { - $this->_helper = new Helper($this->request); - } - return $this->_helper; - } - - protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string - { - switch ($action) { - case 'create_form': - case 'modify_form': - case 'index': - case 'view': - $this->getHelper()->setViewDatas($this->getViewDatas()); - $result = view($this->view_path . $action, ['viewDatas' => $this->getViewDatas()]); - break; - default: - $result = redirect()->to($this->_myAuth->popPreviousUrl())->with('error', $message); - break; - } - return $result; - } - final public function getViewDatas(): array - { - return $this->_viewDatas; - } //Index,FieldForm관련 + protected function init(string $action, array $fields = []): void + { + $this->action = $action; + $this->fields = array_key_exists('fields', $fields) && is_array($fields['fields']) && count($fields['fields']) ? $fields['fields'] : $this->getFields(); + $this->field_rules = array_key_exists('field_rules', $fields) && is_array($fields['field_rules']) && count($fields['field_rules']) ? $fields['field_rules'] : $this->getFieldRules($this->action, $this->fields); + $this->filter_fields = array_key_exists('filter_fields', $fields) && is_array($fields['filter_fields']) && count($fields['filter_fields']) ? $fields['filter_fields'] : $this->getFilterFields(); + $this->field_options = array_key_exists('field_options', $fields) && is_array($fields['field_optionss']) && count($fields['field_options']) ? $fields['field_options'] : $this->getFormFieldOptions($this->filter_fields); + $this->batchjob_fields = array_key_exists('batchjob_fields', $fields) && is_array($fields['batchjob_fields']) && count($fields['batchjob_fields']) ? $fields['filter_fields'] : $this->getBatchJobFields(); + } protected function getFieldRule(string $action, string $field): string { if (is_array($field)) { @@ -113,10 +101,8 @@ abstract class CommonController extends BaseController switch ($field) { default: $options[$field] = lang($this->getService()->getClassPath() . '.' . strtoupper($field)); - // dd($options); break; } - // dd($options); return $options; } final protected function getFormFieldOptions(array $fields, array $options = []): array @@ -127,7 +113,6 @@ abstract class CommonController extends BaseController } $options = $this->getFormFieldOption($field, $options); } - // dd($options); return $options; } protected function setValidation(Validation $validation, string $action, string $field, ?string $rule = null): Validation @@ -139,18 +124,7 @@ abstract class CommonController extends BaseController } return $validation; } - //Index,FieldForm관련 - //Field관련 - final protected function init(string $action, array $fields = []): void - { - $this->action = $action; - $this->fields = array_key_exists('fields', $fields) && is_array($fields['fields']) && count($fields['fields']) ? $fields['fields'] : $this->getFields(); - $this->field_rules = array_key_exists('field_rules', $fields) && is_array($fields['field_rules']) && count($fields['field_rules']) ? $fields['field_rules'] : $this->getFieldRules($this->action, $this->fields); - $this->filter_fields = array_key_exists('filter_fields', $fields) && is_array($fields['filter_fields']) && count($fields['filter_fields']) ? $fields['filter_fields'] : $this->getFilterFields(); - $this->field_options = array_key_exists('field_options', $fields) && is_array($fields['field_optionss']) && count($fields['field_options']) ? $fields['field_options'] : $this->getFormFieldOptions($this->filter_fields); - $this->batchjob_fields = array_key_exists('batchjob_fields', $fields) && is_array($fields['batchjob_fields']) && count($fields['batchjob_fields']) ? $fields['filter_fields'] : $this->getBatchJobFields(); - } //데이터 검증 final protected function doValidate(string $action, array $fields, ?Validation $validation = null): array { @@ -171,6 +145,23 @@ abstract class CommonController extends BaseController } return $validation->getValidated(); } + protected function getResultPageByActon(string $action, string $message = MESSAGES["SUCCESS"]): RedirectResponse|string + { + switch ($action) { + case 'create_form': + case 'modify_form': + case 'index': + case 'view': + $this->getHelper()->setViewDatas($this->getViewDatas()); + $result = view($this->view_path . $action, ['viewDatas' => $this->getViewDatas()]); + break; + default: + $result = redirect()->to($this->getMyAuth()->popPreviousUrl())->with('error', $message); + break; + } + return $result; + } + //Index,FieldForm관련 // 생성 protected function create_form_process(): void {} @@ -208,7 +199,6 @@ abstract class CommonController extends BaseController return redirect()->back()->withInput()->with('error', $e->getMessage()); } } - //수정관련 protected function modify_form_process(mixed $uid): mixed { @@ -284,10 +274,6 @@ abstract class CommonController extends BaseController $this->formDatas = $this->doValidate($this->action, $this->fields); $temps = []; foreach ($entities as $entity) { - // echo var_dump($entity->toArray()); - // echo "
"; - // echo $this->formDatas['status']; - // exit; $temps[] = $this->getService()->modify($entity, $this->formDatas); } return $temps; @@ -357,7 +343,7 @@ abstract class CommonController extends BaseController } } //일괄삭제 - protected function batchjob_delete_process(array $entities): void + protected function batchjob_delete_process(array $entities): int { $cnt = 0; foreach ($entities as $entity) { @@ -367,11 +353,7 @@ abstract class CommonController extends BaseController $cnt++; } } - if ($cnt) { - $message = "총:" . count($entities) . "중에 " . $cnt . "개를 실패"; - LogCollector::error($message); - throw new \Exception($message); - } + return $cnt; } final public function batchjob_delete(): RedirectResponse|string { @@ -389,7 +371,12 @@ abstract class CommonController extends BaseController $entity = $this->getService()->getEntity($uid); $entities[] = $entity; } - $this->batchjob_delete_process($entities); + $cnt = $this->batchjob_delete_process($entities); + if ($cnt) { + $message = "총:" . count($entities) . "중에 " . $cnt . "개를 실패"; + LogCollector::error($message); + throw new \Exception($message); + } $this->getService()->getModel()->transCommit(); $this->getMyLogService()->save($this->getService(), __FUNCTION__, $this->_myAuth, MESSAGES["SUCCESS"]); return $this->getResultPageByActon($this->action); @@ -441,7 +428,7 @@ abstract class CommonController extends BaseController } //검색일 처리 $this->start = $this->request->getVar('start') ?? DEFAULTS['EMPTY']; - $this->end = $this->request->getVar('end') ?: DEFAULTS['EMPTY']; + $this->end = $this->request->getVar('end') ?? DEFAULTS['EMPTY']; $this->getService()->getModel()->setList_DateFilter($this->start, $this->end); } //PageNation 처리 @@ -480,8 +467,8 @@ abstract class CommonController extends BaseController //Pagination 처리 $this->pagination = $this->getPaginationForList(); //OrderBy 처리 - $this->order_field = $this->request->getVar('order_field') ?: DEFAULTS['EMPTY']; - $this->order_value = $this->request->getVar('order_value') ?: DEFAULTS['EMPTY']; + $this->order_field = $this->request->getVar('order_field') ?? DEFAULTS['EMPTY']; + $this->order_value = $this->request->getVar('order_value') ?? DEFAULTS['EMPTY']; if ($this->order_field !== DEFAULTS['EMPTY'] && $this->order_value !== DEFAULTS['EMPTY']) { $this->getService()->getModel()->orderBy(sprintf("%s.%s %s", $this->getService()->getModel()::TABLE, $this->order_field, $this->order_value)); } else { diff --git a/app/Database/erp2.vuerd.json b/app/Database/erp2.vuerd.json index dcd7039..c5e7b15 100644 --- a/app/Database/erp2.vuerd.json +++ b/app/Database/erp2.vuerd.json @@ -4,9 +4,9 @@ "settings": { "width": 4000, "height": 4000, - "scrollTop": -1717.6241, - "scrollLeft": -1509.1879, - "zoomLevel": 0.43, + "scrollTop": -200, + "scrollLeft": -790.4997, + "zoomLevel": 0.82, "show": 431, "database": 4, "databaseName": "", @@ -139,7 +139,6 @@ "xEoc72X0ErdGKU7rMzenm", "02r_3OPPiD_vAgD7rmZK4", "Vb_CyMe0qvi7oxda4dUVW", - "Ksp65Qh_aOFmAb1ksx64Q", "6JNus18UqajPfwOjkPali", "qmfQUBHfeiJwR5kq3SyNW", "D1tPn8Uq5C8UWh6dtzBJZ" @@ -158,7 +157,8 @@ "6JNus18UqajPfwOjkPali", "qmfQUBHfeiJwR5kq3SyNW", "D1tPn8Uq5C8UWh6dtzBJZ", - "Z4egkB50o_Ii-lP5VRBGr" + "Z4egkB50o_Ii-lP5VRBGr", + "NVO-aO4GEW9DHdEV8XQq6" ], "ui": { "x": 142.5947, @@ -169,7 +169,7 @@ "color": "" }, "meta": { - "updateAt": 1745915069299, + "updateAt": 1746408831933, "createAt": 1745819764137 } }, @@ -183,7 +183,6 @@ "tmkHXMc6fdNicHeig7nss", "foBGnViYEjNlWIAhXeuLw", "HaKM09bv5DwJFH9pxSqWI", - "f4NQ8F-FyamLyf4YR0VY1", "hQM1tPHn6MrCa4pIL7t7w", "Mr4qiMpKO4UVj3aZ3HueW", "ut3UlHsNjxqNgAzENBkfy" @@ -208,7 +207,7 @@ "color": "" }, "meta": { - "updateAt": 1745914896857, + "updateAt": 1746409586940, "createAt": 1745819764137 } }, @@ -224,7 +223,7 @@ "Wks-dXdsHSF-EATUWnxzY", "lu2r9w2xmXsB8H7Mrdt1t", "54iuIW4knok06vP4JH-oN", - "Djbw3B6xZWKAvwJDto9xl", + "bh-W1plz0vCW2rURDnfDR", "tNaVOzr3vywCXiQdfUJWq", "6bQ_6eGfINic9LpM6PtDw" ], @@ -237,6 +236,7 @@ "lu2r9w2xmXsB8H7Mrdt1t", "54iuIW4knok06vP4JH-oN", "Djbw3B6xZWKAvwJDto9xl", + "bh-W1plz0vCW2rURDnfDR", "tNaVOzr3vywCXiQdfUJWq", "6bQ_6eGfINic9LpM6PtDw" ], @@ -249,7 +249,7 @@ "color": "" }, "meta": { - "updateAt": 1745915688377, + "updateAt": 1746409142726, "createAt": 1745819764137 } }, @@ -265,6 +265,7 @@ "vEH63UEDTpNDwfohuydGV", "6puy3O9sH_wHBHdoek3GL", "VgoAzdbZTyH5EcsAYHxcO", + "PfyFAW02XGNLH3al90jv5", "vjqS4O1-xHzlAV_i9l3Xe", "gQUT2v0Gg59R1SfKMhry3" ], @@ -276,19 +277,20 @@ "vEH63UEDTpNDwfohuydGV", "6puy3O9sH_wHBHdoek3GL", "VgoAzdbZTyH5EcsAYHxcO", + "PfyFAW02XGNLH3al90jv5", "vjqS4O1-xHzlAV_i9l3Xe", "gQUT2v0Gg59R1SfKMhry3" ], "ui": { - "x": 2204.5265, - "y": 2062.658, + "x": 2191.1119, + "y": 2013.8775, "zIndex": 2, "widthName": 76, "widthComment": 81, "color": "" }, "meta": { - "updateAt": 1745915719156, + "updateAt": 1746409659442, "createAt": 1745819764138 } }, @@ -334,6 +336,7 @@ "zL9bBVm37HTSU-xWpwxxJ", "G9PMddYQm9ohnzkJUa_nw", "P84ZMnZu1nZtRhDY18T5o", + "VycsOgeM1SXkcq_5XYUMS", "k4vpMNZ75fNUjX-hrjXzs", "8ZPjmeG3NoO6C0icGibJP" ], @@ -344,19 +347,20 @@ "zL9bBVm37HTSU-xWpwxxJ", "G9PMddYQm9ohnzkJUa_nw", "P84ZMnZu1nZtRhDY18T5o", + "VycsOgeM1SXkcq_5XYUMS", "k4vpMNZ75fNUjX-hrjXzs", "8ZPjmeG3NoO6C0icGibJP" ], "ui": { - "x": 2211.7851, - "y": 2423.249, + "x": 2195.9314, + "y": 2346.4197, "zIndex": 2, "widthName": 68, "widthComment": 89, "color": "" }, "meta": { - "updateAt": 1745916373339, + "updateAt": 1746409661670, "createAt": 1745819764138 } }, @@ -369,7 +373,7 @@ "XQE8sY3pDLC2iy95uc9Ir", "oc5quhO8E3mqrBZKbIy_G", "ehNv0f07ci1ARnkTSDG6J", - "xaUC3GLta1iHmo1YQ-qDo", + "PHhRG4nKR6k_CQF9B8xS1", "ltPYBs_iNuZJM6wTnK0H-", "liJON6hIBB9aS-pQgM0Q6" ], @@ -379,6 +383,7 @@ "oc5quhO8E3mqrBZKbIy_G", "ehNv0f07ci1ARnkTSDG6J", "xaUC3GLta1iHmo1YQ-qDo", + "PHhRG4nKR6k_CQF9B8xS1", "ltPYBs_iNuZJM6wTnK0H-", "liJON6hIBB9aS-pQgM0Q6" ], @@ -391,7 +396,7 @@ "color": "" }, "meta": { - "updateAt": 1745820358708, + "updateAt": 1746409161413, "createAt": 1745819764138 } }, @@ -403,7 +408,7 @@ "Id0h8QbOdlhPj9P1zTm5o", "SFj3q5xg6pcI4RSDKPSgI", "0ONL4QLQRyZ32MBJ7TN7u", - "e6eWKMFnpXI-rPJZ_9tBt", + "nDoaVrEhO8hLuHbgZV4il", "Vm1-FnoJLcJ0GRnTp0vnn", "R-UjmO-S2UeQdddVNwH5M" ], @@ -413,6 +418,7 @@ "SFj3q5xg6pcI4RSDKPSgI", "0ONL4QLQRyZ32MBJ7TN7u", "e6eWKMFnpXI-rPJZ_9tBt", + "nDoaVrEhO8hLuHbgZV4il", "Vm1-FnoJLcJ0GRnTp0vnn", "R-UjmO-S2UeQdddVNwH5M" ], @@ -425,7 +431,7 @@ "color": "" }, "meta": { - "updateAt": 1745821118588, + "updateAt": 1746409152349, "createAt": 1745819764138 } }, @@ -437,7 +443,7 @@ "kfY2wrPM9lt3o_CUkvoak", "-AVLGqgg8iuXOxuNBdJWM", "jVSNW9iqcbueNWWN9_Dwv", - "YuuqW6tFbr7O4iA-rdhqg", + "w9ZyCsgvhPpSDiq62Fc4J", "9alIPr6CfILtRlXhhAA9R", "qGdOIB-Er06HQRP7mR09K" ], @@ -446,6 +452,7 @@ "-AVLGqgg8iuXOxuNBdJWM", "jVSNW9iqcbueNWWN9_Dwv", "YuuqW6tFbr7O4iA-rdhqg", + "w9ZyCsgvhPpSDiq62Fc4J", "9alIPr6CfILtRlXhhAA9R", "qGdOIB-Er06HQRP7mR09K" ], @@ -458,7 +465,7 @@ "color": "" }, "meta": { - "updateAt": 1745820195936, + "updateAt": 1746409169997, "createAt": 1745819764138 } }, @@ -750,7 +757,6 @@ "35XbdvgOzpNdasPnMcbkx", "ALRvTZjYrv4K1ltFn30Mn", "3jtklRjnxzZANo69T6vWW", - "6ZDZLrSpVuAeUGWvifvq7", "RJRgO2-42FxCW0ucjngu9", "iMCMcnQGafCPo46R91hOK", "6WOE-jsg5rFe2X04atr-Y" @@ -780,13 +786,13 @@ "color": "" }, "meta": { - "updateAt": 1745914829254, + "updateAt": 1746409580309, "createAt": 1745819764140 } }, "gsa0XtQZQgrJ8ZXy8VQVg": { "id": "gsa0XtQZQgrJ8ZXy8VQVg", - "name": "loginfo", + "name": "logger", "comment": "작업 기록 로그", "columnIds": [ "J_xS3cvULouXCTo5gCiTm", @@ -795,6 +801,7 @@ "kKI4hKELPs9Nh5UtQvSu7", "wkjLZ-Bc9g3Z6Rh_IQ7_q", "W5bxFTggHoO9_PPsfy2EB", + "WHpensFTMwtupqV5TbNMV", "qHceMMaFcmVnWPlJ2T4Sg" ], "seqColumnIds": [ @@ -807,6 +814,7 @@ "W5bxFTggHoO9_PPsfy2EB", "Wef1cEik-NFTr_alGxLpa", "OgECIC2AofE3lQIX-nOkM", + "WHpensFTMwtupqV5TbNMV", "qHceMMaFcmVnWPlJ2T4Sg" ], "ui": { @@ -818,7 +826,7 @@ "color": "" }, "meta": { - "updateAt": 1745916328037, + "updateAt": 1746409070281, "createAt": 1745819764142 } }, @@ -847,39 +855,10 @@ "color": "" }, "meta": { - "updateAt": 1745915802565, + "updateAt": 1746409532609, "createAt": 1745820710362 } }, - "jpnFKaKfog9MCHpL2kUNA": { - "id": "jpnFKaKfog9MCHpL2kUNA", - "name": "clientinfos_couponinfos", - "comment": "사용자별 쿠폰정보", - "columnIds": [ - "CvM2-6iCwD-tglwbA0p2z", - "DvgoXrAW5NmmXkGGuGg3V", - "SHZNfw8iUBzUTew32Qrz6", - "Laxvib4gg6226lk97OLYI" - ], - "seqColumnIds": [ - "CvM2-6iCwD-tglwbA0p2z", - "DvgoXrAW5NmmXkGGuGg3V", - "SHZNfw8iUBzUTew32Qrz6", - "Laxvib4gg6226lk97OLYI" - ], - "ui": { - "x": 1156.7488, - "y": 132.2122, - "zIndex": 215, - "widthName": 127, - "widthComment": 101, - "color": "" - }, - "meta": { - "updateAt": 1745914768165, - "createAt": 1745821326011 - } - }, "5AUwJum9FKPCoYRMBhLnF": { "id": "5AUwJum9FKPCoYRMBhLnF", "name": "pointinfo", @@ -889,8 +868,7 @@ "PyXYmokQzpzzT08WTmtsN", "fhM5WF3fhv8_g8KDcNF9g", "NnXAqOInrD08SltZoFNHu", - "S3K2h7O2zUHNoSb5rfn5c", - "v6TBpKQ_tIXDcJth0Hf4s", + "9CJ9f4Gdh5iKDZAMDjNAz", "qHxcsOsImKFSnmwyIE_XZ", "jav6q3L-HQhPYJBdcLIgz" ], @@ -902,6 +880,7 @@ "QfmlZ3--qScQizx76syAE", "NnXAqOInrD08SltZoFNHu", "S3K2h7O2zUHNoSb5rfn5c", + "9CJ9f4Gdh5iKDZAMDjNAz", "v6TBpKQ_tIXDcJth0Hf4s", "qHxcsOsImKFSnmwyIE_XZ", "jav6q3L-HQhPYJBdcLIgz" @@ -915,7 +894,7 @@ "color": "" }, "meta": { - "updateAt": 1745914944020, + "updateAt": 1746409583260, "createAt": 1745914844735 } }, @@ -931,6 +910,7 @@ "ZyOb1xK46x0-io64OuWOF", "B3NNhoIrKYGZrScx8XuuH", "06IXODaDZXY8cDIet15Im", + "0HPmN1faJk-KhZXILO2zx", "AtQmi9C4c5YlY8Brl9irr", "a0bnNatieTB5pr9jElQbS" ], @@ -942,19 +922,20 @@ "ZyOb1xK46x0-io64OuWOF", "B3NNhoIrKYGZrScx8XuuH", "06IXODaDZXY8cDIet15Im", + "0HPmN1faJk-KhZXILO2zx", "AtQmi9C4c5YlY8Brl9irr", "a0bnNatieTB5pr9jElQbS" ], "ui": { - "x": 2216.8652, - "y": 2703.0861, + "x": 2199.7921, + "y": 2660.4029, "zIndex": 401, "widthName": 65, "widthComment": 98, "color": "" }, "meta": { - "updateAt": 1745916393936, + "updateAt": 1746409667077, "createAt": 1745916349284 } } @@ -1085,18 +1066,18 @@ "tableId": "Jq5Qkun2FzQhCGKANIVOZ", "name": "role", "comment": "", - "dataType": "ENUM(admin,manager)", + "dataType": "VARCHAR(50)", "default": "manager", "options": 0, "ui": { "keys": 0, "widthName": 60, "widthComment": 60, - "widthDataType": 126, + "widthDataType": 75, "widthDefault": 60 }, "meta": { - "updateAt": 1745819764137, + "updateAt": 1746420269272, "createAt": 1745819764137 } }, @@ -1105,18 +1086,18 @@ "tableId": "Jq5Qkun2FzQhCGKANIVOZ", "name": "status", "comment": "", - "dataType": "ENUM(use,stop)", + "dataType": "VARCHAR(20)", "default": "use", "options": 0, "ui": { "keys": 0, "widthName": 60, "widthComment": 60, - "widthDataType": 87, + "widthDataType": 75, "widthDefault": 60 }, "meta": { - "updateAt": 1745819764137, + "updateAt": 1746409029484, "createAt": 1745819764137 } }, @@ -1176,7 +1157,7 @@ "widthDefault": 60 }, "meta": { - "updateAt": 1745819764137, + "updateAt": 1746406061984, "createAt": 1745819764137 } }, @@ -1265,18 +1246,18 @@ "tableId": "6ajvOCaGuXU9pzV0Y9jEi", "name": "role", "comment": "", - "dataType": "ENUM(user,partner)", - "default": "user", + "dataType": "VARCHAR(50)", + "default": "'user'", "options": 8, "ui": { "keys": 0, "widthName": 60, "widthComment": 60, - "widthDataType": 107, + "widthDataType": 75, "widthDefault": 60 }, "meta": { - "updateAt": 1745821700050, + "updateAt": 1746420283048, "createAt": 1745819764137 } }, @@ -1305,18 +1286,18 @@ "tableId": "6ajvOCaGuXU9pzV0Y9jEi", "name": "status", "comment": "", - "dataType": "ENUM(use,stop)", - "default": "use", + "dataType": "VARCHAR(20)", + "default": "'use'", "options": 8, "ui": { "keys": 0, "widthName": 60, "widthComment": 60, - "widthDataType": 87, + "widthDataType": 75, "widthDefault": 60 }, "meta": { - "updateAt": 1745821688154, + "updateAt": 1746408900558, "createAt": 1745819764137 } }, @@ -1396,7 +1377,7 @@ "widthDefault": 60 }, "meta": { - "updateAt": 1745819764137, + "updateAt": 1746406061984, "createAt": 1745819764137 } }, @@ -1405,18 +1386,18 @@ "tableId": "GDEF0_WuOpaYtsZxjn2zM", "name": "status", "comment": "", - "dataType": "ENUM(deposit,withdrawal)", - "default": "deposit", + "dataType": "VARCHAR(20)", + "default": "'in'", "options": 0, "ui": { "keys": 0, "widthName": 60, "widthComment": 60, - "widthDataType": 143, + "widthDataType": 75, "widthDefault": 60 }, "meta": { - "updateAt": 1745819764137, + "updateAt": 1746421449083, "createAt": 1745819764137 } }, @@ -2496,7 +2477,7 @@ "widthDefault": 60 }, "meta": { - "updateAt": 1745819764139, + "updateAt": 1746406061984, "createAt": 1745819764139 } }, @@ -2505,18 +2486,18 @@ "tableId": "kc1EFvFhlBSc0B0bDgX28", "name": "type", "comment": "", - "dataType": "ENUM(hosting,colocation,defense)", + "dataType": "VARCHAR(20)", "default": "hosting", "options": 0, "ui": { "keys": 0, "widthName": 60, "widthComment": 60, - "widthDataType": 185, + "widthDataType": 75, "widthDefault": 60 }, "meta": { - "updateAt": 1745819764139, + "updateAt": 1746408944557, "createAt": 1745819764139 } }, @@ -2625,18 +2606,18 @@ "tableId": "kc1EFvFhlBSc0B0bDgX28", "name": "status", "comment": "", - "dataType": "ENUM(use,stop,terminate)", + "dataType": "VARCHAR(20)", "default": "use", "options": 0, "ui": { "keys": 0, "widthName": 60, "widthComment": 60, - "widthDataType": 141, + "widthDataType": 75, "widthDefault": 60 }, "meta": { - "updateAt": 1745819764139, + "updateAt": 1746408955453, "createAt": 1745819764139 } }, @@ -2785,18 +2766,18 @@ "tableId": "R4reSshLxH3DQW6fUfSPa", "name": "status", "comment": "", - "dataType": "ENUM(unpaid,paid,refunded)", + "dataType": "VARCHAR(20)", "default": "unpaid", "options": 0, "ui": { "keys": 0, "widthName": 60, "widthComment": 60, - "widthDataType": 157, + "widthDataType": 75, "widthDefault": 60 }, "meta": { - "updateAt": 1745819764139, + "updateAt": 1746408968679, "createAt": 1745819764139 } }, @@ -3783,40 +3764,40 @@ "KvMMNu-PKESt0_2K4AJcB": { "id": "KvMMNu-PKESt0_2K4AJcB", "tableId": "gsa0XtQZQgrJ8ZXy8VQVg", - "name": "class", + "name": "class_name", "comment": "", "dataType": "VARCHAR(255)", "default": "", "options": 0, "ui": { "keys": 0, - "widthName": 60, + "widthName": 61, "widthComment": 60, "widthDataType": 81, "widthDefault": 60 }, "meta": { - "updateAt": 1745819764142, + "updateAt": 1746409083866, "createAt": 1745819764142 } }, "kKI4hKELPs9Nh5UtQvSu7": { "id": "kKI4hKELPs9Nh5UtQvSu7", "tableId": "gsa0XtQZQgrJ8ZXy8VQVg", - "name": "method", + "name": "method_name", "comment": "", "dataType": "VARCHAR(255)", "default": "", "options": 0, "ui": { "keys": 0, - "widthName": 60, + "widthName": 78, "widthComment": 60, "widthDataType": 81, "widthDefault": 60 }, "meta": { - "updateAt": 1745819764142, + "updateAt": 1746409091430, "createAt": 1745819764142 } }, @@ -3843,20 +3824,20 @@ "W5bxFTggHoO9_PPsfy2EB": { "id": "W5bxFTggHoO9_PPsfy2EB", "tableId": "gsa0XtQZQgrJ8ZXy8VQVg", - "name": "description", + "name": "content", "comment": "", "dataType": "TEXT", "default": "", "options": 8, "ui": { "keys": 0, - "widthName": 61, + "widthName": 60, "widthComment": 60, "widthDataType": 60, "widthDefault": 60 }, "meta": { - "updateAt": 1745819764142, + "updateAt": 1746409102873, "createAt": 1745819764142 } }, @@ -4160,66 +4141,6 @@ "createAt": 1745821287277 } }, - "CvM2-6iCwD-tglwbA0p2z": { - "id": "CvM2-6iCwD-tglwbA0p2z", - "tableId": "jpnFKaKfog9MCHpL2kUNA", - "name": "uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 10, - "ui": { - "keys": 1, - "widthName": 60, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1745821382946, - "createAt": 1745821381013 - } - }, - "DvgoXrAW5NmmXkGGuGg3V": { - "id": "DvgoXrAW5NmmXkGGuGg3V", - "tableId": "jpnFKaKfog9MCHpL2kUNA", - "name": "clientinfo_uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 73, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1745821407264, - "createAt": 1745821399265 - } - }, - "SHZNfw8iUBzUTew32Qrz6": { - "id": "SHZNfw8iUBzUTew32Qrz6", - "tableId": "jpnFKaKfog9MCHpL2kUNA", - "name": "couponinfo_uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 84, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1745914756526, - "createAt": 1745821416069 - } - }, "UAJUB0FsrZBOtW3odCNDB": { "id": "UAJUB0FsrZBOtW3odCNDB", "tableId": "ttG9p8-yD8NJ7mGo3WNmM", @@ -4325,41 +4246,21 @@ "tableId": "jO40Ej5EXImXnadoJo9bn", "name": "status", "comment": "", - "dataType": "ENUM(deposit,withdrawal)", - "default": "deposit", + "dataType": "VARCHAR(20)", + "default": "'in'", "options": 0, "ui": { "keys": 0, "widthName": 60, "widthComment": 60, - "widthDataType": 143, + "widthDataType": 75, "widthDefault": 60 }, "meta": { - "updateAt": 1745914717252, + "updateAt": 1746421463531, "createAt": 1745914717252 } }, - "Laxvib4gg6226lk97OLYI": { - "id": "Laxvib4gg6226lk97OLYI", - "tableId": "jpnFKaKfog9MCHpL2kUNA", - "name": "created_at", - "comment": "", - "dataType": "TIMESTAMP", - "default": "CURRENT_TIMESTAMP", - "options": 8, - "ui": { - "keys": 0, - "widthName": 60, - "widthComment": 60, - "widthDataType": 65, - "widthDefault": 122 - }, - "meta": { - "updateAt": 1745914768165, - "createAt": 1745914768165 - } - }, "35XbdvgOzpNdasPnMcbkx": { "id": "35XbdvgOzpNdasPnMcbkx", "tableId": "jO40Ej5EXImXnadoJo9bn", @@ -4376,7 +4277,7 @@ "widthDefault": 60 }, "meta": { - "updateAt": 1745914818179, + "updateAt": 1746406061984, "createAt": 1745914803629 } }, @@ -4576,7 +4477,7 @@ "widthDefault": 60 }, "meta": { - "updateAt": 1745914930050, + "updateAt": 1746406061984, "createAt": 1745914916195 } }, @@ -4839,6 +4740,206 @@ "updateAt": 1745916389386, "createAt": 1745916389386 } + }, + "NVO-aO4GEW9DHdEV8XQq6": { + "id": "NVO-aO4GEW9DHdEV8XQq6", + "tableId": "6ajvOCaGuXU9pzV0Y9jEi", + "name": "code", + "comment": "", + "dataType": "VARCHAR(", + "default": "", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 60, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746404371161, + "createAt": 1746404353801 + } + }, + "WHpensFTMwtupqV5TbNMV": { + "id": "WHpensFTMwtupqV5TbNMV", + "tableId": "gsa0XtQZQgrJ8ZXy8VQVg", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "use", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746409047866, + "createAt": 1746409047865 + } + }, + "0HPmN1faJk-KhZXILO2zx": { + "id": "0HPmN1faJk-KhZXILO2zx", + "tableId": "xrgAG9Zc_whfxTeGQ2fqx", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "use", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746409116719, + "createAt": 1746409116719 + } + }, + "VycsOgeM1SXkcq_5XYUMS": { + "id": "VycsOgeM1SXkcq_5XYUMS", + "tableId": "ZMGIWLFEswObjH2Sx0NlW", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "use", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746409123565, + "createAt": 1746409123565 + } + }, + "PfyFAW02XGNLH3al90jv5": { + "id": "PfyFAW02XGNLH3al90jv5", + "tableId": "z6WAw_7GnarTYkag4Lcsg", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "use", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746409129707, + "createAt": 1746409129707 + } + }, + "bh-W1plz0vCW2rURDnfDR": { + "id": "bh-W1plz0vCW2rURDnfDR", + "tableId": "B4qGh3KZsXHQ3_4EOgwJZ", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "use", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746409135259, + "createAt": 1746409135259 + } + }, + "nDoaVrEhO8hLuHbgZV4il": { + "id": "nDoaVrEhO8hLuHbgZV4il", + "tableId": "ZLEpY5EjuZV21718zf-Y1", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "use", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746409147625, + "createAt": 1746409147624 + } + }, + "PHhRG4nKR6k_CQF9B8xS1": { + "id": "PHhRG4nKR6k_CQF9B8xS1", + "tableId": "doERb3lIVeBW_D0NtNYX8", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "use", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746409157661, + "createAt": 1746409157661 + } + }, + "w9ZyCsgvhPpSDiq62Fc4J": { + "id": "w9ZyCsgvhPpSDiq62Fc4J", + "tableId": "koyEKtRkVwNF0GzL7x9EJ", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "use", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746409165335, + "createAt": 1746409165335 + } + }, + "9CJ9f4Gdh5iKDZAMDjNAz": { + "id": "9CJ9f4Gdh5iKDZAMDjNAz", + "tableId": "5AUwJum9FKPCoYRMBhLnF", + "name": "status", + "comment": "", + "dataType": "VARCHAR(20)", + "default": "'in'", + "options": 0, + "ui": { + "keys": 0, + "widthName": 60, + "widthComment": 60, + "widthDataType": 75, + "widthDefault": 60 + }, + "meta": { + "updateAt": 1746421440442, + "createAt": 1746409195694 + } } }, "relationshipEntities": { @@ -4852,8 +4953,8 @@ "columnIds": [ "_AcWUYKzNJd-V0fRHq8Cx" ], - "x": 646.5947, - "y": 397.3022666666667, + "x": 620.5947, + "y": 377.3022666666667, "direction": 2 }, "end": { @@ -4862,7 +4963,7 @@ "nPYun5WHoy8uroXUBiqh8" ], "x": 1156.4971, - "y": 728.9912, + "y": 716.9912, "direction": 1 }, "meta": { @@ -4908,8 +5009,8 @@ "columnIds": [ "7fB6MgwIX6jMpD6d2Sq7k" ], - "x": 2721.5265, - "y": 2198.658, + "x": 2708.1119, + "y": 2161.8775, "direction": 2 }, "end": { @@ -4936,8 +5037,8 @@ "columnIds": [ "2HB01q46-mugMjuOz85YG" ], - "x": 2697.7851, - "y": 2547.249, + "x": 2681.9314, + "y": 2482.4197, "direction": 2 }, "end": { @@ -4964,8 +5065,8 @@ "columnIds": [ "_AcWUYKzNJd-V0fRHq8Cx" ], - "x": 394.5947, - "y": 454.6356, + "x": 381.5947, + "y": 430.6356, "direction": 8 }, "end": { @@ -4973,7 +5074,7 @@ "columnIds": [ "sscrxOdwLlx94tx1j_MrH" ], - "x": 453.42719999999997, + "x": 401.42719999999997, "y": 824.4514, "direction": 4 }, @@ -4992,7 +5093,7 @@ "columnIds": [ "nb5CGzskl3_LIRA0yyede" ], - "x": 311.17719999999997, + "x": 285.17719999999997, "y": 1144.4514, "direction": 8 }, @@ -5020,7 +5121,7 @@ "columnIds": [ "nb5CGzskl3_LIRA0yyede" ], - "x": 737.9272, + "x": 633.9272, "y": 1048.4514, "direction": 2 }, @@ -5076,7 +5177,7 @@ "columnIds": [ "nb5CGzskl3_LIRA0yyede" ], - "x": 737.9272, + "x": 633.9272, "y": 1112.4514, "direction": 2 }, @@ -5104,8 +5205,8 @@ "columnIds": [ "7fB6MgwIX6jMpD6d2Sq7k" ], - "x": 2204.5265, - "y": 2198.658, + "x": 2191.1119, + "y": 2161.8775, "direction": 1 }, "end": { @@ -5132,7 +5233,7 @@ "columnIds": [ "nb5CGzskl3_LIRA0yyede" ], - "x": 595.6772, + "x": 517.6772, "y": 1144.4514, "direction": 8 }, @@ -5160,8 +5261,8 @@ "columnIds": [ "2HB01q46-mugMjuOz85YG" ], - "x": 2211.7851, - "y": 2547.249, + "x": 2195.9314, + "y": 2482.4197, "direction": 1 }, "end": { @@ -5188,7 +5289,7 @@ "columnIds": [ "nb5CGzskl3_LIRA0yyede" ], - "x": 737.9272, + "x": 633.9272, "y": 984.4514, "direction": 2 }, @@ -5242,7 +5343,7 @@ "columnIds": [ "nb5CGzskl3_LIRA0yyede" ], - "x": 737.9272, + "x": 633.9272, "y": 920.4514, "direction": 2 }, @@ -5288,34 +5389,6 @@ "createAt": 1745819764143 } }, - "MG6gqLi-aVImpunYixNMB": { - "id": "MG6gqLi-aVImpunYixNMB", - "identification": false, - "relationshipType": 4, - "startRelationshipType": 2, - "start": { - "tableId": "6ajvOCaGuXU9pzV0Y9jEi", - "columnIds": [ - "_AcWUYKzNJd-V0fRHq8Cx" - ], - "x": 646.5947, - "y": 184.6356, - "direction": 2 - }, - "end": { - "tableId": "jO40Ej5EXImXnadoJo9bn", - "columnIds": [ - "O_MKuQKv7yP-k0dsyszkk" - ], - "x": 1128.567, - "y": 270.097, - "direction": 1 - }, - "meta": { - "updateAt": 1745819764143, - "createAt": 1745819764143 - } - }, "95uRv2fz3rssNbkyuzkLh": { "id": "95uRv2fz3rssNbkyuzkLh", "identification": false, @@ -5326,7 +5399,7 @@ "columnIds": [ "mfHtgzc_Aeocr6xkgwYWh" ], - "x": 688.2192, + "x": 643.2192, "y": 2991.5555, "direction": 2 }, @@ -5336,7 +5409,7 @@ "DGl10GI58QwOHwpTu4Z1Y" ], "x": 1166.3824, - "y": 3294.8708, + "y": 3306.8708, "direction": 1 }, "meta": { @@ -5344,34 +5417,6 @@ "createAt": 1745819764143 } }, - "Aj0_hRYAK-XVJSijPSu07": { - "id": "Aj0_hRYAK-XVJSijPSu07", - "identification": false, - "relationshipType": 16, - "startRelationshipType": 2, - "start": { - "tableId": "B4qGh3KZsXHQ3_4EOgwJZ", - "columnIds": [ - "F9EPb6nsDx6Tf3GG8rvP1" - ], - "x": 2457.4777, - "y": 1676.118, - "direction": 4 - }, - "end": { - "tableId": "ZLEpY5EjuZV21718zf-Y1", - "columnIds": [ - "SFj3q5xg6pcI4RSDKPSgI" - ], - "x": 2416.6819, - "y": 1576.3551, - "direction": 8 - }, - "meta": { - "updateAt": 1745820616317, - "createAt": 1745820616317 - } - }, "Jj6R_4lq6u3hMzLKjgqc9": { "id": "Jj6R_4lq6u3hMzLKjgqc9", "identification": false, @@ -5410,7 +5455,7 @@ "columnIds": [ "Id0h8QbOdlhPj9P1zTm5o" ], - "x": 2647.6819, + "x": 2635.6819, "y": 1524.3551, "direction": 2 }, @@ -5428,62 +5473,6 @@ "createAt": 1745820911647 } }, - "xRge-SlcORE83ke41txTG": { - "id": "xRge-SlcORE83ke41txTG", - "identification": false, - "relationshipType": 16, - "startRelationshipType": 2, - "start": { - "tableId": "6ajvOCaGuXU9pzV0Y9jEi", - "columnIds": [ - "_AcWUYKzNJd-V0fRHq8Cx" - ], - "x": 646.5947, - "y": 184.6356, - "direction": 2 - }, - "end": { - "tableId": "jpnFKaKfog9MCHpL2kUNA", - "columnIds": [ - "DvgoXrAW5NmmXkGGuGg3V" - ], - "x": 1156.7488, - "y": 208.2122, - "direction": 1 - }, - "meta": { - "updateAt": 1745821399265, - "createAt": 1745821399265 - } - }, - "6X-W5Q0SxPLd-sIRlwf5W": { - "id": "6X-W5Q0SxPLd-sIRlwf5W", - "identification": false, - "relationshipType": 16, - "startRelationshipType": 2, - "start": { - "tableId": "jO40Ej5EXImXnadoJo9bn", - "columnIds": [ - "9gNKhuq9UnDKyb9KuZ7cY" - ], - "x": 2162.713, - "y": 221.7067, - "direction": 1 - }, - "end": { - "tableId": "jpnFKaKfog9MCHpL2kUNA", - "columnIds": [ - "SHZNfw8iUBzUTew32Qrz6" - ], - "x": 1612.7488, - "y": 208.2122, - "direction": 2 - }, - "meta": { - "updateAt": 1745821416069, - "createAt": 1745821416069 - } - }, "xoiTCIGWOuuUaMQlCDnhd": { "id": "xoiTCIGWOuuUaMQlCDnhd", "identification": false, @@ -5494,7 +5483,7 @@ "columnIds": [ "nb5CGzskl3_LIRA0yyede" ], - "x": 737.9272, + "x": 633.9272, "y": 856.4514, "direction": 2 }, @@ -5550,8 +5539,8 @@ "columnIds": [ "_AcWUYKzNJd-V0fRHq8Cx" ], - "x": 646.5947, - "y": 167.96893333333333, + "x": 620.5947, + "y": 163.96893333333333, "direction": 2 }, "end": { @@ -5560,7 +5549,7 @@ "35XbdvgOzpNdasPnMcbkx" ], "x": 1145.6795, - "y": 148.016, + "y": 136.016, "direction": 1 }, "meta": { @@ -5578,8 +5567,8 @@ "columnIds": [ "_AcWUYKzNJd-V0fRHq8Cx" ], - "x": 646.5947, - "y": 282.6356, + "x": 620.5947, + "y": 270.6356, "direction": 2 }, "end": { @@ -5588,7 +5577,7 @@ "PyXYmokQzpzzT08WTmtsN" ], "x": 1149.287, - "y": 430.2737, + "y": 418.2737, "direction": 1 }, "meta": { @@ -5614,12 +5603,6 @@ "comment": 1745820616314 } ], - "Aj0_hRYAK-XVJSijPSu07": [ - "relationshipEntities", - 1745820616314, - 1745821049553, - {} - ], "Id0h8QbOdlhPj9P1zTm5o": [ "tableColumnEntities", 1745820637058, @@ -5762,7 +5745,7 @@ "e6eWKMFnpXI-rPJZ_9tBt": [ "tableColumnEntities", 1745821113010, - -1, + 1746409152348, { "name": 1745821113010, "dataType": 1745821113010, @@ -5773,12 +5756,6 @@ "options(autoIncrement)": 1745821113010 } ], - "MG6gqLi-aVImpunYixNMB": [ - "relationshipEntities", - -1, - 1745821259113, - {} - ], "O_MKuQKv7yP-k0dsyszkk": [ "tableColumnEntities", -1, @@ -5819,66 +5796,6 @@ "options(autoIncrement)": 1745821287276 } ], - "jpnFKaKfog9MCHpL2kUNA": [ - "tableEntities", - 1745821326010, - 1745914787300, - { - "name": 1745914748031, - "comment": 1745914738336 - } - ], - "CvM2-6iCwD-tglwbA0p2z": [ - "tableColumnEntities", - 1745821381012, - -1, - { - "name": 1745821381012, - "dataType": 1745821381012, - "default": 1745821381012, - "comment": 1745821381012, - "options(notNull)": 1745821381012, - "options(unique)": 1745821381012, - "options(autoIncrement)": 1745821381012, - "options(primaryKey)": 1745821382945 - } - ], - "DvgoXrAW5NmmXkGGuGg3V": [ - "tableColumnEntities", - 1745821399264, - -1, - { - "options(notNull)": 1745821399264, - "name": 1745821407263, - "dataType": 1745821399264, - "default": 1745821399264, - "comment": 1745821399264 - } - ], - "xRge-SlcORE83ke41txTG": [ - "relationshipEntities", - 1745821399264, - 1745914787300, - {} - ], - "SHZNfw8iUBzUTew32Qrz6": [ - "tableColumnEntities", - 1745821416068, - -1, - { - "options(notNull)": 1745821416068, - "name": 1745914756526, - "dataType": 1745821416068, - "default": 1745821416068, - "comment": 1745821416068 - } - ], - "6X-W5Q0SxPLd-sIRlwf5W": [ - "relationshipEntities", - 1745821416068, - 1745914787300, - {} - ], "UAJUB0FsrZBOtW3odCNDB": [ "tableColumnEntities", 1745821489010, @@ -5985,7 +5902,9 @@ -1, -1, { - "options(notNull)": 1745821688154 + "options(notNull)": 1745821688154, + "dataType": 1746408900556, + "default": 1746404118872 } ], "z-q_Ah0sghd0nR7VcCTLX": [ @@ -5993,7 +5912,9 @@ -1, -1, { - "options(notNull)": 1745821700049 + "options(notNull)": 1746404109591, + "dataType": 1746420283047, + "default": 1746404114348 } ], "Wef1cEik-NFTr_alGxLpa": [ @@ -6052,14 +5973,14 @@ ], "RJRgO2-42FxCW0ucjngu9": [ "tableColumnEntities", - 1745914717251, - -1, + 1746409433111, + 1746409420084, { - "name": 1745914717251, - "dataType": 1745914717251, - "default": 1745914717251, - "comment": 1745914717251, - "options(notNull)": 1745914717251, + "name": 1746409204492, + "dataType": 1746409204492, + "default": 1746421463530, + "comment": 1746409204492, + "options(notNull)": 1746409204492, "options(unique)": 1745914717251, "options(autoIncrement)": 1745914717251 } @@ -6070,20 +5991,6 @@ 1745914721306, {} ], - "Laxvib4gg6226lk97OLYI": [ - "tableColumnEntities", - 1745914768163, - -1, - { - "name": 1745914768163, - "dataType": 1745914768163, - "default": 1745914768163, - "comment": 1745914768163, - "options(notNull)": 1745914768163, - "options(unique)": 1745914768163, - "options(autoIncrement)": 1745914768163 - } - ], "35XbdvgOzpNdasPnMcbkx": [ "tableColumnEntities", 1745914803628, @@ -6091,7 +5998,7 @@ { "options(notNull)": 1745914803628, "name": 1745914818178, - "dataType": 1745914803628, + "dataType": 1746406061983, "default": 1745914803628, "comment": 1745914803628 } @@ -6185,7 +6092,7 @@ "S3K2h7O2zUHNoSb5rfn5c": [ "tableColumnEntities", 1745914874022, - -1, + 1746409583260, { "name": 1745914874022, "dataType": 1745914874022, @@ -6199,7 +6106,7 @@ "v6TBpKQ_tIXDcJth0Hf4s": [ "tableColumnEntities", 1745914874022, - -1, + 1746409201100, { "name": 1745914874022, "dataType": 1745914874022, @@ -6251,7 +6158,7 @@ { "options(notNull)": 1745914916195, "name": 1745914930050, - "dataType": 1745914916195, + "dataType": 1746406061983, "default": 1745914916195, "comment": 1745914916195 } @@ -6557,6 +6464,285 @@ "options(unique)": 1745916389383, "options(autoIncrement)": 1745916389383 } + ], + "NVO-aO4GEW9DHdEV8XQq6": [ + "tableColumnEntities", + 1746404353799, + 1746408831933, + { + "name": 1746404358524, + "dataType": 1746404371161 + } + ], + "_AcWUYKzNJd-V0fRHq8Cx": [ + "tableColumnEntities", + -1, + -1, + { + "dataType": 1746406061983 + } + ], + "sscrxOdwLlx94tx1j_MrH": [ + "tableColumnEntities", + -1, + -1, + { + "dataType": 1746406061983 + } + ], + "nPYun5WHoy8uroXUBiqh8": [ + "tableColumnEntities", + -1, + -1, + { + "dataType": 1746406061983 + } + ], + "Ksp65Qh_aOFmAb1ksx64Q": [ + "tableColumnEntities", + -1, + 1746408500533, + {} + ], + "iM3NfWTfO6qrXv94EUFgk": [ + "tableColumnEntities", + -1, + -1, + { + "dataType": 1746408944556 + } + ], + "jBxeJ8Sz7jRGrKBCkD1q1": [ + "tableColumnEntities", + -1, + -1, + { + "dataType": 1746408955452 + } + ], + "iDvGbVnpR-GTfqajd7P02": [ + "tableColumnEntities", + -1, + -1, + { + "dataType": 1746408968678 + } + ], + "5ZWglx6I92JkdajKWQyGq": [ + "tableColumnEntities", + -1, + -1, + { + "dataType": 1746420269272 + } + ], + "GSZc6SEGQpz6SnTW-mo2n": [ + "tableColumnEntities", + -1, + -1, + { + "dataType": 1746409029483 + } + ], + "WHpensFTMwtupqV5TbNMV": [ + "tableColumnEntities", + 1746409047864, + -1, + { + "name": 1746409047864, + "dataType": 1746409047864, + "default": 1746409047864, + "comment": 1746409047864, + "options(notNull)": 1746409047864, + "options(unique)": 1746409047864, + "options(autoIncrement)": 1746409047864 + } + ], + "gsa0XtQZQgrJ8ZXy8VQVg": [ + "tableEntities", + -1, + -1, + { + "name": 1746409070281 + } + ], + "KvMMNu-PKESt0_2K4AJcB": [ + "tableColumnEntities", + -1, + -1, + { + "name": 1746409083865 + } + ], + "kKI4hKELPs9Nh5UtQvSu7": [ + "tableColumnEntities", + -1, + -1, + { + "name": 1746409091429 + } + ], + "W5bxFTggHoO9_PPsfy2EB": [ + "tableColumnEntities", + -1, + -1, + { + "name": 1746409102873 + } + ], + "0HPmN1faJk-KhZXILO2zx": [ + "tableColumnEntities", + 1746409116718, + -1, + { + "name": 1746409116718, + "dataType": 1746409116718, + "default": 1746409116718, + "comment": 1746409116718, + "options(notNull)": 1746409116718, + "options(unique)": 1746409116718, + "options(autoIncrement)": 1746409116718 + } + ], + "VycsOgeM1SXkcq_5XYUMS": [ + "tableColumnEntities", + 1746409123564, + -1, + { + "name": 1746409123564, + "dataType": 1746409123564, + "default": 1746409123564, + "comment": 1746409123564, + "options(notNull)": 1746409123564, + "options(unique)": 1746409123564, + "options(autoIncrement)": 1746409123564 + } + ], + "PfyFAW02XGNLH3al90jv5": [ + "tableColumnEntities", + 1746409129705, + -1, + { + "name": 1746409129705, + "dataType": 1746409129705, + "default": 1746409129705, + "comment": 1746409129705, + "options(notNull)": 1746409129705, + "options(unique)": 1746409129705, + "options(autoIncrement)": 1746409129705 + } + ], + "bh-W1plz0vCW2rURDnfDR": [ + "tableColumnEntities", + 1746409135258, + -1, + { + "name": 1746409135258, + "dataType": 1746409135258, + "default": 1746409135258, + "comment": 1746409135258, + "options(notNull)": 1746409135258, + "options(unique)": 1746409135258, + "options(autoIncrement)": 1746409135258 + } + ], + "Djbw3B6xZWKAvwJDto9xl": [ + "tableColumnEntities", + -1, + 1746409142725, + {} + ], + "nDoaVrEhO8hLuHbgZV4il": [ + "tableColumnEntities", + 1746409147623, + -1, + { + "name": 1746409147623, + "dataType": 1746409147623, + "default": 1746409147623, + "comment": 1746409147623, + "options(notNull)": 1746409147623, + "options(unique)": 1746409147623, + "options(autoIncrement)": 1746409147623 + } + ], + "PHhRG4nKR6k_CQF9B8xS1": [ + "tableColumnEntities", + 1746409157660, + -1, + { + "name": 1746409157660, + "dataType": 1746409157660, + "default": 1746409157660, + "comment": 1746409157660, + "options(notNull)": 1746409157660, + "options(unique)": 1746409157660, + "options(autoIncrement)": 1746409157660 + } + ], + "xaUC3GLta1iHmo1YQ-qDo": [ + "tableColumnEntities", + -1, + 1746409161412, + {} + ], + "w9ZyCsgvhPpSDiq62Fc4J": [ + "tableColumnEntities", + 1746409165334, + -1, + { + "name": 1746409165334, + "dataType": 1746409165334, + "default": 1746409165334, + "comment": 1746409165334, + "options(notNull)": 1746409165334, + "options(unique)": 1746409165334, + "options(autoIncrement)": 1746409165334 + } + ], + "YuuqW6tFbr7O4iA-rdhqg": [ + "tableColumnEntities", + -1, + 1746409169996, + {} + ], + "hQM1tPHn6MrCa4pIL7t7w": [ + "tableColumnEntities", + -1, + -1, + { + "name": 1746409184363, + "dataType": 1746409184363, + "options(notNull)": 1746409184363, + "default": 1746421449082, + "comment": 1746409184363 + } + ], + "9CJ9f4Gdh5iKDZAMDjNAz": [ + "tableColumnEntities", + 1746409195692, + -1, + { + "name": 1746409195692, + "dataType": 1746409195692, + "default": 1746421440442, + "comment": 1746409195692, + "options(notNull)": 1746409195692, + "options(unique)": 1746409195692, + "options(autoIncrement)": 1746409195692 + } + ], + "6ZDZLrSpVuAeUGWvifvq7": [ + "tableColumnEntities", + -1, + 1746409580309, + {} + ], + "f4NQ8F-FyamLyf4YR0VY1": [ + "tableColumnEntities", + -1, + 1746409586940, + {} ] } } \ No newline at end of file diff --git a/app/Entities/Customer/AccountEntity.php b/app/Entities/Customer/AccountEntity.php new file mode 100644 index 0000000..aa478a9 --- /dev/null +++ b/app/Entities/Customer/AccountEntity.php @@ -0,0 +1,25 @@ +attributes['clientinfo_uid']; + } + public function getCoupon() + { + return $this->attributes['coupon_balance']; + } + public function getPoint() + { + return $this->attributes['point_balance']; + } +} diff --git a/app/Entities/Customer/ClientEntity.php b/app/Entities/Customer/ClientEntity.php new file mode 100644 index 0000000..49f2bff --- /dev/null +++ b/app/Entities/Customer/ClientEntity.php @@ -0,0 +1,30 @@ +attributes['role']; + } + + public function getAccount() + { + return $this->attributes['account_balance']; + } + public function getCoupon() + { + return $this->attributes['coupon_balance']; + } + public function getPoint() + { + return $this->attributes['point_balance']; + } +} diff --git a/app/Entities/Customer/CustomerEntity.php b/app/Entities/Customer/CustomerEntity.php new file mode 100644 index 0000000..bea2a44 --- /dev/null +++ b/app/Entities/Customer/CustomerEntity.php @@ -0,0 +1,13 @@ +request = $_request; + $this->request = $request; } final public function setViewDatas(array $viewDatas): void { diff --git a/app/Helpers/Customer/AccountHelper.php b/app/Helpers/Customer/AccountHelper.php new file mode 100644 index 0000000..d90a91a --- /dev/null +++ b/app/Helpers/Customer/AccountHelper.php @@ -0,0 +1,96 @@ + "form-control", "required" => "", ...$extras] : ["class" => "form-control", ...$extras]; + } + $value = $value ?: DEFAULTS['EMPTY']; + switch ($field) { + case 'id': + case Model::TITLE: + $form = form_input($field, $value, $extras); + break; + case 'passwd': + case 'confirmpassword': + $form = form_password($field, "", ["autocomplete" => $field, ...$extras]); + break; + case 'email': + $form = form_input($field, $value, ["placeholder" => "예)test@example.com", ...$extras]); + break; + case 'mobile': + $form = form_input($field, $value, ["placeholder" => "예)010-0010-0010", ...$extras]); + break; + case 'role': + if (in_array($viewDatas['action'], ['create_form', 'modify_form'])) { + $forms = []; + foreach ($viewDatas['field_options'][$field] as $key => $label) { + $values = is_array($value) ? $value : explode(DEFAULTS["DELIMITER_ROLE"], $value); + $forms[] = form_checkbox( + "{$field}[]", + $key, + in_array($key, $values) + ) . $label; + } + $form = implode(" ", $forms); + } else { + $form = form_dropdown( + $field, + [ + "" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택', + ] + $viewDatas['field_options'][$field], + $value, + $extras + ); + } + break; + default: + $form = parent::getFieldForm($field, $value, $viewDatas, $extras); + break; + } + return $form; + } // + public function getFieldView(string $field, array $viewDatas, array $extras = []): string + { + $value = $viewDatas['entity']->$field ?: DEFAULTS['EMPTY']; + switch ($field) { + case Model::TITLE: + $value = form_label( + $value, + 'view', + [ + "data-src" => current_url() . '/view/' . $viewDatas['entity']->getPK(), + "data-bs-toggle" => "modal", + "data-bs-target" => "#index_action_form", + "style" => "color: blue; cursor: pointer; font-weight:bold;", + ...$extras, + ] + ); + break; + case 'role': + $roles = []; + foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) { + $roles[] = $viewDatas['field_options'][$field][$key]; + } + $value = implode(" , ", $roles); + break; + default: + $value = parent::getFieldView($field, $viewDatas, $extras); + break; + } + return $value; + } // +} diff --git a/app/Helpers/Customer/ClientHelper.php b/app/Helpers/Customer/ClientHelper.php new file mode 100644 index 0000000..4b3ad62 --- /dev/null +++ b/app/Helpers/Customer/ClientHelper.php @@ -0,0 +1,92 @@ + "form-control", "required" => "", ...$extras] : ["class" => "form-control", ...$extras]; + } + $value = $value ?: DEFAULTS['EMPTY']; + switch ($field) { + case 'id': + case ClientModel::TITLE: + $form = form_input($field, $value, $extras); + break; + case 'email': + $form = form_input($field, $value, ["placeholder" => "예)test@example.com", ...$extras]); + break; + case 'phone': + $form = form_input($field, $value, ["placeholder" => "예)010-0010-0010", ...$extras]); + break; + case 'role': + if (in_array($viewDatas['action'], ['create_form', 'modify_form'])) { + $forms = []; + foreach ($viewDatas['field_options'][$field] as $key => $label) { + $values = is_array($value) ? $value : explode(DEFAULTS["DELIMITER_ROLE"], $value); + $forms[] = form_checkbox( + "{$field}[]", + $key, + in_array($key, $values) + ) . $label; + } + $form = implode(" ", $forms); + } else { + $form = form_dropdown( + $field, + [ + "" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택', + ] + $viewDatas['field_options'][$field], + $value, + $extras + ); + } + break; + default: + $form = parent::getFieldForm($field, $value, $viewDatas, $extras); + break; + } + return $form; + } // + public function getFieldView(string $field, array $viewDatas, array $extras = []): string + { + $value = $viewDatas['entity']->$field ?: DEFAULTS['EMPTY']; + switch ($field) { + case ClientModel::TITLE: + $value = form_label( + $value, + 'view', + [ + "data-src" => current_url() . '/view/' . $viewDatas['entity']->getPK(), + "data-bs-toggle" => "modal", + "data-bs-target" => "#index_action_form", + "style" => "color: blue; cursor: pointer; font-weight:bold;", + ...$extras, + ] + ); + break; + case 'role': + $roles = []; + foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) { + $roles[] = $viewDatas['field_options'][$field][$key]; + } + $value = implode(" , ", $roles); + break; + default: + $value = parent::getFieldView($field, $viewDatas, $extras); + break; + } + return $value; + } // +} diff --git a/app/Helpers/Customer/CustomerHelper.php b/app/Helpers/Customer/CustomerHelper.php new file mode 100644 index 0000000..91a6a4e --- /dev/null +++ b/app/Helpers/Customer/CustomerHelper.php @@ -0,0 +1,14 @@ + "고객정보", + 'label' => [ + 'id' => "계정", + 'passwd' => "암호", + ], +]; diff --git a/app/Language/en/Customer/Client.php b/app/Language/en/Customer/Client.php new file mode 100644 index 0000000..24fc24b --- /dev/null +++ b/app/Language/en/Customer/Client.php @@ -0,0 +1,22 @@ + "고객정보", + 'label' => [ + 'email' => "메일", + 'phone' => "연락처", + 'role' => "권한", + 'name' => "이름", + 'status' => "상태", + 'updated_at' => "수정일", + 'created_at' => "작성일", + ], + "ROLE" => [ + "user" => "일반회원", + "vip" => "VIP회원", + "reseller" => "리셀러", + ], + "STATUS" => [ + "use" => "사용", + "pause" => "사용정지", + ], +]; diff --git a/app/Language/en/MyLog.php b/app/Language/en/MyLog.php index 36e24eb..245e99c 100644 --- a/app/Language/en/MyLog.php +++ b/app/Language/en/MyLog.php @@ -14,6 +14,6 @@ return [ ], "STATUS" => [ "use" => "완료", - "unuse" => "실패", + "fail" => "실패", ], ]; diff --git a/app/Language/en/User.php b/app/Language/en/User.php index a9e8f3b..fec0c75 100644 --- a/app/Language/en/User.php +++ b/app/Language/en/User.php @@ -25,6 +25,6 @@ return [ ], "STATUS" => [ "use" => "사용", - "unuse" => "사용않함", + "pause" => "사용정지", ], ]; diff --git a/app/Models/CommonModel.php b/app/Models/CommonModel.php index dc03863..9f6b495 100644 --- a/app/Models/CommonModel.php +++ b/app/Models/CommonModel.php @@ -64,6 +64,19 @@ abstract class CommonModel extends Model { return constant("static::TITLE"); } + //Primary Key로 uuid를 사용시 해당 모델에 아래 변수 반드시 추가 필요 + // protected $useAutoIncrement = false; + // protected $beforeInsert = ['generateUUID']; + // allowedFields에는 PK넣으면 않됨, Column Type: CHAR(36) + // + final protected function generateUUID(): string + { + $data = random_bytes(16); + // UUID version 4 (random) + $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // version 0100 + $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // variant 10 + return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); + } final protected function getFieldRules(string $action, array $fields, $rules = []): array { foreach ($fields as $field) { @@ -87,7 +100,7 @@ abstract class CommonModel extends Model } break; case $this->getTitleField(): - $rule = "required|string"; + $rule = "required|trim|string"; break; case 'image': $rule = "is_image[{$field}]|mime_in[{$field},image/jpg,image/jpeg,image/gif,image/png,image/webp]|max_size[{$field},300]|max_dims[{$field},2048,768]"; @@ -136,7 +149,7 @@ abstract class CommonModel extends Model return $value; } - private function save_process($entity): mixed + private function save_process(mixed $entity): mixed { // 최종 변경사항이 없으면 if (!$entity->hasChanged()) { @@ -155,6 +168,7 @@ abstract class CommonModel extends Model } return $entity; } + public function create(array $formDatas, mixed $entity): mixed { // Field에 맞는 Validation Rule 재정의 @@ -164,7 +178,11 @@ abstract class CommonModel extends Model LogCollector::debug("{$field}:{$formDatas[$field]}"); $entity->$field = $this->convertEntityData($field, $formDatas); } - // dd($entity); + // primaryKey가 자동입력이 아니면 + if (!$this->useAutoIncrement) { + $pkField = $this->getPKField(); + $entity->$pkField = $this->generateUUID(); + } $entity = $this->save_process($entity); // primaryKey가 자동입력이면 if ($this->useAutoIncrement) { diff --git a/app/Models/Customer/AccountModel.php b/app/Models/Customer/AccountModel.php new file mode 100644 index 0000000..ec258b4 --- /dev/null +++ b/app/Models/Customer/AccountModel.php @@ -0,0 +1,57 @@ + field가 array 입니다.\n" . var_export($field, true)); + } + switch ($field) { + case "clientinfo_uid": + case "amount": + $rule = "required|number"; + break; + case "title": + case "alias": + $rule = "required|trim|string"; + break; + case "status": + $rule = "if_exist|in_list[in,out]"; + break; + default: + $rule = parent::getFieldRule($action, $field); + break; + } + return $rule; + } + + //List 검색용 + public function setList_WordFilter(string $word): void + { + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . '.alias', $word, 'both'); + } +} diff --git a/app/Models/Customer/ClientModel.php b/app/Models/Customer/ClientModel.php new file mode 100644 index 0000000..e384c19 --- /dev/null +++ b/app/Models/Customer/ClientModel.php @@ -0,0 +1,62 @@ + field가 array 입니다.\n" . var_export($field, true)); + } + switch ($field) { + case "name": + $rule = "required|trim|string"; + break; + case "email": + $rule = "if_exist|trim|valid_email"; + $rule .= in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->table}.{$field}]" : ""; + break; + case "role": + $rule = "required|trim|string"; + break; + case "account_balance": + case "coupon_balance": + case "point_balance": + $rule = "if_exist|trim|number"; + break; + default: + $rule = parent::getFieldRule($action, $field); + break; + } + return $rule; + } + //List 검색용 + public function setList_WordFilter(string $word): void + { + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . '.email', $word, 'both'); + } +} diff --git a/app/Models/Customer/CustomerModel.php b/app/Models/Customer/CustomerModel.php new file mode 100644 index 0000000..033c2d6 --- /dev/null +++ b/app/Models/Customer/CustomerModel.php @@ -0,0 +1,13 @@ +_session) { @@ -83,7 +98,7 @@ abstract class AuthService extends CommonService return '/'; // 기본 URL } - public function login(Entity $entity): Entity + public function login(UserEntity $entity): UserEntity { $this->getSession()->set(SESSION_NAMES['ISLOGIN'], true); $this->getSession()->set(SESSION_NAMES['AUTH'], ['uid' => $entity->getPK(), 'id' => $entity->getID(), 'name' => $entity->getTitle(), 'role' => $entity->role]); diff --git a/app/Services/Auth/GoogleService.php b/app/Services/Auth/GoogleService.php index dbbf153..c2342c9 100644 --- a/app/Services/Auth/GoogleService.php +++ b/app/Services/Auth/GoogleService.php @@ -2,8 +2,7 @@ namespace App\Services\Auth; -use App\Entities\UserEntity as Entity; -use App\Models\UserModel as Model; +use App\Entities\UserEntity; // use App\Libraries\MySocket\GoogleSocket\CURL; use CodeIgniter\Exceptions\PageNotFoundException; use CodeIgniter\HTTP\IncomingRequest; @@ -16,24 +15,11 @@ class GoogleService extends AuthService $this->_mySocket = $mySocket; parent::__construct($request); } - final public function getClassName(): string + public function getClassName(): string { - return "GoogleAuth"; + return parent::getClassName() . DIRECTORY_SEPARATOR . "Google"; } - final public function getClassPath(): string - { - return $this->getClassName(); - } - public function getModelClass(): string - { - return Model::class; - } - public function getEntityClass(): string - { - return Entity::class; - } - - public function checkUser(string $access_code): Entity + public function checkUser(string $access_code): UserEntity { try { // Google 서비스 설정 diff --git a/app/Services/Auth/LocalService.php b/app/Services/Auth/LocalService.php index 852dde1..f69feb9 100644 --- a/app/Services/Auth/LocalService.php +++ b/app/Services/Auth/LocalService.php @@ -2,8 +2,7 @@ namespace App\Services\Auth; -use App\Entities\UserEntity as Entity; -use App\Models\UserModel as Model; +use App\Entities\UserEntity; use CodeIgniter\HTTP\IncomingRequest; class LocalService extends AuthService @@ -14,28 +13,14 @@ class LocalService extends AuthService } final public function getClassName(): string { - return "LocalAuth"; + return parent::getClassName() . DIRECTORY_SEPARATOR . "Local"; } - final public function getClassPath(): string - { - return $this->getClassName(); - } - public function getModelClass(): string - { - return Model::class; - } - public function getEntityClass(): string - { - return Entity::class; - } - - public function checkUser(array $formDatas): Entity + public function checkUser(array $formDatas): UserEntity { $entity = $this->getEntity(['id' => $formDatas['id']]); if (is_null($entity) || !isset($entity->passwd)) { throw new \Exception("사용자ID: {$formDatas['id']}가 존재하지 않습니다."); } - if (!password_verify($formDatas['passwd'], $entity->passwd)) { // log_message("error", "암호: {$formDatas['passwd']}, {$entity->passwd}"); throw new \Exception("암호가 맞지 않습니다."); diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index a583f92..0e5846d 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -14,8 +14,10 @@ abstract class CommonService { $this->request = $_request; } - abstract public function getModelClass(): string; - abstract public function getEntityClass(): string; + + abstract public function getModelClass(): mixed; + abstract public function getEntityClass(): mixed; + abstract public function getClassName(): string; final public function __get($name) { if (!array_key_exists($name, $this->_serviceDatas)) { @@ -27,7 +29,10 @@ abstract class CommonService { $this->_serviceDatas[$name] = $value; } - + final public function getClassPath(): string + { + return $this->getClassName(); + } final public function getRequest(): IncomingRequest|null { return $this->request; @@ -35,9 +40,7 @@ abstract class CommonService final public function getModel(): mixed { if (!$this->_model) { - $modelClass = $this->getModelClass(); - $this->_model = new $modelClass(); - // $this->_model->setDebug(true); + $this->_model = $this->getModelClass(); } return $this->_model; } diff --git a/app/Services/Customer/AccountService.php b/app/Services/Customer/AccountService.php new file mode 100644 index 0000000..88413ae --- /dev/null +++ b/app/Services/Customer/AccountService.php @@ -0,0 +1,53 @@ +getModel()->orderBy($this->getModel()::TITLE, 'ASC'); + $options = parent::getFormFieldOption($field, $options); + break; + } + return $options; + } + public function create(array $formDatas, mixed $entity = null): AccountEntity + { + $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']); + return parent::create($formDatas, $entity ?? new AccountEntity()); + } + public function modify(mixed $entity, array $formDatas): AccountEntity + { + // die(var_export($formDatas, true)); + //Role을 지정이 있을경우에만 , toggle이나 batcjhjob에서는 없을수도 있으므로 + if (isset($formDatas['role'])) { + $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']); + } + // die(var_export($formDatas, true)); + return parent::modify($entity, $formDatas); + } +} diff --git a/app/Services/Customer/ClientService.php b/app/Services/Customer/ClientService.php new file mode 100644 index 0000000..8bd0d3b --- /dev/null +++ b/app/Services/Customer/ClientService.php @@ -0,0 +1,53 @@ +getModel()->orderBy($this->getModel()::TITLE, 'ASC'); + $options = parent::getFormFieldOption($field, $options); + break; + } + return $options; + } + public function create(array $formDatas, mixed $entity = null): ClientEntity + { + $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']); + return parent::create($formDatas, $entity ?? new ClientEntity()); + } + public function modify(mixed $entity, array $formDatas): ClientEntity + { + // die(var_export($formDatas, true)); + //Role을 지정이 있을경우에만 , toggle이나 batcjhjob에서는 없을수도 있으므로 + if (isset($formDatas['role'])) { + $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']); + } + // die(var_export($formDatas, true)); + return parent::modify($entity, $formDatas); + } +} diff --git a/app/Services/Customer/CustomerService.php b/app/Services/Customer/CustomerService.php new file mode 100644 index 0000000..8057980 --- /dev/null +++ b/app/Services/Customer/CustomerService.php @@ -0,0 +1,18 @@ +getClassName(); + return new MyLogModel(); } - public function getModelClass(): string + public function getEntityClass(): MyLogEntity { - return Model::class; - } - public function getEntityClass(): string - { - return Entity::class; + return new MyLogEntity(); } - public function save($service, string $method, AuthService $myauth, string $title): Entity + public function save($service, string $method, AuthService $myauth, string $title): MyLogEntity { $formDatas = [ 'user_uid' => $myauth->getUIDByAuthInfo(), @@ -41,6 +37,6 @@ class MyLogService extends CommonService 'content' => LogCollector::dump(), ]; LogCollector::clear(); - return $this->getModel()->create($formDatas, new Entity()); + return $this->getModel()->create($formDatas, new MyLogEntity()); } } diff --git a/app/Services/UserService.php b/app/Services/UserService.php index 3578ba8..92aaf65 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -2,8 +2,8 @@ namespace App\Services; -use App\Entities\UserEntity as Entity; -use App\Models\UserModel as Model; +use App\Entities\UserEntity; +use App\Models\UserModel; use CodeIgniter\HTTP\IncomingRequest; class UserService extends CommonService @@ -17,17 +17,13 @@ class UserService extends CommonService { return "User"; } - final public function getClassPath(): string + public function getModelClass(): UserModel { - return $this->getClassName(); + return new UserModel(); } - public function getModelClass(): string + public function getEntityClass(): UserEntity { - return Model::class; - } - public function getEntityClass(): string - { - return Entity::class; + return new UserEntity(); } public function getFormFieldOption(string $field, array $options = []): array { @@ -39,12 +35,12 @@ class UserService extends CommonService } return $options; } - public function create(array $formDatas, mixed $entity = null): Entity + public function create(array $formDatas, mixed $entity = null): UserEntity { $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"], $formDatas['role']); - return parent::create($formDatas, $entity ?? new Entity()); + return parent::create($formDatas, $entity ?? new UserEntity()); } - public function modify(mixed $entity, array $formDatas): Entity + public function modify(mixed $entity, array $formDatas): UserEntity { // die(var_export($formDatas, true)); //암호를 입력하지 않았을시는 변경하기 않게 하기위함 diff --git a/app/Views/admin/create_form.php b/app/Views/admin/create_form.php index 2abf127..9ee5b65 100644 --- a/app/Views/admin/create_form.php +++ b/app/Views/admin/create_form.php @@ -5,7 +5,6 @@
- @@ -13,17 +12,13 @@ getFieldForm($field, old($field), $viewDatas) ?>
- - - -
getFieldLabel($field, $viewDatas) ?>
- "btn btn-outline btn-primary")); ?> -
+
"btn btn-outline btn-primary")); ?>
+ has('error')): ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/index.php b/app/Views/admin/index.php index 3c11b21..7a3aac0 100644 --- a/app/Views/admin/index.php +++ b/app/Views/admin/index.php @@ -14,7 +14,6 @@ include("templates/{$viewDatas['layout']}/index_header"); ?>
-
include("templates/{$viewDatas['layout']}/index_content_top"); ?> 'batchjob_form', 'method' => "post"]) ?> @@ -49,7 +48,6 @@
include("templates/common/modal_fetch"); ?>
-
diff --git a/app/Views/admin/modify_form.php b/app/Views/admin/modify_form.php index 975846f..3db7b0a 100644 --- a/app/Views/admin/modify_form.php +++ b/app/Views/admin/modify_form.php @@ -5,7 +5,6 @@ 'action_form', ...$viewDatas['forms']['attributes']], $viewDatas['forms']['hiddens']) ?>
- @@ -13,17 +12,13 @@ getFieldForm($field, old($field) ?? $viewDatas['entity']->$field, $viewDatas) ?>
- - - -
getFieldLabel($field, $viewDatas) ?>
- "btn btn-outline btn-primary"]) ?> -
+
"btn btn-outline btn-primary"]) ?>
+ has('error')): ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/auth/login_form.php b/app/Views/auth/login_form.php index e1c63e0..c93b806 100644 --- a/app/Views/auth/login_form.php +++ b/app/Views/auth/login_form.php @@ -1,5 +1,4 @@ section('content') ?> -alert($error) ?>
@@ -8,18 +7,18 @@
- + +
- + +
- + + has('error')): ?>
\ No newline at end of file diff --git a/app/Views/layouts/admin.php b/app/Views/layouts/admin.php index 21dbb89..76e553f 100644 --- a/app/Views/layouts/admin.php +++ b/app/Views/layouts/admin.php @@ -23,7 +23,6 @@ - alert($error) ?> renderSection('content') ?> diff --git a/app/Views/templates/admin/index_footer.php b/app/Views/templates/admin/index_footer.php index ed1fe8a..ba38439 100644 --- a/app/Views/templates/admin/index_footer.php +++ b/app/Views/templates/admin/index_footer.php @@ -1,5 +1 @@ -has('message')): ?> -
- -
- \ No newline at end of file +alert($error) ?> \ No newline at end of file