Data model

"EYEWEAR_CAMPAIGN" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "campaign_background_color": VARCHAR(255) 
  "campaign_long_text_en": TEXT 
  "campaign_long_text_fr": TEXT 
  "campaign_text_en": TEXT 
  "campaign_text_fr": TEXT 
  "campaign_title_en": VARCHAR(255) 
  "campaign_title_fr": VARCHAR(255) 
  "campaign_visual_uri_en": TEXT 
  "campaign_visual_uri_fr": TEXT 
  "catalog_background_color": VARCHAR(255) 
  "catalog_long_text_en": TEXT 
  "catalog_long_text_fr": TEXT 
  "catalog_text_en": TEXT 
  "catalog_text_fr": TEXT 
  "catalog_title_en": VARCHAR(255) 
  "catalog_title_fr": VARCHAR(255) 
  "catalog_visual_uri_en": TEXT 
  "catalog_visual_uri_fr": TEXT 
  "disabled": BOOLEAN 
  "icon_uri_en": TEXT 
  "icon_uri_fr": TEXT 
  "name": VARCHAR(255) 
  "position": FLOAT 
  "product_background_color": VARCHAR(255) 
  "product_long_text_en": TEXT 
  "product_long_text_fr": TEXT 
  "product_text_en": TEXT 
  "product_text_fr": TEXT 
  "product_title_en": VARCHAR(255) 
  "product_title_fr": VARCHAR(255) 
  "product_visual_uri_en": TEXT 
  "product_visual_uri_fr": TEXT 
  "tag_color": VARCHAR(255) 
  "tag_visual": VARCHAR(255) 
  "title_en": VARCHAR(255) 
  "title_fr": VARCHAR(255) 
  "trait": VARCHAR(255) 
}
"EYEWEAR_CONTACT_LENS_PRODUCT_NEW" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "description": TEXT 
  "description_short": TEXT 
  "extra_data": JSONB 
  "lens_types": ARRAY 
  "manufacturer": VARCHAR(255) 
  "max_quantity_to_order": INTEGER 
  "name": VARCHAR(255) 
  "nb_items_per_box": INTEGER 
  "nb_variations": INTEGER 
  "original_image_url": VARCHAR(255) 
  "price": INTEGER 
  "ranges": JSONB 
  "sku": VARCHAR(255) 
  "solution_type": VARCHAR(255) 
  "status": VARCHAR(255) 
  "subtitle": VARCHAR(255) 
  "supplier_price": INTEGER 
  "title": VARCHAR(255) 
  "transporter_code": VARCHAR(4) 
  "type": VARCHAR(255) 
}
"EYEWEAR_CONTACT_LENS_PRODUCT_VARIATION" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "addition": VARCHAR(255) 
  "axis": FLOAT 
  "color": VARCHAR(255) 
  "cylinder": FLOAT 
  "diameter": FLOAT 
  "ean": VARCHAR(13) 
  "nd": VARCHAR(1) 
  "power": FLOAT 
  "product_id": UUID 
  "product_sku": VARCHAR(255) 
  "radius": FLOAT 
  "sku": VARCHAR(255) 
  "status": VARCHAR(255) 
}
"EYEWEAR_USER" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "app_id": VARCHAR(255) 
  "app_user_id": VARCHAR(255) 
  "inactive_tt_at": DATETIME 
  "phone": VARCHAR 
  "stripe_customer_id": VARCHAR(255) 
}
"EYEWEAR_CONTACT_LENS_CART_ITEM" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "quantity": INTEGER 
  "type": VARCHAR(255) 
  "user_id": UUID 
  "variation_sku": VARCHAR(255) 
}
"EYEWEAR_CONTACT_LENS_ORDER_ITEM" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "order_id": UUID 
  "price": INTEGER 
  "status": VARCHAR(255) 
  "supplier_price": INTEGER 
  "type": VARCHAR(255) 
  "variation_sku": VARCHAR(255) 
}
"EYEWEAR_CONTACT_LENS_PAYMENT" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "stripe_charge_status": VARCHAR(255) 
  "stripe_payment_intent_id": VARCHAR(255) 
  "stripe_refund_id": VARCHAR(255) 
  "stripe_refund_status": VARCHAR(255) 
  "user_id": UUID 
}
"EYEWEAR_CONTACT_LENS_ORDER" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "address_city": VARCHAR(255) 
  "address_country": VARCHAR(255) 
  "address_info": TEXT 
  "address_postal_code": VARCHAR(255) 
  "address_recipient_name": VARCHAR(255) 
  "address_street": VARCHAR(255) 
  "bypass_prescription_parsing_with_date": DATE 
  "canceled_by_alan_at": DATETIME 
  "canceled_by_optician_at": DATETIME 
  "cashback_processed_at": DATETIME 
  "confirmed_by_alan_at": DATETIME 
  "confirmed_by_optician_at": DATETIME 
  "contact_email": VARCHAR(255) 
  "contact_phone": VARCHAR(40) 
  "covered_amount": INTEGER 
  "delivered_at": DATETIME 
  "feedback": TEXT 
  "first_name": VARCHAR(255) 
  "gender": VARCHAR(255) 
  "intercom_conversation_url": VARCHAR(255) 
  "invoice_id": VARCHAR(255) 
  "invoiced_at": DATETIME 
  "is_invoiced": BOOLEAN 
  "last_name": VARCHAR(255) 
  "latest_bot_decision": VARCHAR(20) 
  "latest_bot_decision_reason": TEXT 
  "lost_at": DATETIME 
  "manual_review": BOOLEAN 
  "original_order_id": UUID 
  "out_of_pocket": INTEGER 
  "paid_at": DATETIME 
  "payment_id": UUID 
  "prescription_id": VARCHAR(255) 
  "purchase_ref": VARCHAR(255) 
  "purchase_uri": TEXT 
  "rated_at": DATETIME 
  "rating": INTEGER 
  "rating_notification_sent": BOOLEAN 
  "return_comment": TEXT 
  "return_reasons": ARRAY 
  "returned_at": DATETIME 
  "shipped_at": DATETIME 
  "slack_ts": VARCHAR(255) 
  "status": VARCHAR(255) 
  "status_info": TEXT 
  "total_amount": INTEGER 
  "tracking_ref": TEXT 
  "tracking_url": TEXT 
  "unpaid_notification_sent_at": DATETIME 
  "user_id": UUID 
}
"EYEWEAR_FRAME_STOCK_REFILL" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "frame_id": UUID 
  "is_tombstoned": BOOLEAN 
  "type": VARCHAR(255) 
  "units": INTEGER 
}
"EYEWEAR_OPTICIAN" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "address_city": VARCHAR(255) 
  "address_country_code": VARCHAR(2) 
  "address_house_number": VARCHAR(255) 
  "address_postal_code": VARCHAR(255) 
  "address_recipient_name": VARCHAR(255) 
  "address_street": VARCHAR(255) 
  "app_user_ids": ARRAY 
  "company_name": VARCHAR(255) 
  "contact_email": VARCHAR(255) 
  "contact_name": VARCHAR(255) 
  "contact_phone": VARCHAR(40) 
  "invoices_folder_id": VARCHAR(255) 
  "optician_folder_id": VARCHAR(255) 
  "sendcloud_contract_id": INTEGER 
  "short_name": VARCHAR(255) 
  "simulation_file_id": VARCHAR(255) 
  "status": VARCHAR(255) 
}
"EYEWEAR_FRAME" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "arm_length": INTEGER 
  "brand_name": VARCHAR(255) 
  "bridge_width": INTEGER 
  "clip_on_photoshoot_count": INTEGER 
  "clip_on_stock_amount": INTEGER 
  "clip_on_supported": BOOLEAN 
  "clip_on_vto_id": VARCHAR(255) 
  "code": VARCHAR(255) 
  "code_name": VARCHAR(255) 
  "color_hex": VARCHAR(255) 
  "color_name": VARCHAR(255) 
  "description": TEXT 
  "female_position": FLOAT 
  "for_kid": BOOLEAN 
  "group_code": VARCHAR(255) 
  "has_ongoing_clip_on_stock_refill": BOOLEAN 
  "has_ongoing_stock_refill": BOOLEAN 
  "invoice_price": FLOAT 
  "is_100_pct_sante": BOOLEAN 
  "lense_height": INTEGER 
  "lense_width": INTEGER 
  "male_position": FLOAT 
  "manufacturing_country": VARCHAR(255) 
  "material": VARCHAR(255) 
  "name": VARCHAR(255) 
  "optician_id": UUID 
  "photoshoot_count": INTEGER 
  "price": FLOAT 
  "status": VARCHAR(255) 
  "stock_amount": INTEGER 
  "traits": ARRAY 
  "vto_id": VARCHAR(255) 
}
"EYEWEAR_FAVORITE" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "frame_id": UUID 
  "user_id": UUID 
}
"EYEWEAR_FRAME_LENS_PRICE" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "gross_price": FLOAT 
  "has_blue_light_filter": BOOLEAN 
  "is_100_pct_sante": BOOLEAN 
  "max_sphere_correction": INTEGER 
  "name": VARCHAR(255) 
  "net_price": FLOAT 
  "price_date": DATE 
}
"EYEWEAR_TESTIMONIAL" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "answer": TEXT 
  "answer_date": DATE 
  "comment": TEXT 
  "feedback": TEXT 
  "frame_id": UUID 
  "is_reviewed": BOOLEAN 
  "is_visible_from_catalog": BOOLEAN 
  "is_visible_from_product": BOOLEAN 
  "rating": INTEGER 
  "user_name": VARCHAR(255) 
}
"EYEWEAR_USER_FRAME_ORDER" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "address_city": VARCHAR(255) 
  "address_country": VARCHAR(255) 
  "address_info": TEXT 
  "address_postal_code": VARCHAR(255) 
  "address_recipient_name": VARCHAR(255) 
  "address_street": VARCHAR(255) 
  "after_sales_service_at": DATE 
  "attestation_id": VARCHAR(255) 
  "blue_filter_selected": BOOLEAN 
  "canceled_by_alan_at": DATETIME 
  "canceled_by_optician_at": DATETIME 
  "cashback_amount": FLOAT 
  "cashback_processed_at": DATETIME 
  "clip_on_selected": BOOLEAN 
  "confirmed_by_alan_at": DATETIME 
  "confirmed_by_optician_at": DATETIME 
  "contact_email": VARCHAR(255) 
  "contact_phone": VARCHAR(40) 
  "delivered_at": DATETIME 
  "first_name": VARCHAR(255) 
  "for_kid": BOOLEAN 
  "frame_id": UUID 
  "gender": VARCHAR(255) 
  "intercom_conversation_url": VARCHAR(255) 
  "invoice_id": VARCHAR(255) 
  "invoiced_at": DATETIME 
  "is_invoiced": BOOLEAN 
  "is_part_of_test_program": BOOLEAN 
  "last_name": VARCHAR(255) 
  "lost_at": DATETIME 
  "optician_folder_url": TEXT 
  "optician_id": UUID 
  "original_order_id": UUID 
  "prescription_id": VARCHAR(255) 
  "pupillary_distance": FLOAT 
  "purchase_ref": VARCHAR(255) 
  "purchase_uri": TEXT 
  "rating_notification_sent": BOOLEAN 
  "return_comment": TEXT 
  "return_reasons": ARRAY 
  "returned_at": DATETIME 
  "shipped_at": DATETIME 
  "shipping_label_dispatch_url": TEXT 
  "shipping_label_return_url": TEXT 
  "shipping_label_revision": INTEGER 
  "slack_ts": VARCHAR(255) 
  "status": VARCHAR(255) 
  "status_info": TEXT 
  "testimonial_id": UUID 
  "tracking_ref": TEXT 
  "tracking_url": TEXT 
  "user_id": UUID 
}
"EYEWEAR_ORDER_COMMENT" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "author_id": INTEGER 
  "author_name": VARCHAR(255) 
  "contact_lens_order_id": UUID 
  "frame_order_id": UUID 
  "text": TEXT 
}
"EYEWEAR_RATING" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "context": VARCHAR(255) 
  "feedback": VARCHAR(255) 
  "other_feedback": TEXT 
  "rating": INTEGER 
  "user_id": UUID 
}
"EYEWEAR_RESTOCK_ALERT" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "frame_id": UUID 
  "user_id": UUID 
}
"EYEWEAR_TRAIT_CATEGORY" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "filterable": BOOLEAN 
  "label_en": VARCHAR(100) 
  "label_fr": VARCHAR(100) 
  "position": INTEGER 
  "type": VARCHAR(100) 
}
"EYEWEAR_TRAIT" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "category_id": UUID 
  "description_en": TEXT 
  "description_fr": TEXT 
  "label_en": VARCHAR(100) 
  "label_fr": VARCHAR(100) 
  "position": INTEGER 
  "value": VARCHAR(100) 
}
"EYEWEAR_CONTACT_LENS_PRODUCT_NEW"."id" -> "EYEWEAR_CONTACT_LENS_PRODUCT_VARIATION"."product_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_USER"."id" -> "EYEWEAR_CONTACT_LENS_CART_ITEM"."user_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_CONTACT_LENS_PRODUCT_VARIATION"."sku" -> "EYEWEAR_CONTACT_LENS_CART_ITEM"."variation_sku": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_CONTACT_LENS_ORDER"."id" -> "EYEWEAR_CONTACT_LENS_ORDER_ITEM"."order_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"EYEWEAR_CONTACT_LENS_PRODUCT_VARIATION"."sku" -> "EYEWEAR_CONTACT_LENS_ORDER_ITEM"."variation_sku": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_USER"."id" -> "EYEWEAR_CONTACT_LENS_PAYMENT"."user_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_USER"."id" -> "EYEWEAR_CONTACT_LENS_ORDER"."user_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_CONTACT_LENS_ORDER"."id" -> "EYEWEAR_CONTACT_LENS_ORDER"."original_order_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"EYEWEAR_CONTACT_LENS_PAYMENT"."id" -> "EYEWEAR_CONTACT_LENS_ORDER"."payment_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"EYEWEAR_FRAME"."id" -> "EYEWEAR_FRAME_STOCK_REFILL"."frame_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"EYEWEAR_OPTICIAN"."id" -> "EYEWEAR_FRAME"."optician_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"EYEWEAR_FRAME"."id" -> "EYEWEAR_FAVORITE"."frame_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_USER"."id" -> "EYEWEAR_FAVORITE"."user_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_FRAME"."id" -> "EYEWEAR_TESTIMONIAL"."frame_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_TESTIMONIAL"."id" -> "EYEWEAR_USER_FRAME_ORDER"."testimonial_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"EYEWEAR_USER"."id" -> "EYEWEAR_USER_FRAME_ORDER"."user_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_OPTICIAN"."id" -> "EYEWEAR_USER_FRAME_ORDER"."optician_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_FRAME"."id" -> "EYEWEAR_USER_FRAME_ORDER"."frame_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_USER_FRAME_ORDER"."id" -> "EYEWEAR_USER_FRAME_ORDER"."original_order_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"EYEWEAR_USER_FRAME_ORDER"."id" -> "EYEWEAR_ORDER_COMMENT"."frame_order_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"EYEWEAR_CONTACT_LENS_ORDER"."id" -> "EYEWEAR_ORDER_COMMENT"."contact_lens_order_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"EYEWEAR_USER"."id" -> "EYEWEAR_RATING"."user_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_FRAME"."id" -> "EYEWEAR_RESTOCK_ALERT"."frame_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_USER"."id" -> "EYEWEAR_RESTOCK_ALERT"."user_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"EYEWEAR_TRAIT_CATEGORY"."id" -> "EYEWEAR_TRAIT"."category_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
Hold "Alt" / "Option" to enable pan & zoom