17 changed files with 172 additions and 33 deletions
-
6app/Controller/v3/CollectStoreController.php
-
8app/Controller/v3/HomeController.php
-
6app/Controller/v3/LocationController.php
-
4app/Controller/v3/SearchController.php
-
10app/Model/v3/StoreUsers.php
-
7app/Model/v3/UserCollection.php
-
37app/Request/v3/UserAndStoreRequest.php
-
36app/Request/v3/UserRequest.php
-
22app/Service/v3/Implementations/CollectStoreService.php
-
9app/Service/v3/Implementations/CouponRecService.php
-
8app/Service/v3/Implementations/CouponService.php
-
17app/Service/v3/Implementations/LocationService.php
-
15app/Service/v3/Implementations/StoreLoginService.php
-
6app/Service/v3/Interfaces/CouponRecServiceInterface.php
-
7app/Service/v3/Interfaces/CouponServiceInterface.php
-
4app/Service/v3/Interfaces/LocationServiceInterface.php
-
3config/config.php
@ -0,0 +1,10 @@ |
|||
<?php |
|||
|
|||
|
|||
namespace App\Model\v3; |
|||
use App\Model\Model; |
|||
|
|||
class StoreUsers extends Model |
|||
{ |
|||
protected $table = 'lanzu_store_users'; |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
|
|||
namespace App\Request\v3; |
|||
|
|||
use App\Request\BaseFormRequest; |
|||
|
|||
class UserAndStoreRequest extends BaseFormRequest |
|||
{ |
|||
|
|||
/** |
|||
* Get the validation rules that apply to the request. |
|||
*/ |
|||
public function rules(): array |
|||
{ |
|||
return [ |
|||
'user_id' => 'required|nonempty|integer', |
|||
'store_id' => 'required|nonempty|integer', |
|||
]; |
|||
} |
|||
|
|||
/** |
|||
* @return array |
|||
*/ |
|||
public function messages(): array |
|||
{ |
|||
return [ |
|||
'*.*' => ':attribute无效', |
|||
]; |
|||
} |
|||
|
|||
public function attributes(): array |
|||
{ |
|||
return parent::attributes(); |
|||
} |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
|
|||
namespace App\Request\v3; |
|||
|
|||
use App\Request\BaseFormRequest; |
|||
|
|||
class UserRequest extends BaseFormRequest |
|||
{ |
|||
|
|||
/** |
|||
* Get the validation rules that apply to the request. |
|||
*/ |
|||
public function rules(): array |
|||
{ |
|||
return [ |
|||
'user_id' => 'required|nonempty|integer', |
|||
]; |
|||
} |
|||
|
|||
/** |
|||
* @return array |
|||
*/ |
|||
public function messages(): array |
|||
{ |
|||
return [ |
|||
'*.*' => ':attribute无效', |
|||
]; |
|||
} |
|||
|
|||
public function attributes(): array |
|||
{ |
|||
return parent::attributes(); |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue