From a01389d345b7e414c3849928a82835a0ca19bd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Fri, 4 Aug 2023 10:39:28 +0900 Subject: [PATCH] shoppingmallv2 init... --- app/Controllers/Admin/CategoryController.php | 4 ++-- app/Database/base.sql | 1 - app/Database/shoppingmall.sql | 1 - app/Entities/CategoryEntity.php | 4 ---- app/Helpers/Category_helper.php | 3 --- app/Language/ko/Category.php | 1 - app/Models/CategoryModel.php | 8 ++------ 7 files changed, 4 insertions(+), 18 deletions(-) diff --git a/app/Controllers/Admin/CategoryController.php b/app/Controllers/Admin/CategoryController.php index 6fe941e..858083d 100644 --- a/app/Controllers/Admin/CategoryController.php +++ b/app/Controllers/Admin/CategoryController.php @@ -21,14 +21,14 @@ class CategoryController extends AdminController public function getFields(string $action = ""): array { $fields = [ - 'name', "linkurl", "isaccess", "isread", "iswrite", "isreply", "isupload", "isdownload", + 'name', "isaccess", "isread", "iswrite", "isreply", "isupload", "isdownload", "status", "head", "tail", ]; switch ($action) { case "index": case "excel": return [ - 'name', "linkurl", "isaccess", "isread", "iswrite", "isreply", "isupload", "isdownload", + 'name', "isaccess", "isread", "iswrite", "isreply", "isupload", "isdownload", "status", "created_at" ]; break; diff --git a/app/Database/base.sql b/app/Database/base.sql index 972ccb3..a7ae08d 100644 --- a/app/Database/base.sql +++ b/app/Database/base.sql @@ -51,7 +51,6 @@ CREATE TABLE servermgr.tw_category ( grporder int(5) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group순서: 상위가없을시 1부터시작', grpdepth int(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group깊이: 상위가없을시 1부터시작 , 상위 grpdepth+1씩 추가필요', name varchar(255) NOT NULL COMMENT '범주명', - linkurl varchar(255) NULL COMMENT '연결URL', isaccess varchar(30) NOT NULL DEFAULT 'guest' COMMENT '접근권한', isread varchar(30) NOT NULL DEFAULT 'guest' COMMENT '읽기권한', iswrite varchar(30) NOT NULL DEFAULT 'guest' COMMENT '쓰기권한', diff --git a/app/Database/shoppingmall.sql b/app/Database/shoppingmall.sql index eeac1f6..9c0121a 100644 --- a/app/Database/shoppingmall.sql +++ b/app/Database/shoppingmall.sql @@ -19,7 +19,6 @@ CREATE TABLE shoppingmall.tw_category ( grporder int(5) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group순서: 상위가없을시 1부터시작', grpdepth int(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group깊이: 상위가없을시 1부터시작 , 상위 grpdepth+1씩 추가필요', name varchar(255) NOT NULL COMMENT '범주명', - linkurl varchar(255) NULL COMMENT '연결URL', isaccess varchar(30) NOT NULL DEFAULT 'guest' COMMENT '접근권한', isread varchar(30) NOT NULL DEFAULT 'guest' COMMENT '읽기권한', iswrite varchar(30) NOT NULL DEFAULT 'guest' COMMENT '쓰기권한', diff --git a/app/Entities/CategoryEntity.php b/app/Entities/CategoryEntity.php index 9dfcf16..4e90eb5 100644 --- a/app/Entities/CategoryEntity.php +++ b/app/Entities/CategoryEntity.php @@ -23,10 +23,6 @@ class CategoryEntity extends BaseHierarchyEntity } //추가기능 - public function getLinkURL() - { - return $this->attributes['linkurl']; - } public function getHead() { return $this->attributes['head']; diff --git a/app/Helpers/Category_helper.php b/app/Helpers/Category_helper.php index ca7b8b4..ddbc04b 100644 --- a/app/Helpers/Category_helper.php +++ b/app/Helpers/Category_helper.php @@ -56,9 +56,6 @@ function getFieldForm_CategoryHelper($field, $value, array $fieldFormOptions, ar case 'name': return form_input($field, $value, [...$attributes, "placeholder" => "예)", "style" => "width:60%; ::placeholder{ color:silver; opacity: 1; }"]); break; - case 'linkurl': - return form_input($field, $value, [...$attributes, "placeholder" => "예)/front/board", "style" => "width:100%; ::placeholder{ color:silver; opacity: 1; }"]); - break; default: return form_input($field, $value, [...$attributes]); break; diff --git a/app/Language/ko/Category.php b/app/Language/ko/Category.php index 7839300..548bc6e 100644 --- a/app/Language/ko/Category.php +++ b/app/Language/ko/Category.php @@ -9,7 +9,6 @@ return [ 'label' => [ 'uid' => "번호", 'name' => "범주제목", - 'linkurl' => "연결URL", 'isaccess' => "접속권한", 'isread' => "읽기권한", 'iswrite' => "쓰기권한", diff --git a/app/Models/CategoryModel.php b/app/Models/CategoryModel.php index 6ea18d0..ad37038 100644 --- a/app/Models/CategoryModel.php +++ b/app/Models/CategoryModel.php @@ -13,7 +13,7 @@ class CategoryModel extends BaseHierarchyModel parent::__construct('Category'); $this->allowedFields = [ ...$this->allowedFields, - 'name', "linkurl", "isaccess", "isread", "iswrite", "isreply", "isupload", "isdownload", + 'name', "isaccess", "isread", "iswrite", "isreply", "isupload", "isdownload", "head", "tail", "status" ]; $this->validationRules = [...$this->validationRules, ...$this->getFieldRules($this->allowedFields),]; @@ -33,10 +33,6 @@ class CategoryModel extends BaseHierarchyModel $rules[$field] = "required|trim|string"; $rules[$field] .= $action == "insert" ? "|is_unique[{$this->table}.{$field}]" : ""; break; - case "linkurl": - $rules[$field] = "if_exist|trim|string"; - $rules[$field] .= $action == "insert" ? "|is_unique[{$this->table}.{$field}]" : ""; - break; case "isaccess": case "isread": case "iswrite": @@ -119,7 +115,7 @@ class CategoryModel extends BaseHierarchyModel { parent::setIndexWordFilter($word); $this->orLike($this->getTitle(), $word, "both"); //befor , after , both - $this->orLike("linkurl", $word, "both"); //befor , after , both + $this->orLike($word, "both"); //befor , after , both $this->orLike("head", $word, "both"); //befor , after , both $this->orLike("tail", $word, "both"); //befor , after , both $this->orLike("isaccess", $word, "both"); //befor , after , both