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
583 B

  1. export class MemberItem {
  2. constructor(
  3. public id: number,
  4. public user: number,
  5. public role: number,
  6. public username: string,
  7. public rolename: string
  8. ) {}
  9. static valueOf(
  10. { id, user, role, username, rolename }:
  11. { id: number, user: number, role: number, username: string, rolename: string }
  12. ): MemberItem {
  13. return new MemberItem(id, user, role, username, rolename)
  14. }
  15. toObject(): Object {
  16. return {
  17. id: this.id,
  18. user: this.user,
  19. role: this.role,
  20. username: this.username,
  21. rolename: this.rolename
  22. }
  23. }
  24. }