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.
2023-09-01 09:15:48 +00:00
|
|
|
import AbstractModel from '@/models/abstractModel'
|
|
|
|
import type {IApiToken} from '@/modelTypes/IApiToken'
|
|
|
|
|
|
|
|
export default class ApiTokenModel extends AbstractModel<IApiToken> {
|
|
|
|
id = 0
|
2023-09-01 10:56:23 +00:00
|
|
|
title = ''
|
2023-09-01 09:15:48 +00:00
|
|
|
token = ''
|
|
|
|
permissions = null
|
|
|
|
expiresAt: Date = null
|
|
|
|
created: Date = null
|
|
|
|
|
2023-09-01 10:47:32 +00:00
|
|
|
constructor(data: Partial<IApiToken> = {}) {
|
2023-09-01 09:15:48 +00:00
|
|
|
super()
|
|
|
|
|
|
|
|
this.assignData(data)
|
|
|
|
|
|
|
|
this.expiresAt = new Date(this.expiresAt)
|
|
|
|
this.created = new Date(this.created)
|
|
|
|
this.updated = new Date(this.updated)
|
|
|
|
}
|
|
|
|
}
|