dbmsv2 init...1
This commit is contained in:
parent
8ae2cfd40e
commit
eded582751
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -19,10 +19,10 @@ class ServerEntity extends EquipmentEntity
|
||||
}
|
||||
public function getClientInfoUID(): int|null
|
||||
{
|
||||
return $this->attributes['clientinfo_uid'];
|
||||
return $this->attributes['clientinfo_uid'] ?? null;
|
||||
}
|
||||
public function getServiceInfoUID(): int|null
|
||||
{
|
||||
return $this->attributes['serviceinfo_uid'];
|
||||
return $this->attributes['serviceinfo_uid'] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ return [
|
||||
'label' => [
|
||||
'type' => "종류",
|
||||
'title' => "모델명",
|
||||
'price' => "금액",
|
||||
'price' => "기본가",
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "작성일",
|
||||
@ -14,6 +14,8 @@ return [
|
||||
"CPU" => "CPU",
|
||||
"RAM" => "메모리",
|
||||
"DISK" => "저장장치",
|
||||
"OS" => "운영체제",
|
||||
"DB" => "데이터베이스",
|
||||
"SOFTWARE" => "소프트웨어",
|
||||
],
|
||||
"STATUS" => [
|
||||
|
||||
@ -19,9 +19,9 @@ class PaymentModel extends CustomerModel
|
||||
"serviceinfo_uid",
|
||||
"title",
|
||||
"amount",
|
||||
"billing_method",
|
||||
"billing",
|
||||
"billing_at",
|
||||
"pay_method",
|
||||
"pay",
|
||||
"status"
|
||||
];
|
||||
public function __construct()
|
||||
@ -41,14 +41,14 @@ class PaymentModel extends CustomerModel
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
case "title":
|
||||
case "billing_method":
|
||||
case "billing":
|
||||
case "status":
|
||||
$rule = "required|trim|string";
|
||||
break;
|
||||
case "billing_at":
|
||||
$rule = "required|valid_date";
|
||||
break;
|
||||
case "pay_method":
|
||||
case "pay":
|
||||
$rule = "permit_empty|trim|string";
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -35,8 +35,9 @@ class ServerModel extends EquipmentModel
|
||||
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
switch ($field) {
|
||||
case "clientinfo_uid":
|
||||
case "serviceinfo_uid":
|
||||
$rule = "required|trim|string";
|
||||
$rule = "permit_empty|numeric";
|
||||
break;
|
||||
case "type":
|
||||
case "status":
|
||||
|
||||
@ -16,7 +16,8 @@ class ServerPartModel extends EquipmentModel
|
||||
"partinfo_uid",
|
||||
"serverinfo_uid",
|
||||
"serviceinfo_uid",
|
||||
"billing_method",
|
||||
"billing",
|
||||
"amount",
|
||||
"cnt",
|
||||
"extra",
|
||||
];
|
||||
@ -32,7 +33,8 @@ class ServerPartModel extends EquipmentModel
|
||||
switch ($field) {
|
||||
case "partinfo_uid":
|
||||
case "serverinfo_uid":
|
||||
case "billing_method":
|
||||
case "billing":
|
||||
case "amount":
|
||||
case "cnt":
|
||||
$rule = "required|numeric";
|
||||
break;
|
||||
|
||||
@ -30,15 +30,15 @@ class PaymentService extends CustomerService
|
||||
"serviceinfo_uid",
|
||||
"title",
|
||||
"amount",
|
||||
"billing_method",
|
||||
"billing",
|
||||
"billing_at",
|
||||
"pay_method",
|
||||
"pay",
|
||||
"status"
|
||||
],
|
||||
'filters' => [
|
||||
'clientinfo_uid',
|
||||
'billing_method',
|
||||
'pay_method',
|
||||
'billing',
|
||||
'pay',
|
||||
'status',
|
||||
'user_uid'
|
||||
],
|
||||
@ -49,23 +49,23 @@ class PaymentService extends CustomerService
|
||||
return [
|
||||
'fields' => [
|
||||
'clientinfo_uid',
|
||||
'billing_method',
|
||||
'billing',
|
||||
'title',
|
||||
'amount',
|
||||
'billing_at',
|
||||
'pay_method',
|
||||
'pay',
|
||||
'status',
|
||||
'countdown',
|
||||
'user_uid'
|
||||
],
|
||||
'filters' => [
|
||||
'clientinfo_uid',
|
||||
'billing_method',
|
||||
'pay_method',
|
||||
'billing',
|
||||
'pay',
|
||||
'status',
|
||||
'user_uid'
|
||||
],
|
||||
'batchjob_fields' => ['clientinfo_uid', 'billing_method', 'pay_method', 'status'],
|
||||
'batchjob_fields' => ['clientinfo_uid', 'billing', 'pay', 'status'],
|
||||
'batchjob_buttions' => [
|
||||
'invoice' => '청구서 발행',
|
||||
],
|
||||
|
||||
@ -13,8 +13,8 @@ class ServerService extends EquipmentService
|
||||
private ?IPService $_ipService = null;
|
||||
private ?CSService $_csService = null;
|
||||
private ?ServerPartModel $_serverPartModel = null;
|
||||
const BasePartLists = ['cpu', 'ram', 'disk', 'os'];
|
||||
const AddtionalPartLists = ['ram', 'disk', 'db', 'software', 'ip', 'cs'];
|
||||
const BaseParts = ['cpu', 'ram', 'disk', 'os'];
|
||||
const AddtionalParts = ['ram', 'disk', 'db', 'software', 'ip', 'cs'];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(new ServerModel());
|
||||
@ -176,12 +176,15 @@ class ServerService extends EquipmentService
|
||||
if ($entity->getServiceInfoUID()) { //서비스정보가 있다면
|
||||
$partFormDatas["serviceinfo_uid"] = $entity->getServiceInfoUID();
|
||||
}
|
||||
|
||||
dd($formDatas);
|
||||
$partFormDatas["billing_method"] = PAYMENT['BILLING']['METHOD_MONTH'];
|
||||
$partLinkFormDatas = [];
|
||||
foreach (self::BasePartLists as $field) {
|
||||
$partFormDatas["partinfo_uid"] = $formDatas["partinfo_{$field}_uid"];
|
||||
$partFormDatas["cnt"] = array_key_exists("partinfo_{$field}_cnt", $formDatas) ? $formDatas["partinfo_{$field}_cnt"] : 1;
|
||||
$partFormDatas["extra"] = array_key_exists("partinfo_{$field}_extra", $formDatas) ? $formDatas["partinfo_{$field}_extra"] : "";
|
||||
foreach (self::BaseParts as $basePart) {
|
||||
$field = "partinfo_{$basePart}_uid";
|
||||
$partFormDatas["partinfo_uid"] = $formDatas[$field];
|
||||
$partFormDatas["cnt"] = array_key_exists("{$field}_cnt", $formDatas) ? $formDatas["{$field}_cnt"] : 1;
|
||||
$partFormDatas["extra"] = array_key_exists("{$field}_extra", $formDatas) ? $formDatas["{$field}_extra"] : "";
|
||||
//part별로 link용 추가
|
||||
$partLinkFormDatas[] = $partFormDatas;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user