Database Structure

Families Table

  • id: Primary key

  • family_name: Name of the family group

  • family_code: Unique 8-character code for family identification

  • description: Optional family description

  • max_members: Maximum number of family members allowed

  • is_active: Whether the family is active

  • created_at: Family creation timestamp

Users Table

  • id: Primary key

  • family_id: Foreign key to families table

  • username: Username (unique within family)

  • email: Email address (unique within family)

  • password: Hashed password

  • first_name: User's first name

  • last_name: User's last name

  • role: User role (admin/member)

  • is_active: Whether the user account is active

  • created_at: Account creation timestamp

Wishlists Table

  • id: Primary key

  • user_id: Foreign key to users table

  • title: Wishlist title

  • description: Optional description

  • is_public: Whether the wishlist is visible to family members

  • created_at: Creation timestamp

Wishlist Items Table

  • id: Primary key

  • wishlist_id: Foreign key to wishlists table

  • item_name: Name of the item

  • item_link: Optional URL to the item

  • price: Optional price

  • priority: Priority level (low/medium/high)

  • notes: Optional additional notes

  • is_purchased: Boolean flag for purchased items

  • purchased_by: Foreign key to users table (who purchased it)

  • created_at: Creation timestamp

Family Invitations Table

  • id: Primary key

  • family_id: Foreign key to families table

  • email: Email address of invited person

  • invited_by: Foreign key to users table (who sent the invitation)

  • invitation_code: Unique invitation code

  • status: Invitation status (pending/accepted/expired)

  • expires_at: When the invitation expires

  • created_at: Invitation creation timestamp

Last updated