classDiagram
    class TripType {
        +int id
        +string name
        +string desc
        +string question
        +string icon
    }

    class TripDetails {
        +int id
        +string planned_starting_time
        +int max_people
        +string day
        +bool allow_guests
        +string notes
        +bool always_show
        +bool is_locked
        +int trip_type_id
    }

    class PlannedEvent {
        +int id
        +string name
        +int planned_amount_cox
        +int trip_details_id
        +string created_at
    }

    class Trip {
        +int id
        +int cox_id
        +int trip_details_id
        +int planned_event_id
        +string created_at
    }

    class UserTrip {
        +int user_id
        +string user_note
        +int trip_details_id
        +string created_at
    }

    class User {
      ...
    }


    TripType "1" -- "*" TripDetails
    TripDetails "1" -- "*" PlannedEvent
    Trip "*" -- "1" TripDetails
    Trip "*" -- "1" PlannedEvent
    UserTrip "*" -- "1" TripDetails
    Trip "*" -- "1" User : cox
    UserTrip "*" -- "1" User