You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flyapps/fir_ser/api/migrations/0025_order_price.py

55 lines
3.0 KiB

# Generated by Django 3.0.3 on 2021-03-29 14:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0024_auto_20210324_1751'),
]
operations = [
migrations.CreateModel(
name='Price',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=128, unique=True, verbose_name='下载包唯一名称')),
('title', models.CharField(max_length=128, verbose_name='下载包名称')),
('description', models.CharField(max_length=128, verbose_name='下载包描述')),
('price', models.FloatField(verbose_name='下载包价格')),
('package_size', models.BigIntegerField(verbose_name='下载包次数')),
('download_count_gift', models.IntegerField(default=0, verbose_name='赠送下载次数')),
('is_enable', models.BooleanField(default=True, verbose_name='是否启用该价格')),
('updated_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
],
options={
'verbose_name': '价格列表',
'verbose_name_plural': '价格列表',
'unique_together': {('price', 'package_size')},
},
),
migrations.CreateModel(
name='Order',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('payment_type', models.SmallIntegerField(choices=[(0, '微信'), (1, '支付宝'), (2, '优惠码'), (4, '银联')])),
('payment_number', models.CharField(blank=True, max_length=128, null=True, verbose_name='支付第3方订单号')),
('order_number', models.CharField(max_length=128, unique=True, verbose_name='订单号')),
('actual_amount', models.FloatField(verbose_name='实付金额')),
('status', models.SmallIntegerField(
choices=[(0, '交易成功'), (1, '待支付'), (2, '退费申请中'), (3, '已退费'), (4, '主动取消'), (5, '超时取消')],
verbose_name='状态')),
('order_type',
models.SmallIntegerField(choices=[(0, '用户下单'), (1, '后台充值')], default=0, verbose_name='订单类型')),
('date', models.DateTimeField(auto_now_add=True, verbose_name='订单生成时间')),
('pay_time', models.DateTimeField(blank=True, null=True, verbose_name='付款时间')),
('cancel_time', models.DateTimeField(blank=True, null=True, verbose_name='订单取消时间')),
(
'account',
models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
]