/// 工作空间 Domain 实体
class Workspace {
  final int id;
  final String? name;
  final int? ownerId;
  final String? description;
  final String? logo;
  final int? grade;
  final int? cap;
  final String? currency;
  final int? status;
  final int? createdAt;
  final int? updatedAt;
  final int? deletedAt;
  final int? channelGroupId;

  const Workspace({
    required this.id,
    this.name,
    this.ownerId,
    this.description,
    this.logo,
    this.grade,
    this.cap,
    this.currency,
    this.status,
    this.createdAt,
    this.updatedAt,
    this.deletedAt,
    this.channelGroupId,
  });

  Workspace copyWith({
    int? id,
    String? name,
    int? ownerId,
    String? description,
    String? logo,
    int? grade,
    int? cap,
    String? currency,
    int? status,
    int? createdAt,
    int? updatedAt,
    int? deletedAt,
    int? channelGroupId,
  }) {
    return Workspace(
      id: id ?? this.id,
      name: name ?? this.name,
      ownerId: ownerId ?? this.ownerId,
      description: description ?? this.description,
      logo: logo ?? this.logo,
      grade: grade ?? this.grade,
      cap: cap ?? this.cap,
      currency: currency ?? this.currency,
      status: status ?? this.status,
      createdAt: createdAt ?? this.createdAt,
      updatedAt: updatedAt ?? this.updatedAt,
      deletedAt: deletedAt ?? this.deletedAt,
      channelGroupId: channelGroupId ?? this.channelGroupId,
    );
  }
}
