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