models.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. from django.db import models
  2. class District(models.Model):
  3. id = models.AutoField("ID", primary_key=True)
  4. city_id = models.CharField("城市ID", max_length=64, blank=True, null=True)
  5. city = models.CharField("城市", max_length=64, blank=True, null=True)
  6. pid = models.CharField("PID",max_length=64, blank=True, null=True)
  7. class Meta:
  8. db_table = "district"
  9. class DayData(models.Model):
  10. id = models.AutoField("ID", primary_key=True)
  11. cityid = models.CharField("城市ID", max_length=64, blank=True, null=True)
  12. province = models.CharField("省", max_length=64, blank=True, null=True)
  13. city = models.CharField("市", max_length=64, blank=True, null=True)
  14. district = models.CharField("区", max_length=64, blank=True, null=True)
  15. content = models.TextField("天气")
  16. class Meta:
  17. db_table = "day_data"
  18. class ServerDayData(models.Model):
  19. id = models.AutoField("ID", primary_key=True)
  20. cityid = models.CharField("城市ID", max_length=64, blank=True, null=True)
  21. province = models.CharField("省", max_length=64, blank=True, null=True)
  22. city = models.CharField("市", max_length=64, blank=True, null=True)
  23. district = models.CharField("区", max_length=64, blank=True, null=True)
  24. content = models.TextField("天气")
  25. class Meta:
  26. db_table = "server_day_data"