models.py 1.2 KB

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