mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 11:50:31 +00:00
18 lines
424 B
TypeScript
18 lines
424 B
TypeScript
import { Service } from 'typedi';
|
|
import { PlanSubscription } from '@/system/models';
|
|
|
|
@Service()
|
|
export default class SubscriptionService {
|
|
/**
|
|
* Retrieve all subscription of the given tenant.
|
|
* @param {number} tenantId
|
|
*/
|
|
public async getSubscriptions(tenantId: number) {
|
|
const subscriptions = await PlanSubscription.query().where(
|
|
'tenant_id',
|
|
tenantId
|
|
);
|
|
return subscriptions;
|
|
}
|
|
}
|