models.py 701 B

12345678910111213141516171819
  1. from django.db import models
  2. # Create your models here.
  3. class Payment(models.Model):
  4. payment_type = models.CharField(max_length=100)
  5. price_type = models.CharField(max_length=100)
  6. item_type = models.CharField(max_length=100)
  7. index_type = models.CharField(max_length=100)
  8. index_price = models.IntegerField()
  9. year = models.CharField(max_length=4)
  10. month = models.CharField(max_length=2)
  11. class Meta:
  12. app_label = "payment" # 指向自己的文件夹,不是项目,是这个模型的
  13. db_table = "pay" # 定义生成表的名称
  14. verbose_name = "支出报表" # 注解
  15. verbose_name_plural = "支出报表列表" #注解