from app.models.enums import (
    RegistrationStatus,
    Status,
    Material,
    Joinery,
    Flooring,
    Heating,
    Parking,
    BuildingImageTags
)

building_metadata = {
    'table_name': 'buildings',
    'image_tag_options': BuildingImageTags,
    'columns': {
        'id': {
            'sql_type': 'SERIAL',
            'type': int,
            'constraints': {'primary_key': True},
            'use_as_option_identifier': True
        },
        'project_id': {
            'sql_type': 'INTEGER',
            'type': int,
            'constraints': {
                'foreign_key': {
                    'ref_table': 'projects',
                    'ref_column': 'id'
                }
            },
            'required': True,
            'use_as_option_identifier': True
        },
        'building_name': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'max_length': 50},
        },
        'registration_status': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': RegistrationStatus},
            'required': True
        },
        'estimated_finish_date': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {},
        },
        'status': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Status},
            'required': True
        },
        'material': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Material},
        },
        'joinery': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Joinery},
        },
        'flooring': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Flooring},
        },
        'heating': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Heating},
            'required': True
        },
        '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'},
            'required': True
        },
        'elevator': {
            'sql_type': 'BOOLEAN',
            'type': bool,
            'constraints': {},
        },
        'parking': {
            'sql_type': 'VARCHAR(50)',
            'type': str,
            'constraints': {'enum': Parking},
        },
        'basement': {
            '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},
        },
        '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},
        },
    }
}
