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.

26 lines
511 B

  1. import { LinkTypeItem, LinkItem } from '~/domain/models/links/link'
  2. export class LinkTypeDTO {
  3. id: number
  4. text: string
  5. color: string
  6. constructor(item: LinkTypeItem) {
  7. this.id = item.id
  8. this.text = item.name
  9. this.color = item.color
  10. }
  11. }
  12. export class LinkDTO {
  13. id: number
  14. fromId: number
  15. toId: number
  16. labelId: number
  17. constructor(item: LinkItem) {
  18. this.id = item.id
  19. this.fromId = item.annotation_id_1
  20. this.toId = item.annotation_id_2
  21. this.labelId = item.type
  22. }
  23. }