{
  "id": "24c612a0-0e95-484e-8c49-debba4f61b38",
  "prevId": "00000000-0000-0000-0000-000000000000",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.accommodation_types": {
      "name": "accommodation_types",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "property_id": {
          "name": "property_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(180)",
          "primaryKey": false,
          "notNull": true
        },
        "max_guests": {
          "name": "max_guests",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "bedrooms": {
          "name": "bedrooms",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "beds": {
          "name": "beds",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "baths": {
          "name": "baths",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "accommodation_types_property_slug_unique": {
          "name": "accommodation_types_property_slug_unique",
          "columns": [
            {
              "expression": "property_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "accommodation_types_property_id_properties_id_fk": {
          "name": "accommodation_types_property_id_properties_id_fk",
          "tableFrom": "accommodation_types",
          "tableTo": "properties",
          "columnsFrom": [
            "property_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.amenities": {
      "name": "amenities",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "code": {
          "name": "code",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "icon": {
          "name": "icon",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": false
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "amenities_code_unique": {
          "name": "amenities_code_unique",
          "columns": [
            {
              "expression": "code",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.application_settings": {
      "name": "application_settings",
      "schema": "",
      "columns": {
        "key": {
          "name": "key",
          "type": "varchar(160)",
          "primaryKey": true,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "updated_by_id": {
          "name": "updated_by_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "application_settings_updated_by_id_users_id_fk": {
          "name": "application_settings_updated_by_id_users_id_fk",
          "tableFrom": "application_settings",
          "tableTo": "users",
          "columnsFrom": [
            "updated_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.audit_events": {
      "name": "audit_events",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "actor_user_id": {
          "name": "actor_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "action": {
          "name": "action",
          "type": "varchar(160)",
          "primaryKey": false,
          "notNull": true
        },
        "entity_type": {
          "name": "entity_type",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": true
        },
        "entity_id": {
          "name": "entity_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "metadata": {
          "name": "metadata",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'{}'::jsonb"
        },
        "ip_hash": {
          "name": "ip_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "audit_events_entity_idx": {
          "name": "audit_events_entity_idx",
          "columns": [
            {
              "expression": "entity_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "entity_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "audit_events_actor_user_id_users_id_fk": {
          "name": "audit_events_actor_user_id_users_id_fk",
          "tableFrom": "audit_events",
          "tableTo": "users",
          "columnsFrom": [
            "actor_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.availability_blocks": {
      "name": "availability_blocks",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "unit_id": {
          "name": "unit_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "availability_block_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "start_date": {
          "name": "start_date",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "end_date": {
          "name": "end_date",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "source_id": {
          "name": "source_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "availability_blocks_unit_dates_idx": {
          "name": "availability_blocks_unit_dates_idx",
          "columns": [
            {
              "expression": "unit_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "start_date",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "availability_blocks_unit_id_units_id_fk": {
          "name": "availability_blocks_unit_id_units_id_fk",
          "tableFrom": "availability_blocks",
          "tableTo": "units",
          "columnsFrom": [
            "unit_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.booking_guests": {
      "name": "booking_guests",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "booking_id": {
          "name": "booking_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(180)",
          "primaryKey": false,
          "notNull": false
        },
        "age_group": {
          "name": "age_group",
          "type": "varchar(40)",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "booking_guests_booking_id_bookings_id_fk": {
          "name": "booking_guests_booking_id_bookings_id_fk",
          "tableFrom": "booking_guests",
          "tableTo": "bookings",
          "columnsFrom": [
            "booking_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.booking_holds": {
      "name": "booking_holds",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "unit_id": {
          "name": "unit_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "booking_hold_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'active'"
        },
        "check_in": {
          "name": "check_in",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "check_out": {
          "name": "check_out",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "idempotency_key": {
          "name": "idempotency_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "booking_holds_idempotency_unique": {
          "name": "booking_holds_idempotency_unique",
          "columns": [
            {
              "expression": "idempotency_key",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "booking_holds_unit_dates_idx": {
          "name": "booking_holds_unit_dates_idx",
          "columns": [
            {
              "expression": "unit_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "check_in",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "booking_holds_unit_id_units_id_fk": {
          "name": "booking_holds_unit_id_units_id_fk",
          "tableFrom": "booking_holds",
          "tableTo": "units",
          "columnsFrom": [
            "unit_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.booking_price_lines": {
      "name": "booking_price_lines",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "booking_id": {
          "name": "booking_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "varchar(40)",
          "primaryKey": false,
          "notNull": true
        },
        "code": {
          "name": "code",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "amount_minor": {
          "name": "amount_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "sort_order": {
          "name": "sort_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        }
      },
      "indexes": {},
      "foreignKeys": {
        "booking_price_lines_booking_id_bookings_id_fk": {
          "name": "booking_price_lines_booking_id_bookings_id_fk",
          "tableFrom": "booking_price_lines",
          "tableTo": "bookings",
          "columnsFrom": [
            "booking_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.bookings": {
      "name": "bookings",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "unit_id": {
          "name": "unit_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "hold_id": {
          "name": "hold_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "booking_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "source": {
          "name": "source",
          "type": "booking_source",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'direct'"
        },
        "check_in": {
          "name": "check_in",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "check_out": {
          "name": "check_out",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "adults": {
          "name": "adults",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 1
        },
        "children": {
          "name": "children",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "infants": {
          "name": "infants",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "guest_name": {
          "name": "guest_name",
          "type": "varchar(180)",
          "primaryKey": false,
          "notNull": true
        },
        "guest_email": {
          "name": "guest_email",
          "type": "varchar(320)",
          "primaryKey": false,
          "notNull": true
        },
        "guest_phone": {
          "name": "guest_phone",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": false
        },
        "currency": {
          "name": "currency",
          "type": "varchar(3)",
          "primaryKey": false,
          "notNull": true,
          "default": "'EUR'"
        },
        "total_minor": {
          "name": "total_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "deposit_minor": {
          "name": "deposit_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "pricing_snapshot": {
          "name": "pricing_snapshot",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "guest_management_token_hash": {
          "name": "guest_management_token_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "cancellation_reason": {
          "name": "cancellation_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "internal_notes": {
          "name": "internal_notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "confirmed_at": {
          "name": "confirmed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "cancelled_at": {
          "name": "cancelled_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "bookings_unit_dates_idx": {
          "name": "bookings_unit_dates_idx",
          "columns": [
            {
              "expression": "unit_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "check_in",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "bookings_status_idx": {
          "name": "bookings_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "bookings_guest_email_idx": {
          "name": "bookings_guest_email_idx",
          "columns": [
            {
              "expression": "guest_email",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "bookings_unit_id_units_id_fk": {
          "name": "bookings_unit_id_units_id_fk",
          "tableFrom": "bookings",
          "tableTo": "units",
          "columnsFrom": [
            "unit_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "restrict",
          "onUpdate": "no action"
        },
        "bookings_hold_id_booking_holds_id_fk": {
          "name": "bookings_hold_id_booking_holds_id_fk",
          "tableFrom": "bookings",
          "tableTo": "booking_holds",
          "columnsFrom": [
            "hold_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.contact_enquiries": {
      "name": "contact_enquiries",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "locale": {
          "name": "locale",
          "type": "locale",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(180)",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "varchar(320)",
          "primaryKey": false,
          "notNull": true
        },
        "phone": {
          "name": "phone",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": false
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "consent_at": {
          "name": "consent_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "varchar(40)",
          "primaryKey": false,
          "notNull": true,
          "default": "'new'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.email_events": {
      "name": "email_events",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "booking_id": {
          "name": "booking_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "template": {
          "name": "template",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "locale": {
          "name": "locale",
          "type": "locale",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "recipient": {
          "name": "recipient",
          "type": "varchar(320)",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "varchar(40)",
          "primaryKey": false,
          "notNull": true
        },
        "provider_message_id": {
          "name": "provider_message_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "email_events_booking_id_bookings_id_fk": {
          "name": "email_events_booking_id_bookings_id_fk",
          "tableFrom": "email_events",
          "tableTo": "bookings",
          "columnsFrom": [
            "booking_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.fees": {
      "name": "fees",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "property_id": {
          "name": "property_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "code": {
          "name": "code",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "amount_minor": {
          "name": "amount_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "taxable": {
          "name": "taxable",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "fees_property_id_properties_id_fk": {
          "name": "fees_property_id_properties_id_fk",
          "tableFrom": "fees",
          "tableTo": "properties",
          "columnsFrom": [
            "property_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ical_feeds": {
      "name": "ical_feeds",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "unit_id": {
          "name": "unit_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(160)",
          "primaryKey": false,
          "notNull": true
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "last_synced_at": {
          "name": "last_synced_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "ical_feeds_unit_id_units_id_fk": {
          "name": "ical_feeds_unit_id_units_id_fk",
          "tableFrom": "ical_feeds",
          "tableTo": "units",
          "columnsFrom": [
            "unit_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ical_sync_events": {
      "name": "ical_sync_events",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "feed_id": {
          "name": "feed_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "varchar(40)",
          "primaryKey": false,
          "notNull": true
        },
        "imported_count": {
          "name": "imported_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "conflict_count": {
          "name": "conflict_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "payload": {
          "name": "payload",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'{}'::jsonb"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "ical_sync_events_feed_id_ical_feeds_id_fk": {
          "name": "ical_sync_events_feed_id_ical_feeds_id_fk",
          "tableFrom": "ical_sync_events",
          "tableTo": "ical_feeds",
          "columnsFrom": [
            "feed_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.localized_content": {
      "name": "localized_content",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "entity_type": {
          "name": "entity_type",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": true
        },
        "entity_id": {
          "name": "entity_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "locale": {
          "name": "locale",
          "type": "locale",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "field": {
          "name": "field",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "review_status": {
          "name": "review_status",
          "type": "varchar(40)",
          "primaryKey": false,
          "notNull": true,
          "default": "'needs_review'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "localized_content_unique": {
          "name": "localized_content_unique",
          "columns": [
            {
              "expression": "entity_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "entity_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "locale",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "field",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.media_assets": {
      "name": "media_assets",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "property_id": {
          "name": "property_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "kind": {
          "name": "kind",
          "type": "media_kind",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "source": {
          "name": "source",
          "type": "media_source",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "original_file_name": {
          "name": "original_file_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "mime_type": {
          "name": "mime_type",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "width": {
          "name": "width",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "height": {
          "name": "height",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "size_bytes": {
          "name": "size_bytes",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "alt": {
          "name": "alt",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'{}'::jsonb"
        },
        "caption": {
          "name": "caption",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'{}'::jsonb"
        },
        "ai_prompt": {
          "name": "ai_prompt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ai_model": {
          "name": "ai_model",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": false
        },
        "approved_at": {
          "name": "approved_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "approved_by_id": {
          "name": "approved_by_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "media_assets_property_idx": {
          "name": "media_assets_property_idx",
          "columns": [
            {
              "expression": "property_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "media_assets_kind_idx": {
          "name": "media_assets_kind_idx",
          "columns": [
            {
              "expression": "kind",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "media_assets_property_id_properties_id_fk": {
          "name": "media_assets_property_id_properties_id_fk",
          "tableFrom": "media_assets",
          "tableTo": "properties",
          "columnsFrom": [
            "property_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "media_assets_approved_by_id_users_id_fk": {
          "name": "media_assets_approved_by_id_users_id_fk",
          "tableFrom": "media_assets",
          "tableTo": "users",
          "columnsFrom": [
            "approved_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.payment_events": {
      "name": "payment_events",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "payment_id": {
          "name": "payment_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "event_type": {
          "name": "event_type",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "payload": {
          "name": "payload",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'{}'::jsonb"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "payment_events_payment_id_payments_id_fk": {
          "name": "payment_events_payment_id_payments_id_fk",
          "tableFrom": "payment_events",
          "tableTo": "payments",
          "columnsFrom": [
            "payment_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.payments": {
      "name": "payments",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "booking_id": {
          "name": "booking_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "payment_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "amount_minor": {
          "name": "amount_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "currency": {
          "name": "currency",
          "type": "varchar(3)",
          "primaryKey": false,
          "notNull": true,
          "default": "'EUR'"
        },
        "provider_reference": {
          "name": "provider_reference",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "payments_booking_id_bookings_id_fk": {
          "name": "payments_booking_id_bookings_id_fk",
          "tableFrom": "payments",
          "tableTo": "bookings",
          "columnsFrom": [
            "booking_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.promotions": {
      "name": "promotions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "property_id": {
          "name": "property_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "code": {
          "name": "code",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "discount_minor": {
          "name": "discount_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "discount_bps": {
          "name": "discount_bps",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "starts_at": {
          "name": "starts_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "ends_at": {
          "name": "ends_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "max_redemptions": {
          "name": "max_redemptions",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "promotions_property_code_unique": {
          "name": "promotions_property_code_unique",
          "columns": [
            {
              "expression": "property_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "code",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "promotions_property_id_properties_id_fk": {
          "name": "promotions_property_id_properties_id_fk",
          "tableFrom": "promotions",
          "tableTo": "properties",
          "columnsFrom": [
            "property_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.properties": {
      "name": "properties",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "slug": {
          "name": "slug",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(180)",
          "primaryKey": false,
          "notNull": true
        },
        "registration_number": {
          "name": "registration_number",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": false
        },
        "timezone": {
          "name": "timezone",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": true,
          "default": "'Europe/Athens'"
        },
        "currency": {
          "name": "currency",
          "type": "varchar(3)",
          "primaryKey": false,
          "notNull": true,
          "default": "'EUR'"
        },
        "source_url": {
          "name": "source_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "properties_slug_unique": {
          "name": "properties_slug_unique",
          "columns": [
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.property_amenities": {
      "name": "property_amenities",
      "schema": "",
      "columns": {
        "property_id": {
          "name": "property_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "amenity_id": {
          "name": "amenity_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "sort_order": {
          "name": "sort_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "property_amenities_property_id_properties_id_fk": {
          "name": "property_amenities_property_id_properties_id_fk",
          "tableFrom": "property_amenities",
          "tableTo": "properties",
          "columnsFrom": [
            "property_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "property_amenities_amenity_id_amenities_id_fk": {
          "name": "property_amenities_amenity_id_amenities_id_fk",
          "tableFrom": "property_amenities",
          "tableTo": "amenities",
          "columnsFrom": [
            "amenity_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "property_amenities_property_id_amenity_id_pk": {
          "name": "property_amenities_property_id_amenity_id_pk",
          "columns": [
            "property_id",
            "amenity_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.rate_overrides": {
      "name": "rate_overrides",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "unit_id": {
          "name": "unit_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "date": {
          "name": "date",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "nightly_minor": {
          "name": "nightly_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "min_stay_nights": {
          "name": "min_stay_nights",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "note": {
          "name": "note",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "rate_overrides_unit_date_unique": {
          "name": "rate_overrides_unit_date_unique",
          "columns": [
            {
              "expression": "unit_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "date",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "rate_overrides_unit_id_units_id_fk": {
          "name": "rate_overrides_unit_id_units_id_fk",
          "tableFrom": "rate_overrides",
          "tableTo": "units",
          "columnsFrom": [
            "unit_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.rate_plans": {
      "name": "rate_plans",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "unit_id": {
          "name": "unit_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "season_id": {
          "name": "season_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "varchar(160)",
          "primaryKey": false,
          "notNull": true
        },
        "currency": {
          "name": "currency",
          "type": "varchar(3)",
          "primaryKey": false,
          "notNull": true,
          "default": "'EUR'"
        },
        "nightly_minor": {
          "name": "nightly_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "weekend_nightly_minor": {
          "name": "weekend_nightly_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "rate_plans_unit_idx": {
          "name": "rate_plans_unit_idx",
          "columns": [
            {
              "expression": "unit_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "rate_plans_unit_id_units_id_fk": {
          "name": "rate_plans_unit_id_units_id_fk",
          "tableFrom": "rate_plans",
          "tableTo": "units",
          "columnsFrom": [
            "unit_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "rate_plans_season_id_seasons_id_fk": {
          "name": "rate_plans_season_id_seasons_id_fk",
          "tableFrom": "rate_plans",
          "tableTo": "seasons",
          "columnsFrom": [
            "season_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.roles": {
      "name": "roles",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "code": {
          "name": "code",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "roles_code_unique": {
          "name": "roles_code_unique",
          "columns": [
            {
              "expression": "code",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.seasons": {
      "name": "seasons",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "property_id": {
          "name": "property_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(160)",
          "primaryKey": false,
          "notNull": true
        },
        "start_date": {
          "name": "start_date",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "end_date": {
          "name": "end_date",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "priority": {
          "name": "priority",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "seasons_property_dates_idx": {
          "name": "seasons_property_dates_idx",
          "columns": [
            {
              "expression": "property_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "start_date",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "seasons_property_id_properties_id_fk": {
          "name": "seasons_property_id_properties_id_fk",
          "tableFrom": "seasons",
          "tableTo": "properties",
          "columnsFrom": [
            "property_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sessions": {
      "name": "sessions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "token_hash": {
          "name": "token_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "revoked_at": {
          "name": "revoked_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "sessions_token_hash_unique": {
          "name": "sessions_token_hash_unique",
          "columns": [
            {
              "expression": "token_hash",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_user_id_idx": {
          "name": "sessions_user_id_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "sessions_user_id_users_id_fk": {
          "name": "sessions_user_id_users_id_fk",
          "tableFrom": "sessions",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.stay_rules": {
      "name": "stay_rules",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "unit_id": {
          "name": "unit_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "start_date": {
          "name": "start_date",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "end_date": {
          "name": "end_date",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "min_stay_nights": {
          "name": "min_stay_nights",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "max_stay_nights": {
          "name": "max_stay_nights",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "min_notice_days": {
          "name": "min_notice_days",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "max_advance_days": {
          "name": "max_advance_days",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "stay_rules_unit_dates_idx": {
          "name": "stay_rules_unit_dates_idx",
          "columns": [
            {
              "expression": "unit_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "start_date",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "stay_rules_unit_id_units_id_fk": {
          "name": "stay_rules_unit_id_units_id_fk",
          "tableFrom": "stay_rules",
          "tableTo": "units",
          "columnsFrom": [
            "unit_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.taxes": {
      "name": "taxes",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "property_id": {
          "name": "property_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "code": {
          "name": "code",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "percentage_bps": {
          "name": "percentage_bps",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "taxes_property_id_properties_id_fk": {
          "name": "taxes_property_id_properties_id_fk",
          "tableFrom": "taxes",
          "tableTo": "properties",
          "columnsFrom": [
            "property_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.units": {
      "name": "units",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "property_id": {
          "name": "property_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "accommodation_type_id": {
          "name": "accommodation_type_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(180)",
          "primaryKey": false,
          "notNull": true
        },
        "sort_order": {
          "name": "sort_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "units_property_slug_unique": {
          "name": "units_property_slug_unique",
          "columns": [
            {
              "expression": "property_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "units_accommodation_type_idx": {
          "name": "units_accommodation_type_idx",
          "columns": [
            {
              "expression": "accommodation_type_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "units_property_id_properties_id_fk": {
          "name": "units_property_id_properties_id_fk",
          "tableFrom": "units",
          "tableTo": "properties",
          "columnsFrom": [
            "property_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "units_accommodation_type_id_accommodation_types_id_fk": {
          "name": "units_accommodation_type_id_accommodation_types_id_fk",
          "tableFrom": "units",
          "tableTo": "accommodation_types",
          "columnsFrom": [
            "accommodation_type_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "restrict",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_roles": {
      "name": "user_roles",
      "schema": "",
      "columns": {
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "role_id": {
          "name": "role_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "user_roles_user_id_users_id_fk": {
          "name": "user_roles_user_id_users_id_fk",
          "tableFrom": "user_roles",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "user_roles_role_id_roles_id_fk": {
          "name": "user_roles_role_id_roles_id_fk",
          "tableFrom": "user_roles",
          "tableTo": "roles",
          "columnsFrom": [
            "role_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "user_roles_user_id_role_id_pk": {
          "name": "user_roles_user_id_role_id_pk",
          "columns": [
            "user_id",
            "role_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "email": {
          "name": "email",
          "type": "varchar(320)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(160)",
          "primaryKey": false,
          "notNull": true
        },
        "password_hash": {
          "name": "password_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "last_login_at": {
          "name": "last_login_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "users_email_unique": {
          "name": "users_email_unique",
          "columns": [
            {
              "expression": "email",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {
    "public.availability_block_type": {
      "name": "availability_block_type",
      "schema": "public",
      "values": [
        "owner_stay",
        "maintenance",
        "manual_block",
        "external_calendar"
      ]
    },
    "public.booking_source": {
      "name": "booking_source",
      "schema": "public",
      "values": [
        "direct",
        "manual",
        "ical",
        "airbnb",
        "other"
      ]
    },
    "public.booking_status": {
      "name": "booking_status",
      "schema": "public",
      "values": [
        "draft",
        "held",
        "pending",
        "pending_payment",
        "confirmed",
        "cancelled",
        "expired",
        "completed",
        "no_show",
        "refunded"
      ]
    },
    "public.booking_hold_status": {
      "name": "booking_hold_status",
      "schema": "public",
      "values": [
        "active",
        "converted",
        "expired",
        "released"
      ]
    },
    "public.locale": {
      "name": "locale",
      "schema": "public",
      "values": [
        "en",
        "el"
      ]
    },
    "public.media_kind": {
      "name": "media_kind",
      "schema": "public",
      "values": [
        "property_photo",
        "generated_asset",
        "document",
        "open_graph"
      ]
    },
    "public.media_source": {
      "name": "media_source",
      "schema": "public",
      "values": [
        "owner",
        "photographer",
        "ai_generated",
        "imported"
      ]
    },
    "public.payment_status": {
      "name": "payment_status",
      "schema": "public",
      "values": [
        "not_required",
        "pending",
        "authorized",
        "paid",
        "failed",
        "refunded"
      ]
    }
  },
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}