PlanInvite constructor

const PlanInvite({
  1. required int id,
  2. @JsonKey(name: 'inviterid') required int inviterId,
  3. @JsonKey(name: 'planid') required int planId,
  4. @JsonKey(name: 'inviteeid') required int invitedUserId,
  5. required PlanInviteStatus status,
  6. @UnixTimestampConverter() required DateTime timestamp,
})

An invitation to a CalendarPlan.

Implementation

const factory PlanInvite({
  /// The ID of this invitation.
  required int id,

  /// The ID of the [User] who created this invite.
  @JsonKey(name: 'inviterid') required int inviterId,

  /// The ID of the [CalendarPlan] this invite is for.
  @JsonKey(name: 'planid') required int planId,

  /// The ID of the [User] who is invited.
  @JsonKey(name: 'inviteeid') required int invitedUserId,

  /// The status of this invite.
  required PlanInviteStatus status,

  /// The date and time this invite was created.
  @UnixTimestampConverter() required DateTime timestamp,
}) = _PlanInvite;