// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'enums.dart';

// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************

class UserRoleAdapter extends TypeAdapter<UserRole> {
  @override
  final typeId = 33;

  @override
  UserRole read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return UserRole.customer;
      case 1:
        return UserRole.distributor;
      case 2:
        return UserRole.admin;
      case 3:
        return UserRole.staff;
      default:
        return UserRole.customer;
    }
  }

  @override
  void write(BinaryWriter writer, UserRole obj) {
    switch (obj) {
      case UserRole.customer:
        writer.writeByte(0);
      case UserRole.distributor:
        writer.writeByte(1);
      case UserRole.admin:
        writer.writeByte(2);
      case UserRole.staff:
        writer.writeByte(3);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is UserRoleAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class UserStatusAdapter extends TypeAdapter<UserStatus> {
  @override
  final typeId = 34;

  @override
  UserStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return UserStatus.active;
      case 1:
        return UserStatus.inactive;
      case 2:
        return UserStatus.suspended;
      case 3:
        return UserStatus.pending;
      default:
        return UserStatus.active;
    }
  }

  @override
  void write(BinaryWriter writer, UserStatus obj) {
    switch (obj) {
      case UserStatus.active:
        writer.writeByte(0);
      case UserStatus.inactive:
        writer.writeByte(1);
      case UserStatus.suspended:
        writer.writeByte(2);
      case UserStatus.pending:
        writer.writeByte(3);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is UserStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class LoyaltyTierAdapter extends TypeAdapter<LoyaltyTier> {
  @override
  final typeId = 35;

  @override
  LoyaltyTier read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return LoyaltyTier.bronze;
      case 1:
        return LoyaltyTier.silver;
      case 2:
        return LoyaltyTier.gold;
      case 3:
        return LoyaltyTier.platinum;
      case 4:
        return LoyaltyTier.diamond;
      case 5:
        return LoyaltyTier.titan;
      default:
        return LoyaltyTier.bronze;
    }
  }

  @override
  void write(BinaryWriter writer, LoyaltyTier obj) {
    switch (obj) {
      case LoyaltyTier.bronze:
        writer.writeByte(0);
      case LoyaltyTier.silver:
        writer.writeByte(1);
      case LoyaltyTier.gold:
        writer.writeByte(2);
      case LoyaltyTier.platinum:
        writer.writeByte(3);
      case LoyaltyTier.diamond:
        writer.writeByte(4);
      case LoyaltyTier.titan:
        writer.writeByte(5);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is LoyaltyTierAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class OrderStatusAdapter extends TypeAdapter<OrderStatus> {
  @override
  final typeId = 36;

  @override
  OrderStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return OrderStatus.draft;
      case 1:
        return OrderStatus.pending;
      case 2:
        return OrderStatus.confirmed;
      case 3:
        return OrderStatus.processing;
      case 4:
        return OrderStatus.shipped;
      case 5:
        return OrderStatus.delivered;
      case 6:
        return OrderStatus.completed;
      case 7:
        return OrderStatus.cancelled;
      case 8:
        return OrderStatus.refunded;
      default:
        return OrderStatus.draft;
    }
  }

  @override
  void write(BinaryWriter writer, OrderStatus obj) {
    switch (obj) {
      case OrderStatus.draft:
        writer.writeByte(0);
      case OrderStatus.pending:
        writer.writeByte(1);
      case OrderStatus.confirmed:
        writer.writeByte(2);
      case OrderStatus.processing:
        writer.writeByte(3);
      case OrderStatus.shipped:
        writer.writeByte(4);
      case OrderStatus.delivered:
        writer.writeByte(5);
      case OrderStatus.completed:
        writer.writeByte(6);
      case OrderStatus.cancelled:
        writer.writeByte(7);
      case OrderStatus.refunded:
        writer.writeByte(8);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is OrderStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class InvoiceTypeAdapter extends TypeAdapter<InvoiceType> {
  @override
  final typeId = 37;

  @override
  InvoiceType read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return InvoiceType.sales;
      case 1:
        return InvoiceType.proforma;
      case 2:
        return InvoiceType.creditNote;
      case 3:
        return InvoiceType.debitNote;
      default:
        return InvoiceType.sales;
    }
  }

  @override
  void write(BinaryWriter writer, InvoiceType obj) {
    switch (obj) {
      case InvoiceType.sales:
        writer.writeByte(0);
      case InvoiceType.proforma:
        writer.writeByte(1);
      case InvoiceType.creditNote:
        writer.writeByte(2);
      case InvoiceType.debitNote:
        writer.writeByte(3);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is InvoiceTypeAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class InvoiceStatusAdapter extends TypeAdapter<InvoiceStatus> {
  @override
  final typeId = 38;

  @override
  InvoiceStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return InvoiceStatus.draft;
      case 1:
        return InvoiceStatus.issued;
      case 2:
        return InvoiceStatus.partiallyPaid;
      case 3:
        return InvoiceStatus.paid;
      case 4:
        return InvoiceStatus.overdue;
      case 5:
        return InvoiceStatus.cancelled;
      case 6:
        return InvoiceStatus.refunded;
      default:
        return InvoiceStatus.draft;
    }
  }

  @override
  void write(BinaryWriter writer, InvoiceStatus obj) {
    switch (obj) {
      case InvoiceStatus.draft:
        writer.writeByte(0);
      case InvoiceStatus.issued:
        writer.writeByte(1);
      case InvoiceStatus.partiallyPaid:
        writer.writeByte(2);
      case InvoiceStatus.paid:
        writer.writeByte(3);
      case InvoiceStatus.overdue:
        writer.writeByte(4);
      case InvoiceStatus.cancelled:
        writer.writeByte(5);
      case InvoiceStatus.refunded:
        writer.writeByte(6);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is InvoiceStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class PaymentMethodAdapter extends TypeAdapter<PaymentMethod> {
  @override
  final typeId = 39;

  @override
  PaymentMethod read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return PaymentMethod.cash;
      case 1:
        return PaymentMethod.bankTransfer;
      case 2:
        return PaymentMethod.creditCard;
      case 3:
        return PaymentMethod.debitCard;
      case 4:
        return PaymentMethod.eWallet;
      case 5:
        return PaymentMethod.cheque;
      case 6:
        return PaymentMethod.creditTerm;
      default:
        return PaymentMethod.cash;
    }
  }

  @override
  void write(BinaryWriter writer, PaymentMethod obj) {
    switch (obj) {
      case PaymentMethod.cash:
        writer.writeByte(0);
      case PaymentMethod.bankTransfer:
        writer.writeByte(1);
      case PaymentMethod.creditCard:
        writer.writeByte(2);
      case PaymentMethod.debitCard:
        writer.writeByte(3);
      case PaymentMethod.eWallet:
        writer.writeByte(4);
      case PaymentMethod.cheque:
        writer.writeByte(5);
      case PaymentMethod.creditTerm:
        writer.writeByte(6);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is PaymentMethodAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class PaymentStatusAdapter extends TypeAdapter<PaymentStatus> {
  @override
  final typeId = 40;

  @override
  PaymentStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return PaymentStatus.pending;
      case 1:
        return PaymentStatus.processing;
      case 2:
        return PaymentStatus.completed;
      case 3:
        return PaymentStatus.failed;
      case 4:
        return PaymentStatus.refunded;
      case 5:
        return PaymentStatus.cancelled;
      default:
        return PaymentStatus.pending;
    }
  }

  @override
  void write(BinaryWriter writer, PaymentStatus obj) {
    switch (obj) {
      case PaymentStatus.pending:
        writer.writeByte(0);
      case PaymentStatus.processing:
        writer.writeByte(1);
      case PaymentStatus.completed:
        writer.writeByte(2);
      case PaymentStatus.failed:
        writer.writeByte(3);
      case PaymentStatus.refunded:
        writer.writeByte(4);
      case PaymentStatus.cancelled:
        writer.writeByte(5);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is PaymentStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class EntryTypeAdapter extends TypeAdapter<EntryType> {
  @override
  final typeId = 41;

  @override
  EntryType read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return EntryType.earn;
      case 1:
        return EntryType.redeem;
      case 2:
        return EntryType.adjustment;
      case 3:
        return EntryType.expiry;
      case 4:
        return EntryType.refund;
      default:
        return EntryType.earn;
    }
  }

  @override
  void write(BinaryWriter writer, EntryType obj) {
    switch (obj) {
      case EntryType.earn:
        writer.writeByte(0);
      case EntryType.redeem:
        writer.writeByte(1);
      case EntryType.adjustment:
        writer.writeByte(2);
      case EntryType.expiry:
        writer.writeByte(3);
      case EntryType.refund:
        writer.writeByte(4);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is EntryTypeAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class EntrySourceAdapter extends TypeAdapter<EntrySource> {
  @override
  final typeId = 42;

  @override
  EntrySource read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return EntrySource.purchase;
      case 1:
        return EntrySource.referral;
      case 2:
        return EntrySource.promotion;
      case 3:
        return EntrySource.bonus;
      case 4:
        return EntrySource.giftRedemption;
      case 5:
        return EntrySource.projectSubmission;
      case 6:
        return EntrySource.pointsRecord;
      case 7:
        return EntrySource.manualAdjustment;
      default:
        return EntrySource.purchase;
    }
  }

  @override
  void write(BinaryWriter writer, EntrySource obj) {
    switch (obj) {
      case EntrySource.purchase:
        writer.writeByte(0);
      case EntrySource.referral:
        writer.writeByte(1);
      case EntrySource.promotion:
        writer.writeByte(2);
      case EntrySource.bonus:
        writer.writeByte(3);
      case EntrySource.giftRedemption:
        writer.writeByte(4);
      case EntrySource.projectSubmission:
        writer.writeByte(5);
      case EntrySource.pointsRecord:
        writer.writeByte(6);
      case EntrySource.manualAdjustment:
        writer.writeByte(7);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is EntrySourceAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class ComplaintStatusAdapter extends TypeAdapter<ComplaintStatus> {
  @override
  final typeId = 43;

  @override
  ComplaintStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return ComplaintStatus.none;
      case 1:
        return ComplaintStatus.pending;
      case 2:
        return ComplaintStatus.investigating;
      case 3:
        return ComplaintStatus.resolved;
      case 4:
        return ComplaintStatus.rejected;
      default:
        return ComplaintStatus.none;
    }
  }

  @override
  void write(BinaryWriter writer, ComplaintStatus obj) {
    switch (obj) {
      case ComplaintStatus.none:
        writer.writeByte(0);
      case ComplaintStatus.pending:
        writer.writeByte(1);
      case ComplaintStatus.investigating:
        writer.writeByte(2);
      case ComplaintStatus.resolved:
        writer.writeByte(3);
      case ComplaintStatus.rejected:
        writer.writeByte(4);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is ComplaintStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class GiftCategoryAdapter extends TypeAdapter<GiftCategory> {
  @override
  final typeId = 44;

  @override
  GiftCategory read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return GiftCategory.voucher;
      case 1:
        return GiftCategory.product;
      case 2:
        return GiftCategory.service;
      case 3:
        return GiftCategory.discount;
      case 4:
        return GiftCategory.experience;
      default:
        return GiftCategory.voucher;
    }
  }

  @override
  void write(BinaryWriter writer, GiftCategory obj) {
    switch (obj) {
      case GiftCategory.voucher:
        writer.writeByte(0);
      case GiftCategory.product:
        writer.writeByte(1);
      case GiftCategory.service:
        writer.writeByte(2);
      case GiftCategory.discount:
        writer.writeByte(3);
      case GiftCategory.experience:
        writer.writeByte(4);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is GiftCategoryAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class GiftStatusAdapter extends TypeAdapter<GiftStatus> {
  @override
  final typeId = 45;

  @override
  GiftStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return GiftStatus.active;
      case 1:
        return GiftStatus.used;
      case 2:
        return GiftStatus.expired;
      case 3:
        return GiftStatus.cancelled;
      default:
        return GiftStatus.active;
    }
  }

  @override
  void write(BinaryWriter writer, GiftStatus obj) {
    switch (obj) {
      case GiftStatus.active:
        writer.writeByte(0);
      case GiftStatus.used:
        writer.writeByte(1);
      case GiftStatus.expired:
        writer.writeByte(2);
      case GiftStatus.cancelled:
        writer.writeByte(3);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is GiftStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class PointsStatusAdapter extends TypeAdapter<PointsStatus> {
  @override
  final typeId = 46;

  @override
  PointsStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return PointsStatus.pending;
      case 1:
        return PointsStatus.approved;
      case 2:
        return PointsStatus.rejected;
      default:
        return PointsStatus.pending;
    }
  }

  @override
  void write(BinaryWriter writer, PointsStatus obj) {
    switch (obj) {
      case PointsStatus.pending:
        writer.writeByte(0);
      case PointsStatus.approved:
        writer.writeByte(1);
      case PointsStatus.rejected:
        writer.writeByte(2);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is PointsStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class ProjectTypeAdapter extends TypeAdapter<ProjectType> {
  @override
  final typeId = 47;

  @override
  ProjectType read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return ProjectType.residential;
      case 1:
        return ProjectType.commercial;
      case 2:
        return ProjectType.industrial;
      case 3:
        return ProjectType.infrastructure;
      case 4:
        return ProjectType.renovation;
      case 5:
        return ProjectType.interior;
      case 6:
        return ProjectType.exterior;
      default:
        return ProjectType.residential;
    }
  }

  @override
  void write(BinaryWriter writer, ProjectType obj) {
    switch (obj) {
      case ProjectType.residential:
        writer.writeByte(0);
      case ProjectType.commercial:
        writer.writeByte(1);
      case ProjectType.industrial:
        writer.writeByte(2);
      case ProjectType.infrastructure:
        writer.writeByte(3);
      case ProjectType.renovation:
        writer.writeByte(4);
      case ProjectType.interior:
        writer.writeByte(5);
      case ProjectType.exterior:
        writer.writeByte(6);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is ProjectTypeAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class SubmissionStatusAdapter extends TypeAdapter<SubmissionStatus> {
  @override
  final typeId = 48;

  @override
  SubmissionStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return SubmissionStatus.pending;
      case 1:
        return SubmissionStatus.reviewing;
      case 2:
        return SubmissionStatus.approved;
      case 3:
        return SubmissionStatus.rejected;
      case 4:
        return SubmissionStatus.needsRevision;
      default:
        return SubmissionStatus.pending;
    }
  }

  @override
  void write(BinaryWriter writer, SubmissionStatus obj) {
    switch (obj) {
      case SubmissionStatus.pending:
        writer.writeByte(0);
      case SubmissionStatus.reviewing:
        writer.writeByte(1);
      case SubmissionStatus.approved:
        writer.writeByte(2);
      case SubmissionStatus.rejected:
        writer.writeByte(3);
      case SubmissionStatus.needsRevision:
        writer.writeByte(4);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is SubmissionStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class DesignStatusAdapter extends TypeAdapter<DesignStatus> {
  @override
  final typeId = 49;

  @override
  DesignStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return DesignStatus.pending;
      case 1:
        return DesignStatus.assigned;
      case 2:
        return DesignStatus.inProgress;
      case 3:
        return DesignStatus.reviewing;
      case 4:
        return DesignStatus.completed;
      case 5:
        return DesignStatus.cancelled;
      case 6:
        return DesignStatus.onHold;
      default:
        return DesignStatus.pending;
    }
  }

  @override
  void write(BinaryWriter writer, DesignStatus obj) {
    switch (obj) {
      case DesignStatus.pending:
        writer.writeByte(0);
      case DesignStatus.assigned:
        writer.writeByte(1);
      case DesignStatus.inProgress:
        writer.writeByte(2);
      case DesignStatus.reviewing:
        writer.writeByte(3);
      case DesignStatus.completed:
        writer.writeByte(4);
      case DesignStatus.cancelled:
        writer.writeByte(5);
      case DesignStatus.onHold:
        writer.writeByte(6);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is DesignStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class QuoteStatusAdapter extends TypeAdapter<QuoteStatus> {
  @override
  final typeId = 50;

  @override
  QuoteStatus read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return QuoteStatus.draft;
      case 1:
        return QuoteStatus.sent;
      case 2:
        return QuoteStatus.viewed;
      case 3:
        return QuoteStatus.accepted;
      case 4:
        return QuoteStatus.rejected;
      case 5:
        return QuoteStatus.expired;
      case 6:
        return QuoteStatus.converted;
      case 7:
        return QuoteStatus.cancelled;
      default:
        return QuoteStatus.draft;
    }
  }

  @override
  void write(BinaryWriter writer, QuoteStatus obj) {
    switch (obj) {
      case QuoteStatus.draft:
        writer.writeByte(0);
      case QuoteStatus.sent:
        writer.writeByte(1);
      case QuoteStatus.viewed:
        writer.writeByte(2);
      case QuoteStatus.accepted:
        writer.writeByte(3);
      case QuoteStatus.rejected:
        writer.writeByte(4);
      case QuoteStatus.expired:
        writer.writeByte(5);
      case QuoteStatus.converted:
        writer.writeByte(6);
      case QuoteStatus.cancelled:
        writer.writeByte(7);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is QuoteStatusAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class RoomTypeAdapter extends TypeAdapter<RoomType> {
  @override
  final typeId = 51;

  @override
  RoomType read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return RoomType.support;
      case 1:
        return RoomType.sales;
      case 2:
        return RoomType.orderInquiry;
      case 3:
        return RoomType.quoteDiscussion;
      case 4:
        return RoomType.general;
      default:
        return RoomType.support;
    }
  }

  @override
  void write(BinaryWriter writer, RoomType obj) {
    switch (obj) {
      case RoomType.support:
        writer.writeByte(0);
      case RoomType.sales:
        writer.writeByte(1);
      case RoomType.orderInquiry:
        writer.writeByte(2);
      case RoomType.quoteDiscussion:
        writer.writeByte(3);
      case RoomType.general:
        writer.writeByte(4);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is RoomTypeAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class ContentTypeAdapter extends TypeAdapter<ContentType> {
  @override
  final typeId = 52;

  @override
  ContentType read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return ContentType.text;
      case 1:
        return ContentType.image;
      case 2:
        return ContentType.file;
      case 3:
        return ContentType.video;
      case 4:
        return ContentType.audio;
      case 5:
        return ContentType.productReference;
      case 6:
        return ContentType.orderReference;
      case 7:
        return ContentType.quoteReference;
      default:
        return ContentType.text;
    }
  }

  @override
  void write(BinaryWriter writer, ContentType obj) {
    switch (obj) {
      case ContentType.text:
        writer.writeByte(0);
      case ContentType.image:
        writer.writeByte(1);
      case ContentType.file:
        writer.writeByte(2);
      case ContentType.video:
        writer.writeByte(3);
      case ContentType.audio:
        writer.writeByte(4);
      case ContentType.productReference:
        writer.writeByte(5);
      case ContentType.orderReference:
        writer.writeByte(6);
      case ContentType.quoteReference:
        writer.writeByte(7);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is ContentTypeAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}

class ReminderTypeAdapter extends TypeAdapter<ReminderType> {
  @override
  final typeId = 53;

  @override
  ReminderType read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return ReminderType.beforeDue;
      case 1:
        return ReminderType.dueDate;
      case 2:
        return ReminderType.overdue;
      case 3:
        return ReminderType.finalNotice;
      default:
        return ReminderType.beforeDue;
    }
  }

  @override
  void write(BinaryWriter writer, ReminderType obj) {
    switch (obj) {
      case ReminderType.beforeDue:
        writer.writeByte(0);
      case ReminderType.dueDate:
        writer.writeByte(1);
      case ReminderType.overdue:
        writer.writeByte(2);
      case ReminderType.finalNotice:
        writer.writeByte(3);
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is ReminderTypeAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}
