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.

21 lines
384 B

3 years ago
3 years ago
3 years ago
3 years ago
  1. import { Expose } from 'class-transformer'
  2. export class UserItem {
  3. id: number;
  4. username: string;
  5. @Expose({ name: 'is_superuser' })
  6. isSuperuser: boolean;
  7. @Expose({ name: 'is_staff' })
  8. isStaff: boolean;
  9. toObject(): Object {
  10. return {
  11. id: this.id,
  12. username: this.username,
  13. is_superuser: this.isSuperuser,
  14. is_staff: this.isStaff
  15. }
  16. }
  17. }