import 'package:freezed_annotation/freezed_annotation.dart'; part 'account.freezed.dart'; part 'account.g.dart'; @freezed abstract class SnAccount with _$SnAccount { const SnAccount._(); const factory SnAccount({ required int id, required DateTime createdAt, required DateTime updatedAt, required DateTime? deletedAt, required DateTime? confirmedAt, required List? contacts, @Default("") String avatar, @Default("") String banner, required String name, required String nick, @Default({}) Map permNodes, required String language, required SnAccountProfile? profile, @Default([]) List badges, required DateTime? suspendedAt, required int? affiliatedId, required int? affiliatedTo, required int? automatedBy, required int? automatedId, }) = _SnAccount; factory SnAccount.fromJson(Map json) => _$SnAccountFromJson(json); } @freezed abstract class SnAccountContact with _$SnAccountContact { const factory SnAccountContact({ required int accountId, required String content, required DateTime createdAt, required DateTime? deletedAt, required int id, required bool isPrimary, required bool isPublic, required int type, required DateTime updatedAt, required DateTime? verifiedAt, }) = _SnAccountContact; factory SnAccountContact.fromJson(Map json) => _$SnAccountContactFromJson(json); } @freezed abstract class SnAccountProfile with _$SnAccountProfile { const factory SnAccountProfile({ required int id, required DateTime createdAt, required DateTime updatedAt, required DateTime? deletedAt, required String firstName, required String lastName, required String description, required String timeZone, required String location, required String pronouns, required String gender, @Default({}) Map links, required int experience, required DateTime? lastSeenAt, required DateTime? birthday, required int accountId, }) = _SnAccountProfile; factory SnAccountProfile.fromJson(Map json) => _$SnAccountProfileFromJson(json); } @freezed abstract class SnRelationship with _$SnRelationship { const factory SnRelationship({ required int id, required DateTime createdAt, required DateTime updatedAt, required DateTime? deletedAt, required int accountId, required int relatedId, required SnAccount? account, required SnAccount? related, required int status, @Default({}) Map permNodes, }) = _SnRelationship; factory SnRelationship.fromJson(Map json) => _$SnRelationshipFromJson(json); } @freezed abstract class SnAccountBadge with _$SnAccountBadge { const factory SnAccountBadge({ required int id, required DateTime createdAt, required DateTime updatedAt, required dynamic deletedAt, required String type, required int accountId, @Default(false) bool isActive, @Default({}) Map metadata, }) = _SnAccountBadge; factory SnAccountBadge.fromJson(Map json) => _$SnAccountBadgeFromJson(json); } @freezed abstract class SnAccountStatusInfo with _$SnAccountStatusInfo { const factory SnAccountStatusInfo({ required bool isDisturbable, required bool isOnline, required DateTime? lastSeenAt, required SnAccountStatus? status, }) = _SnAccountStatusInfo; factory SnAccountStatusInfo.fromJson(Map json) => _$SnAccountStatusInfoFromJson(json); } @freezed abstract class SnAccountStatus with _$SnAccountStatus { const factory SnAccountStatus({ required int id, required DateTime createdAt, required DateTime updatedAt, required DateTime? deletedAt, required String type, required String label, required int attitude, required bool isNoDisturb, required bool isInvisible, required DateTime? clearAt, required int accountId, }) = _SnAccountStatus; factory SnAccountStatus.fromJson(Map json) => _$SnAccountStatusFromJson(json); } @freezed abstract class SnAbuseReport with _$SnAbuseReport { const factory SnAbuseReport({ required int id, required DateTime createdAt, required DateTime updatedAt, required DateTime? deletedAt, required String resource, required String reason, required String status, required int accountId, }) = _SnAbuseReport; factory SnAbuseReport.fromJson(Map json) => _$SnAbuseReportFromJson(json); } @freezed abstract class SnActionEvent with _$SnActionEvent { const factory SnActionEvent({ required int id, required DateTime createdAt, required DateTime updatedAt, required DateTime? deletedAt, required String type, required Map? metadata, required String? location, required double? coordinateX, required double? coordinateY, required String ipAddress, required String userAgent, required SnAccount account, required int accountId, }) = _SnActionEvent; factory SnActionEvent.fromJson(Map json) => _$SnActionEventFromJson(json); } @freezed abstract class SnProgram with _$SnProgram { const factory SnProgram({ required int id, required DateTime createdAt, required DateTime updatedAt, required DateTime? deletedAt, required String name, required String description, required String alias, required int expRequirement, required Map price, required Map badge, required Map group, required Map appearance, }) = _SnProgram; factory SnProgram.fromJson(Map json) => _$SnProgramFromJson(json); } @freezed abstract class SnProgramMember with _$SnProgramMember { const factory SnProgramMember({ required int id, required DateTime createdAt, required DateTime updatedAt, required DateTime? deletedAt, required DateTime lastPaid, required SnAccount account, required int accountId, required SnProgram program, required int programId, }) = _SnProgramMember; factory SnProgramMember.fromJson(Map json) => _$SnProgramMemberFromJson(json); }