You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
471 B

  1. import { AnnotationModel } from './interface'
  2. export class TextClassificationItem implements AnnotationModel{
  3. constructor(
  4. public id: number,
  5. public label: number,
  6. public user: number,
  7. ) {}
  8. static valueOf(
  9. { id, label, user }:
  10. { id: number, label: number, user: number }
  11. ) {
  12. return new TextClassificationItem(id, label, user)
  13. }
  14. toObject() {
  15. return {
  16. id: this.id,
  17. label: this.label,
  18. user: this.user
  19. }
  20. }
  21. }