feat(api tokens): add basic api token overview
This commit is contained in:
20
src/models/apiTokenModel.ts
Normal file
20
src/models/apiTokenModel.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import AbstractModel from '@/models/abstractModel'
|
||||
import type {IApiToken} from '@/modelTypes/IApiToken'
|
||||
|
||||
export default class ApiTokenModel extends AbstractModel<IApiToken> {
|
||||
id = 0
|
||||
token = ''
|
||||
permissions = null
|
||||
expiresAt: Date = null
|
||||
created: Date = null
|
||||
|
||||
constructor(data: Partial<IApiToken>) {
|
||||
super()
|
||||
|
||||
this.assignData(data)
|
||||
|
||||
this.expiresAt = new Date(this.expiresAt)
|
||||
this.created = new Date(this.created)
|
||||
this.updated = new Date(this.updated)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user