Parcourir la source

payment建model与表

DYaiu il y a 4 ans
Parent
commit
ee897d1662
2 fichiers modifiés avec 48 ajouts et 0 suppressions
  1. 32 0
      payment/migrations/0001_initial.py
  2. 16 0
      payment/models.py

+ 32 - 0
payment/migrations/0001_initial.py

@@ -0,0 +1,32 @@
+# Generated by Django 3.0.8 on 2020-07-28 08:10
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    initial = True
+
+    dependencies = [
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Payment',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('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)),
+            ],
+            options={
+                'verbose_name': '支出报表',
+                'verbose_name_plural': '支出报表列表',
+                'db_table': 'pay',
+            },
+        ),
+    ]

+ 16 - 0
payment/models.py

@@ -1 +1,17 @@
 from django.db import models
+
+
+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 = "支出报表列表"