Database Structure
Families Table
id: Primary keyfamily_name: Name of the family groupfamily_code: Unique 8-character code for family identificationdescription: Optional family descriptionmax_members: Maximum number of family members allowedis_active: Whether the family is activecreated_at: Family creation timestamp
Users Table
id: Primary keyfamily_id: Foreign key to families tableusername: Username (unique within family)email: Email address (unique within family)password: Hashed passwordfirst_name: User's first namelast_name: User's last namerole: User role (admin/member)is_active: Whether the user account is activecreated_at: Account creation timestamp
Wishlists Table
id: Primary keyuser_id: Foreign key to users tabletitle: Wishlist titledescription: Optional descriptionis_public: Whether the wishlist is visible to family memberscreated_at: Creation timestamp
Wishlist Items Table
id: Primary keywishlist_id: Foreign key to wishlists tableitem_name: Name of the itemitem_link: Optional URL to the itemprice: Optional pricepriority: Priority level (low/medium/high)notes: Optional additional notesis_purchased: Boolean flag for purchased itemspurchased_by: Foreign key to users table (who purchased it)created_at: Creation timestamp
Family Invitations Table
id: Primary keyfamily_id: Foreign key to families tableemail: Email address of invited personinvited_by: Foreign key to users table (who sent the invitation)invitation_code: Unique invitation codestatus: Invitation status (pending/accepted/expired)expires_at: When the invitation expirescreated_at: Invitation creation timestamp
Last updated

