/// 캐릭터 특성 (Traits)
///
/// 이름, 종족, 직업, 레벨, 좌우명, 길드 정보를 포함
class Traits {
  const Traits({
    required this.name,
    required this.race,
    required this.klass,
    required this.level,
    required this.motto,
    required this.guild,
    this.raceId = '',
    this.classId = '',
  });

  final String name;

  /// 종족 표시 이름 (예: "Kernel Giant")
  final String race;

  /// 클래스 표시 이름 (예: "Bug Hunter")
  final String klass;

  final int level;
  final String motto;
  final String guild;

  /// 종족 ID (Phase 5, 예: "kernel_giant")
  final String raceId;

  /// 클래스 ID (Phase 5, 예: "bug_hunter")
  final String classId;

  factory Traits.empty() => const Traits(
    name: '',
    race: '',
    klass: '',
    level: 1,
    motto: '',
    guild: '',
    raceId: '',
    classId: '',
  );

  Traits copyWith({
    String? name,
    String? race,
    String? klass,
    int? level,
    String? motto,
    String? guild,
    String? raceId,
    String? classId,
  }) {
    return Traits(
      name: name ?? this.name,
      race: race ?? this.race,
      klass: klass ?? this.klass,
      level: level ?? this.level,
      motto: motto ?? this.motto,
      guild: guild ?? this.guild,
      raceId: raceId ?? this.raceId,
      classId: classId ?? this.classId,
    );
  }
}
