This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
2022-08-04 18:57:43 +00:00
|
|
|
import AbstractModel from './abstractModel'
|
|
|
|
import UserModel from '@/models/user'
|
2021-02-14 19:18:51 +00:00
|
|
|
|
2022-08-04 18:57:43 +00:00
|
|
|
import type {ISubscription} from '@/modelTypes/ISubscription'
|
|
|
|
import type {IUser} from '@/modelTypes/IUser'
|
2022-07-20 22:42:36 +00:00
|
|
|
|
2022-09-06 09:36:01 +00:00
|
|
|
export default class SubscriptionModel extends AbstractModel<ISubscription> implements ISubscription {
|
2022-08-14 10:15:45 +00:00
|
|
|
id = 0
|
|
|
|
entity = ''
|
|
|
|
entityId = 0
|
|
|
|
user: IUser = {}
|
2022-02-13 18:57:12 +00:00
|
|
|
|
2022-08-14 10:15:45 +00:00
|
|
|
created: Date = null
|
2022-02-13 18:57:12 +00:00
|
|
|
|
2022-08-14 10:15:45 +00:00
|
|
|
constructor(data : Partial<ISubscription>) {
|
|
|
|
super()
|
|
|
|
this.assignData(data)
|
2022-02-13 18:57:12 +00:00
|
|
|
|
2021-02-14 19:18:51 +00:00
|
|
|
this.created = new Date(this.created)
|
2022-02-13 18:57:12 +00:00
|
|
|
this.user = new UserModel(this.user)
|
2021-02-14 19:18:51 +00:00
|
|
|
}
|
|
|
|
}
|