2021-02-14 19:18:51 +00:00
|
|
|
import AbstractService from '@/services/abstractService'
|
2022-09-06 09:36:01 +00:00
|
|
|
import SubscriptionModel from '@/models/subscription'
|
|
|
|
import type {ISubscription} from '@/modelTypes/ISubscription'
|
2021-02-14 19:18:51 +00:00
|
|
|
|
2023-03-22 15:33:22 +00:00
|
|
|
const paths = {
|
|
|
|
create: '/subscriptions/{entity}/{entityId}',
|
|
|
|
delete: '/subscriptions/{entity}/{entityId}',
|
|
|
|
} as const
|
|
|
|
|
|
|
|
export default class SubscriptionService extends AbstractService<ISubscription, typeof paths> {
|
2021-02-14 19:18:51 +00:00
|
|
|
constructor() {
|
2023-03-22 15:33:22 +00:00
|
|
|
super(paths)
|
2021-02-14 19:18:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
modelFactory(data) {
|
|
|
|
return new SubscriptionModel(data)
|
|
|
|
}
|
|
|
|
}
|