from app.models.enums import (
    TypeApartment,
    NumberOfRooms,
    ApartmentTypeImageTags
)

apartment_type_metadata = {
    'table_name': 'apartment_types',
    'image_tag_options': ApartmentTypeImageTags,
    'columns': {
        'id': {
            'sql_type': 'SERIAL',
            'type': int,
            'constraints': {'primary_key': True}
        },
        'project_id': {
            'sql_type': 'INTEGER',
            'type': int,
            'constraints': {
                'foreign_key': {
                    'ref_table': 'projects',
                    'ref_column': 'id'
                }
            },
            'required': True
        },
        'type_name': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
            'required': True,
            'use_as_option_identifier': True
        },
        'number_of_rooms': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': NumberOfRooms},
            'required': True
        },
        'number_of_terraces': {
            'sql_type': 'INTEGER',
            'type': int,
            'constraints': {'sign': 'positive'},
            'required': True
        },
        'type': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': TypeApartment},
            'required': True
        },
        'agent_comment': {
            'sql_type': 'VARCHAR(50)',
            '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},
        },

    }
}
