feat(server): deprecated the subscription module.

This commit is contained in:
a.bouhuolia
2023-03-02 22:44:14 +02:00
parent 44fc26b156
commit 3b79ac66ae
37 changed files with 8 additions and 1501 deletions

View File

@@ -1,26 +0,0 @@
import SystemRepository from '@/system/repositories/SystemRepository';
import { PlanSubscription } from '@/system/models';
export default class SubscriptionRepository extends SystemRepository {
/**
* Gets the repository's model.
*/
get model() {
return PlanSubscription.bindKnex(this.knex);
}
/**
* Retrieve subscription from a given slug in specific tenant.
* @param {string} slug
* @param {number} tenantId
*/
getBySlugInTenant(slug: string, tenantId: number) {
const cacheKey = this.getCacheKey('getBySlugInTenant', slug, tenantId);
return this.cache.get(cacheKey, () => {
return PlanSubscription.query()
.findOne('slug', slug)
.where('tenant_id', tenantId);
});
}
}

View File

@@ -1,9 +1,4 @@
import SystemUserRepository from '@/system/repositories/SystemUserRepository';
import SubscriptionRepository from '@/system/repositories/SubscriptionRepository';
import TenantRepository from '@/system/repositories/TenantRepository';
export {
SystemUserRepository,
SubscriptionRepository,
TenantRepository,
};
export { SystemUserRepository, TenantRepository };