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.

32 lines
684 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. import { Expose } from 'class-transformer'
  2. export class LabelItem {
  3. id: number;
  4. text: string;
  5. @Expose({ name: 'prefix_key' })
  6. prefixKey: string | null;
  7. @Expose({ name: 'suffixKey' })
  8. suffixKey: string | null;
  9. @Expose({ name: 'background_color' })
  10. backgroundColor: string;
  11. @Expose({ name: 'text_color' })
  12. textColor: string = '#ffffff';
  13. toObject() {
  14. return {
  15. id: this.id,
  16. text: this.text,
  17. prefix_key: this.prefixKey,
  18. suffix_key: this.suffixKey,
  19. background_color: this.backgroundColor,
  20. text_color: this.textColor
  21. }
  22. }
  23. }
  24. export class DocTypeItem extends LabelItem {}
  25. export class SpanTypeItem extends LabelItem {}