diff --git a/frontend/models/tasks/text-classification.ts b/frontend/models/tasks/text-classification.ts new file mode 100644 index 00000000..50b8c651 --- /dev/null +++ b/frontend/models/tasks/text-classification.ts @@ -0,0 +1,22 @@ +export class TextClassificationItem { + constructor( + public id: number, + public label: number, + public user: number, + ) {} + + static valueOf( + { id, label, user }: + { id: number, label: number, user: number } + ): TextClassificationItem { + return new TextClassificationItem(id, label, user) + } + + toObject(): Object { + return { + id: this.id, + label: this.label, + user: this.user + } + } +}