|
- <?php
-
- namespace App\Models\HtpmsCustomer\Mst;
-
- use App\Codes\Model\QRServiceUsage;
- use App\Models\ColumnName;
- use App\Models\HtpmsCustomer\HtpmsCustomerAppModel;
-
- /**
- * 店舗番号紐づけ
- */
- class ShopNoRelation extends HtpmsCustomerAppModel
- {
- const COL_NAME_SHOP_ID = ColumnName::SHOP_ID;
- const COL_NAME_PARKING_MANAGEMENT_CODE = ColumnName::PARKING_MANAGEMENT_CODE;
- const COL_NAME_SHOP_NO = ColumnName::SHOP_NO;
- const COL_NAME_QR_SERVICE_USEAGE = "qr_service_useage";
-
- protected $table = "tbl3_mst_shop_no_relations";
-
- protected $casts = [
- self::COL_NAME_QR_SERVICE_USEAGE => QRServiceUsage::class,
- ];
-
- public function getModelName(): string
- {
- return "店舗番号紐づけ";
- }
-
- public static function byKey(string $shopId, string $parkingManagementCode, QRServiceUsage $qrServiceUsage)
- {
- return static::whereShopId($shopId)
- ->whereParkingManagementCode($parkingManagementCode)
- ->whereQrServiceUseage($qrServiceUsage);
- }
- }
|