Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from peewee import *
- from config import *
- database = PostgresqlDatabase(dbname, **{'host': host, 'user': user, 'password': password})
- class UnknownField(object):
- def __init__(self, *_, **__): pass
- class BaseModel(Model):
- class Meta:
- database = database
- class ReformaOpendata(BaseModel):
- id = PrimaryKeyField()
- id_ref = IntegerField(null=True)
- area_common_property = DoubleField(null=True)
- area_id = CharField()
- area_land = DoubleField(null=True)
- area_non_residential = DoubleField(null=True)
- area_residential = DoubleField(null=True)
- area_total = DoubleField(null=True)
- basement_area = DoubleField(null=True)
- built_year = SmallIntegerField(null=True)
- chute_count = SmallIntegerField(null=True)
- chute_type = CharField(null=True)
- city_id = CharField()
- cold_water_type = CharField(null=True)
- drainage_type = CharField(null=True)
- electrical_entries_count = SmallIntegerField(null=True)
- electrical_type = CharField(null=True)
- elevators_count = SmallIntegerField(null=True)
- energy_efficiency = CharField(null=True)
- entrance_count = SmallIntegerField(null=True)
- exploitation_start_year = SmallIntegerField(null=True)
- firefighting_type = CharField(null=True)
- floor_count_max = SmallIntegerField(null=True)
- floor_count_min = SmallIntegerField(null=True)
- floor_type = CharField(null=True)
- foundation_type = CharField(null=True)
- gas_type = CharField(null=True)
- heating_type = CharField(null=True)
- hot_water_type = CharField(null=True)
- house_type = CharField(null=True)
- houseguid = CharField()
- is_alarm = CharField(null=True)
- living_quarters_count = SmallIntegerField(null=True)
- management_organization_id = IntegerField(null=True)
- method_of_forming_overhaul_fund = CharField(null=True)
- other_beautification = TextField(null=True)
- parking_square = DoubleField(null=True)
- playground = SmallIntegerField(null=True)
- project_type = TextField(null=True)
- quarters_count = SmallIntegerField(null=True)
- region_id = CharField()
- sewerage_cesspools_volume = DoubleField(null=True)
- sewerage_type = CharField(null=True)
- sportsground = SmallIntegerField(null=True)
- street_id = CharField()
- unliving_quarters_count = SmallIntegerField(null=True)
- ventilation_type = CharField(null=True)
- wall_material = CharField(null=True)
- class Meta:
- table_name = 'reforma_opendata'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement