Skip to content

Commit

Permalink
feat: MembershipService1 Count and List service methods
Browse files Browse the repository at this point in the history
  • Loading branch information
TyIsI committed Jan 20, 2025
1 parent 4fc5005 commit 9e1bc23
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
22 changes: 22 additions & 0 deletions app/contracts/IMembershipService1.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
use vhs\services\IContract;

interface IMembershipService1 extends IContract {
/**
* @permission administrator
*
* @param $filters
*
* @return mixed
*/
public function CountMemberships($filters);

/**
* @permission administrator
*
Expand Down Expand Up @@ -40,6 +49,19 @@ public function Get($membershipId);
*/
public function GetAll();

/**
* @permission administrator
*
* @param $page
* @param $size
* @param $columns
* @param $order
* @param $filters
*
* @return mixed
*/
public function ListMemberships($page, $size, $columns, $order, $filters);

/**
* @permission administrator
*/
Expand Down
26 changes: 26 additions & 0 deletions app/services/MembershipService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
use vhs\services\Service;

class MembershipService extends Service implements IMembershipService1 {
/**
* @permission administrator
*
* @param $filters
*
* @return mixed
*/
public function CountMemberships($filters) {
return Membership::count($filters);
}

/**
* @permission administrator
*
Expand Down Expand Up @@ -45,6 +56,21 @@ public function GetAll() {
return Membership::findAll();
}

/**
* @permission administrator
*
* @param $page
* @param $size
* @param $columns
* @param $order
* @param $filters
*
* @return mixed
*/
public function ListMemberships($page, $size, $columns, $order, $filters) {
return Membership::page($page, $size, $columns, $order, $filters);
}

/**
* @permission administrator
*/
Expand Down

0 comments on commit 9e1bc23

Please sign in to comment.