/**
 * One member of a household, as embedded in {@link HouseView}. Deliberately
 * a small subset of `SafeUserProfile` — just enough for the household
 * settings page's member list (name + who's the admin), not the member's
 * own email/diet/etc.
 */
export interface HouseMemberView {
  id: number;
  firstName: string;
  lastName: string;
}

/**
 * A household, as returned by `GET /house/current` / `PATCH /house/current`
 * / `POST /house` / `POST /house/join`. Unlike `DietView`/`AllergyView`
 * this isn't reference data — it's the current user's own household.
 */
export interface HouseView {
  id: number;
  name: string;
  /** FK to the member who administers this household (created it, or inherited adminship — see `house.service.ts`'s `leaveCurrentHouse`). */
  adminId: number;
  /** Shareable code another user enters via `POST /house/join` to become a member. */
  inviteCode: string;
  /** Every member of this household, including the caller. */
  members: HouseMemberView[];
}
