import uuid from audioop import reverse from django.db import models # Create your models here. class Flow(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4()) name = models.CharField('站名',max_length=256,null=False) data = models.CharField('时间',max_length=256,null=False) flow = models.FloatField('逐日平均流量',null=True,blank=True) water_level = models.FloatField('逐日平均水位',null=True,blank=True) added = models.DateTimeField(auto_now_add=True, null=True, blank=True) updated = models.DateTimeField(auto_now=True, null=True, blank=True) def get_absolute_url(self): return reverse('data-flow-detail', kwargs={'pk': self.pk}) def __str__(self): return self.name class Administrative(models.Model): id = models.UUIDField('id',primary_key=True,default=uuid.uuid4()) county_area = models.CharField('县区',max_length=256,null=False) data = models.CharField('时间',max_length=256,null=True) government = models.CharField('镇人民政府',max_length=256,null=True,blank=True) villager_committee = models.CharField('村们委员会',max_length=256,null=True,blank=True) street_office = models.CharField('街道办事处',max_length=256,null=True,blank=True) residents_committee = models.CharField('居民委员会',max_length=256,null=True,blank=True) land_area = models.CharField('土地面积',max_length=256,null=True,blank=True) proportion = models.CharField('比重%',max_length=256,null=True,blank=True) added = models.DateTimeField(auto_now_add=True, null=True, blank=True) updated = models.DateTimeField(auto_now=True, null=True, blank=True) def get_absolute_url(self): return reverse('data-administrative-detail', kwargs={'pk': self.pk}) def __str__(self): return self.county_area class Land(models.Model): id = models.UUIDField('id',primary_key=True,default=uuid.uuid4()) county_area = models.CharField('县区',max_length=256,null=False) data = models.CharField('时间',max_length=256,null=True) cultivated_land_area = models.CharField('年末常用耕地面积',max_length=256,null=True,blank=True) irrigated_land = models.CharField('水浇地',max_length=256,null=True,blank=True) cultivated_land = models.CharField('每一乡村人口占有耕地',max_length=256,null=True,blank=True) irrigated_land_each = models.CharField('水浇地',max_length=256,null=True,blank=True) added = models.DateTimeField(auto_now_add=True, null=True, blank=True) updated = models.DateTimeField(auto_now=True, null=True, blank=True) def get_absolute_url(self): return reverse('data-land-detail', kwargs={'pk': self.pk}) def __str__(self): return self.county_area class Revenue(models.Model): id = models.UUIDField('id',primary_key=True,default=uuid.uuid4()) index = models.CharField('指标名称',max_length=256,null=False) data = models.CharField('时间',max_length=256,null=True) city = models.CharField('全市',max_length=256,null=True,blank=True) municipal_level = models.CharField('市级',max_length=256,null=True,blank=True) city_level = models.CharField('市本级',max_length=256,null=True,blank=True) gaoxinqu = models.CharField('高新区',max_length=256,null=True,blank=True) district_and_county = models.CharField('区县合计',max_length=256,null=True,blank=True) taibaixian = models.CharField('太白县',max_length=256,null=True,blank=True) chencangqu = models.CharField('陈仓区',max_length=256,null=True,blank=True) fengxiangxian = models.CharField('凤翔县',max_length=256,null=True,blank=True) qishanxian = models.CharField('岐山县',max_length=256,null=True,blank=True) linyouxian = models.CharField('麟游县',max_length=256,null=True,blank=True) longxian = models.CharField('陇县',max_length=256,null=True,blank=True) qianyangxian = models.CharField('千阳县',max_length=256,null=True,blank=True) fengxian = models.CharField('凤县',max_length=256,null=True,blank=True) fufengxian = models.CharField('扶风县',max_length=256,null=True,blank=True) meixian = models.CharField('眉县',max_length=256,null=True,blank=True) jintaiqu = models.CharField('金台区',max_length=256,null=True,blank=True) weibinqu = models.CharField('渭滨区',max_length=256,null=True,blank=True) added = models.DateTimeField(auto_now_add=True, null=True, blank=True) updated = models.DateTimeField(auto_now=True, null=True, blank=True) def get_absolute_url(self): return reverse('data-evenue-detail', kwargs={'pk': self.pk}) def __str__(self): return self.index class Population(models.Model): id = models.UUIDField('id',primary_key=True,default=uuid.uuid4()) county_area = models.CharField('县区', max_length=256, null=False) data = models.CharField('时间', max_length=256, null=True) permanent_population = models.FloatField('常住人口(万人)', max_length=256,null=True,blank=True) households = models.CharField('总户数(户)', max_length=256,null=True,blank=True) census_register_population = models.FloatField('户籍人口(万人)', max_length=256,null=True,blank=True) male = models.CharField('男性', max_length=256,null=True,blank=True) female_sex = models.CharField('女性', max_length=256,null=True,blank=True) birth_rate = models.CharField('出生率(%)', max_length=256,null=True,blank=True) mortality = models.CharField('死亡率(%)', max_length=256,null=True,blank=True) growth_rate = models.CharField('人口自然增长率(%)', max_length=256,null=True,blank=True) urbanization_rate = models.CharField('常住人口城镇化率(%)', max_length=256,null=True,blank=True) added = models.DateTimeField(auto_now_add=True, null=True, blank=True) updated = models.DateTimeField(auto_now=True, null=True, blank=True) def get_absolute_url(self): return reverse('data-population-detail', kwargs={'pk': self.pk}) def __str__(self): return self.county_area class Foodstuff(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4()) county_area = models.CharField('县区', max_length=256, null=False) data = models.CharField('时间', max_length=256, null=True) grain_sown_area = models.CharField('粮食播种面积', max_length=256,null=True,blank=True) increase1 = models.CharField('比上年增长', max_length=256,null=True,blank=True) grain_yield = models.CharField('粮食产量', max_length=256,null=True,blank=True) increase2 = models.CharField('比上年增长', max_length=256, null=True, blank=True) sown_area_of_oil= models.CharField('油料播种面积', max_length=256, null=True, blank=True) increase3 = models.CharField('比上年增长', max_length=256, null=True, blank=True) oil_production= models.CharField('油料产量', max_length=256, null=True, blank=True) increase4 = models.CharField('比上年增长', max_length=256, null=True, blank=True) added = models.DateTimeField(auto_now_add=True, null=True, blank=True) updated = models.DateTimeField(auto_now=True, null=True, blank=True) def get_absolute_url(self): return reverse('data-oodstuff-detail', kwargs={'pk': self.pk}) def __str__(self): return self.county_areaf