dbmsv4 init...5

This commit is contained in:
최준흠 2026-03-02 13:38:04 +09:00
parent 346b77a4d7
commit e7db2d47d9
10 changed files with 23 additions and 16 deletions

View File

@ -42,7 +42,10 @@ class ClientEntity extends CustomerEntity
{
return $this->role;
}
public function getRoles(): array
{
return explode(DEFAULTS['DELIMITER_COMMA'], $this->getRole());
}
public function getAccountBalance(): int
{
return (int) ($this->account_balance ?? 0);

View File

@ -32,6 +32,10 @@ class UserEntity extends CommonEntity
{
return $this->role;
}
public function getRoles(): array
{
return explode(DEFAULTS['DELIMITER_COMMA'], $this->getRole());
}
public function getEmail(): string
{
return $this->email;

View File

@ -95,7 +95,7 @@ class BoardForm extends CommonForm
case 'worker_uid':
foreach ($this->getFormOption_process(service('userservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;

View File

@ -114,7 +114,7 @@ class ServiceForm extends CustomerForm
case 'serverinfo_uid':
foreach ($this->getFormOption_process(service('equipment_serverservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getCustomTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;

View File

@ -81,21 +81,21 @@ class CHASSISForm extends EquipmentForm
case "cpuinfo_uid":
foreach ($this->getFormOption_process(service('part_cpuservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;
case "raminfo_uid":
foreach ($this->getFormOption_process(service('part_ramservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;
case "diskinfo_uid":
foreach ($this->getFormOption_process(service('part_diskservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;

View File

@ -134,7 +134,7 @@ class ServerForm extends EquipmentForm
case 'serviceinfo_uid':
foreach ($this->getFormOption_process(service('customer_serviceservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;
@ -159,7 +159,7 @@ class ServerForm extends EquipmentForm
case 'switchinfo_uid':
foreach ($this->getFormOption_process(service('part_switchservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
// dd($options);
@ -167,7 +167,7 @@ class ServerForm extends EquipmentForm
case 'ip': //key=value이 같음주의
foreach ($this->getFormOption_process(service('part_ipservice'), 'ip', $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getTitle()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
//formDatas에 값이 있고, $tempOptions에 없다면 추가(VPN의 Customer IP 경우)
if (array_key_exists($field, $formDatas) && $formDatas[$field]) {

View File

@ -109,14 +109,14 @@ class ServerPartForm extends EquipmentForm
case 'serverinfo_uid':
foreach ($this->getFormOption_process(service('equipment_serverservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;
case 'serviceinfo_uid':
foreach ($this->getFormOption_process(service('customer_clientservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;

View File

@ -106,14 +106,14 @@ class IPForm extends PartForm
case 'lineinfo_uid':
foreach ($this->getFormOption_process(service('equipment_lineservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;
case 'old_clientinfo_uid':
foreach ($this->getFormOption_process(service('customer_clientservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
// dd($tempOptions);
$options['options'] = $tempOptions;

View File

@ -39,14 +39,14 @@ abstract class PartForm extends CommonForm
case 'serviceinfo_uid':
foreach ($this->getFormOption_process(service('customer_serviceservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;
case 'serverinfo_uid':
foreach ($this->getFormOption_process(service('equipment_serverservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;

View File

@ -110,7 +110,7 @@ class PaymentForm extends CommonForm
case 'serviceinfo_uid':
foreach ($this->getFormOption_process(service('customer_serviceservice'), $field, $formDatas) as $tempEntity) {
$tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle();
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())];
// $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())];
}
$options['options'] = $tempOptions;
break;