-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
FEAT: 프로필 등록 api 연결
- Loading branch information
Showing
11 changed files
with
330 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,48 @@ | ||
class UserProfile { | ||
String nickname; | ||
String birthDate; | ||
String gender; | ||
String profileIntro; | ||
String businessType; | ||
String job; | ||
String ageRange; | ||
String gender; | ||
String? profileIntro; | ||
bool isLearningAlarmAllowed; | ||
bool isCommunityAlarmAllowed; | ||
|
||
UserProfile({ | ||
required this.nickname, | ||
required this.birthDate, | ||
required this.gender, | ||
required this.profileIntro, | ||
required this.businessType, | ||
required this.job, | ||
required this.ageRange, | ||
required this.gender, | ||
this.profileIntro, | ||
this.isLearningAlarmAllowed = false, | ||
this.isCommunityAlarmAllowed = false, | ||
this.isLearningAlarmAllowed = true, // 기본값 | ||
this.isCommunityAlarmAllowed = true, // 기본값 | ||
}); | ||
|
||
// JSON 변환 | ||
factory UserProfile.fromJson(Map<String, dynamic> json) { | ||
return UserProfile( | ||
nickname: json['nickname'] ?? '', | ||
birthDate: json['birthDate'] ?? '', | ||
gender: json['gender'] ?? '', | ||
profileIntro: json['profileIntro'] ?? '', | ||
businessType: json['businessType'] ?? '', | ||
job: json['job'] ?? '', | ||
isLearningAlarmAllowed: json['isLearningAlarmAllowed'] ?? true, | ||
isCommunityAlarmAllowed: json['isCommunityAlarmAllowed'] ?? true, | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'nickname': nickname, | ||
'businessType': businessType, | ||
'job': job, | ||
'ageRange': ageRange, | ||
'gender': gender, | ||
'profileIntro': profileIntro, | ||
'isLearningAlarmAllowed': isLearningAlarmAllowed, | ||
'isCommunityAlarmAllowed': isCommunityAlarmAllowed, | ||
"nickname": nickname, | ||
"birthDate": birthDate, | ||
"gender": gender, | ||
"profileIntro": profileIntro, | ||
"businessType": businessType, | ||
"job": job, | ||
"isLearningAlarmAllowed": isLearningAlarmAllowed, | ||
"isCommunityAlarmAllowed": isCommunityAlarmAllowed, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.