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.
frontend/src/models/taskComment.ts

32 lines
573 B
TypeScript

import AbstractModel from './abstractModel'
import UserModel from './user'
import type TaskModel from './task'
export default class TaskCommentModel extends AbstractModel {
id: number
taskId: TaskModel['id']
comment: string
author: UserModel
created: Date
updated: Date
constructor(data) {
super(data)
this.author = new UserModel(this.author)
this.created = new Date(this.created)
this.updated = new Date(this.updated)
}
defaults() {
return {
id: 0,
taskId: 0,
comment: '',
author: UserModel,
created: null,
updated: null,
}
}
}