Table family_members {
  id uuid [pk, default: `gen_random_uuid()`]
  name text [not null]
  relationship text
  birth_date date
  notes text
  created_at timestamptz [not null, default: `now()`]
}

Table activities {
  id uuid [pk, default: `gen_random_uuid()`]
  family_member_id uuid [ref: > family_members.id]
  title text [not null]
  activity_type text
  day_of_week text
  start_time time
  end_time time
  start_date date
  end_date date
  location text
  notes text
  created_at timestamptz [not null, default: `now()`]

  indexes {
    day_of_week
    family_member_id
    (start_date, end_date)
  }
}

Table important_dates {
  id uuid [pk, default: `gen_random_uuid()`]
  family_member_id uuid [ref: > family_members.id]
  title text [not null]
  date_value date [not null]
  recurring_yearly boolean [not null, default: false]
  reminder_days_before int [not null, default: 7]
  notes text
  created_at timestamptz [not null, default: `now()`]

  indexes {
    date_value
  }
}
