Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class User {
- id: string
- country: string
- email: string
- name: string
- tags: string[]
- verified: boolean
- active: boolean
- locale: string
- openIds: any
- parentalControl: boolean
- parentalControlPinCode: string
- zipCode: string
- mobilePhone: string
- createdTimestamp: string
- static fromJson(json: any): User {
- let user = new User()
- user.id = json.userId
- user.country = json.country
- user.email = json.email
- user.name = json.name
- user.tags = json.tags
- user.verified = json.verified
- user.active = json.active
- user.locale = json.locale
- user.openIds = json.openIds
- user.parentalControl = json.parentalControl
- user.mobilePhone = json.mobilePhone
- user.zipCode = json.zipCode
- user.parentalControlPinCode = json.parentalControlPinCode
- user.createdTimestamp = json.createdTimestamp
- console.log(json)
- return user
- }
- toJson(): any {
- let json = {}
- json['userId'] = this.id
- json['name'] = this.name
- json['email'] = this.email
- json['country'] = this.country
- json['tags'] = this.tags
- json['verified'] = this.verified
- json['active'] = this.active
- json['locale'] = this.locale
- json['openIds'] = this.openIds
- json['parentalControl'] = this.parentalControl
- json['mobilePhone'] = this.mobilePhone
- json['zipCode'] = this.zipCode
- json['parentalControlPinCode'] = this.parentalControlPinCode
- json['createdTimestamp'] = this.createdTimestamp
- return json
- }
- }
Add Comment
Please, Sign In to add comment