from app.models.enums import (
    FloorType,
    TypeApartment,
    RegistrationStatus,
    Heating,
    Condition,
    Cities,
    Equipment,
    YearBuilt,
    Orientation,
    NumberOfRooms,
    SuitableFor,
    RentType,
    ApartmentImageTags
)

apartment_renting_metadata = {
    'table_name': 'apartments_renting',
    'image_tag_options': ApartmentImageTags,
    'columns': {
        'id': {
            'sql_type': 'SERIAL',
            'type': int,
            'constraints': {'primary_key': True}
        },
        'owner_name': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
            'required': True,
            'use_as_option_identifier': True
        },
        'owner_number': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
            'required': True
        },
        'city': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Cities},
            'required': True
        },
        'settlement': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'street_address': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
            'required': True,
            'use_as_option_identifier': True
        },
        'street_number': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'registration_status': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': RegistrationStatus},
            'required': True
        },
        'price': {
            'sql_type': 'FLOAT',
            'type': float,
            'constraints': {'sign': 'positive'},
        },
        'coordinate_latitude': {
            'sql_type': 'FLOAT',
            'type': float,
            'constraints': {}
        },
        'coordinate_longitude': {
            'sql_type': 'FLOAT',
            'type': float,
            'constraints': {}
        },
        'area': {
            'sql_type': 'FLOAT',
            'type': float,
            'constraints': {'sign': 'positive'},
            'required': True
        },
        'heating': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Heating},
            'required': True
        },
        'condition': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Condition},
        },
        'number_of_floors': {
            'sql_type': 'INTEGER',
            'type': int,
            'constraints': {'sign': 'positive'},
            'required': True
        },
        'number_of_floors_above_ground': {
            'sql_type': 'INTEGER',
            'type': int,
            'constraints': {'sign': 'positive'},
        },
        'equipment': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Equipment},
        },
        'year_built': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': YearBuilt},
        },
        'basement': {
            'sql_type': 'BOOLEAN',
            'type': bool,
            'constraints': {}
        },
        'number_of_terraces': {
            'sql_type': 'INTEGER',
            'type': int,
            'constraints': {'sign': 'positive'},
        },
        'type': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': TypeApartment},
            'required': True
        },
        'number_of_rooms': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': NumberOfRooms},
            'required': True
        },
        'apartment_number': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'floor_type': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': FloorType},
            'required': True
        },
        'floor_number': {
            'sql_type': 'INTEGER',
            'type': int,
            'constraints': {'sign': 'positive'},
            'required': True
        },
        'elevator': {
            'sql_type': 'BOOLEAN',
            'type': bool,
            'constraints': {}
        },
        'orientation': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Orientation},
        },
        'parking_garage': {
            'sql_type': 'BOOLEAN',
            'type': bool,
            'constraints': {}
        },
        'available_now': {
            'sql_type': 'BOOLEAN',
            'type': bool,
            'constraints': {}
        },
        'available_from': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {}
        },
        'rent_type': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': RentType},
        },
        'deposit_required': {
            'sql_type': 'BOOLEAN',
            'type': bool,
            'constraints': {}
        },
        'deposit_amount': {
            'sql_type': 'FLOAT',
            'type': float,
            'constraints': {'sign': 'positive'}
        },
        'min_utilities': {
            'sql_type': 'FLOAT',
            'type': float,
            'constraints': {'sign': 'positive'}
        },
        'max_utilities': {
            'sql_type': 'FLOAT',
            'type': float,
            'constraints': {'sign': 'positive'}
        },
        'utilities_included': {
            'sql_type': 'BOOLEAN',
            'type': bool,
            'constraints': {}
        },
        'suitable_for': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': SuitableFor}
        },
        'smoking_allowed': {
            'sql_type': 'BOOLEAN',
            'type': bool,
            'constraints': {}
        },
        'pets_allowed': {
            'sql_type': 'BOOLEAN',
            'type': bool,
            'constraints': {}
        },
        'agent_comment': {
            'sql_type': 'TEXT',
            'type': str,
            'constraints': {'max_length': 1000}
        },
        'created_at': {
            'sql_type': 'TIMESTAMP',
            'type': str,
            'constraints': {}
        },
        'website_title': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'property_subtitle': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'property_description': {
            'sql_type': 'TEXT',
            'type': str,
            'constraints': {'max_length': 1000},
        },
        'feature_1': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'feature_2': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'feature_3': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'location_description': {
            'sql_type': 'TEXT',
            'type': str,
            'constraints': {'max_length': 1000},
        },
        'right_property': {
            'sql_type': 'TEXT',
            'type': str,
            'constraints': {'max_length': 1000},
        },
        'website_title_english': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'property_subtitle_english': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'property_description_english': {
            'sql_type': 'TEXT',
            'type': str,
            'constraints': {'max_length': 1000},
        },
        'feature_1_english': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'feature_2_english': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'feature_3_english': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'location_description_english': {
            'sql_type': 'TEXT',
            'type': str,
            'constraints': {'max_length': 1000},
        },
        'right_property_english': {
            'sql_type': 'TEXT',
            'type': str,
            'constraints': {'max_length': 1000},
        },
    }
}
