| | 1 | | using DCL.UserProfiles; |
| | 2 | | using System; |
| | 3 | | using System.Collections.Generic; |
| | 4 | |
|
| | 5 | | [Serializable] |
| | 6 | | public class UserProfileModelDTO |
| | 7 | | { |
| | 8 | | public string userId; |
| | 9 | | public string ethAddress; |
| | 10 | | public string name; |
| | 11 | | public string email; |
| | 12 | | public string description; |
| | 13 | | public string baseUrl; |
| | 14 | | public UserProfileModel.ParcelsWithAccess[] parcelsWithAccess; |
| | 15 | | public ulong created_at; |
| | 16 | | public ulong updated_at; |
| | 17 | | public int version; |
| | 18 | | public AvatarModelDTO avatar; |
| 0 | 19 | | public UserProfileModel.Snapshots snapshots = new (); |
| | 20 | |
|
| 0 | 21 | | public bool hasConnectedWeb3 = true; |
| | 22 | |
|
| | 23 | | public int tutorialFlagsMask; |
| | 24 | | public List<string> blocked; |
| | 25 | | public List<string> muted; |
| | 26 | | public int tutorialStep; |
| | 27 | | public bool hasClaimedName = false; |
| | 28 | | public List<UserProfileModel.Link> links; |
| | 29 | |
|
| | 30 | | public string country; |
| | 31 | | public string employmentStatus; |
| | 32 | | public string gender; |
| | 33 | | public string pronouns; |
| | 34 | | public string relationshipStatus; |
| | 35 | | public string sexualOrientation; |
| | 36 | | public string language; |
| | 37 | | public string profession; |
| | 38 | | public long birthdate; |
| | 39 | | public string realName; |
| | 40 | | public string hobbies; |
| | 41 | |
|
| | 42 | | public UserProfileModel ToUserProfileModel() |
| | 43 | | { |
| 0 | 44 | | UserProfileModel userProfileModel = new UserProfileModel |
| | 45 | | { |
| | 46 | | userId = this.userId, |
| | 47 | | ethAddress = this.ethAddress, |
| | 48 | | name = this.name, |
| | 49 | | email = this.email, |
| | 50 | | description = this.description, |
| | 51 | | baseUrl = this.baseUrl, |
| | 52 | | parcelsWithAccess = this.parcelsWithAccess, |
| | 53 | | created_at = this.created_at, |
| | 54 | | updated_at = this.updated_at, |
| | 55 | | version = this.version, |
| | 56 | | avatar = this.avatar.ToAvatarModel(), |
| | 57 | | snapshots = this.snapshots, |
| | 58 | | hasConnectedWeb3 = this.hasConnectedWeb3, |
| | 59 | | tutorialFlagsMask = this.tutorialFlagsMask, |
| | 60 | | blocked = this.blocked, |
| | 61 | | muted = this.muted, |
| | 62 | | tutorialStep = this.tutorialStep, |
| | 63 | | hasClaimedName = this.hasClaimedName, |
| | 64 | | links = this.links, |
| | 65 | | AdditionalInfo = new AdditionalInfo |
| | 66 | | { |
| | 67 | | Country = this.country, |
| | 68 | | EmploymentStatus = this.employmentStatus, |
| | 69 | | Gender = this.gender, |
| | 70 | | Pronouns = this.pronouns, |
| | 71 | | RelationshipStatus = this.relationshipStatus, |
| | 72 | | SexualOrientation = this.sexualOrientation, |
| | 73 | | Language = this.language, |
| | 74 | | Profession = this.profession, |
| | 75 | | BirthDate = birthdate == 0 ? null : DateTimeOffset.FromUnixTimeSeconds(this.birthdate).DateTime, |
| | 76 | | RealName = this.realName, |
| | 77 | | Hobbies = this.hobbies, |
| | 78 | | }, |
| | 79 | | }; |
| | 80 | |
|
| 0 | 81 | | return userProfileModel; |
| | 82 | | } |
| | 83 | |
|
| | 84 | | } |