dbms_init...1

This commit is contained in:
choi.jh 2025-07-02 15:48:37 +09:00
parent 73e3d56aaa
commit a1ab8c65da
2 changed files with 0 additions and 39 deletions

View File

@ -62,11 +62,6 @@ abstract class CommonModel extends Model
{
return constant("static::TITLE");
}
final public function getAllowedFields(): array
{
return $this->allowedFields;
}
//Primary Key로 uuid를 사용시 해당 모델에 아래 변수 반드시 추가 필요
// protected $useAutoIncrement = false;
// protected $beforeInsert = ['generateUUID'];

View File

@ -1,34 +0,0 @@
<?php
namespace App\Traits;
use App\Entities\CommonEntity;
use App\Services\MyLogService;
trait MylogTrait
{
final public function add_MylogTrait(string $action, array $formDatas, CommonEntity $entity): void
{
switch ($action) {
case 'create':
foreach ($formDatas as $field => $value) {
MyLogService::info("{$field}:{$entity->$field}");
}
MyLogService::log("{$entity->getTitle()}를 생성하였습니다.");
break;
case 'modify':
foreach ($formDatas as $field => $value) {
MyLogService::log("{$field}:{$entity->$field}=>{$value}");
}
MyLogService::log("{$entity->getTitle()}를 수정하였습니다.");
break;
case 'delete':
foreach ($this->getModel()->getAllowedFields() as $field) {
MyLogService::log("{$field}:{$entity->$field}");
}
MyLogService::log("{$entity->getTitle()}를 삭제하였습니다.");
break;
}
}
}