/// 멤버 모델
library;

class Member {
  final int id;
  final String name;
  final String? imageUrl;
  final String? birthDate;
  final String? position;
  final String? instagram;
  final bool isFormer;

  Member({
    required this.id,
    required this.name,
    this.imageUrl,
    this.birthDate,
    this.position,
    this.instagram,
    this.isFormer = false,
  });

  factory Member.fromJson(Map<String, dynamic> json) {
    return Member(
      id: json['id'] as int,
      name: json['name'] as String,
      imageUrl: json['image_url'] as String?,
      birthDate: json['birth_date'] as String?,
      position: json['position'] as String?,
      instagram: json['instagram'] as String?,
      isFormer: json['is_former'] == 1 || json['is_former'] == true,
    );
  }
}
