2024-07-22 02:05:27 +02:00
|
|
|
// thile file is responsible for managing task files within chats.
|
|
|
|
|
|
2024-07-22 02:16:58 +02:00
|
|
|
import FileModel, { FileContent } from "./fileModel";
|
2024-07-22 02:05:27 +02:00
|
|
|
|
2024-07-22 02:16:58 +02:00
|
|
|
import ChatModel from "../Chat/chatModel";
|
2024-07-22 11:20:43 +02:00
|
|
|
import { DATA_VERSION } from "../Utility/typeSafety";
|
2024-07-22 02:16:58 +02:00
|
|
|
|
|
|
|
|
export default class TaskModel {
|
|
|
|
|
chatModel: ChatModel;
|
|
|
|
|
fileModel: FileModel;
|
|
|
|
|
|
|
|
|
|
// init
|
|
|
|
|
constructor(chatModel: ChatModel, fileModel: FileModel) {
|
|
|
|
|
this.chatModel = chatModel;
|
|
|
|
|
this.fileModel = fileModel;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-22 02:05:27 +02:00
|
|
|
|
|
|
|
|
// types
|
|
|
|
|
export interface TaskFileContent extends FileContent {
|
2024-07-22 02:16:58 +02:00
|
|
|
type: "task";
|
|
|
|
|
|
|
|
|
|
board: string;
|
|
|
|
|
category?: string;
|
|
|
|
|
status?: string;
|
|
|
|
|
|
|
|
|
|
description?: string;
|
|
|
|
|
|
|
|
|
|
priority?: number;
|
|
|
|
|
date?: string;
|
|
|
|
|
time?: string;
|
|
|
|
|
}
|
2024-07-22 11:20:43 +02:00
|
|
|
|
|
|
|
|
export const TaskFileContentReference: TaskFileContent = {
|
|
|
|
|
dataVersion: DATA_VERSION,
|
|
|
|
|
|
|
|
|
|
id: "",
|
|
|
|
|
creationDate: "",
|
|
|
|
|
type: "task",
|
|
|
|
|
|
|
|
|
|
board: "",
|
|
|
|
|
};
|