회원목록

This commit is contained in:
2025-08-01 16:45:26 +09:00
parent a996def67a
commit ed8c7eacba
191 changed files with 17491 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
class User {
final String id;
final String email;
final String name;
final String role;
final String? profileImage;
final String? clubId;
final String? clubRole;
User({
required this.id,
required this.email,
required this.name,
required this.role,
this.profileImage,
this.clubId,
this.clubRole,
});
// JSON 데이터로부터 User 객체 생성
factory User.fromJson(Map<String, dynamic> json) {
return User(
id: json['id'] != null ? json['id'].toString() : '',
email: json['email'] ?? '',
name: json['name'] ?? '',
role: json['role'] ?? 'user',
profileImage: json['profileImage'],
clubId: json['clubId']?.toString(),
clubRole: json['clubRole'],
);
}
// User 객체를 JSON으로 변환
Map<String, dynamic> toJson() {
return {
'id': id,
'email': email,
'name': name,
'role': role,
'profileImage': profileImage,
'clubId': clubId,
'clubRole': clubRole,
};
}
}