class Payment(BaseModel): """支付信息""" order = models.ForeignKey(OrderInfo, on_delete=models.CASCADE, verbose_name='订单') trade_id = models.CharField(max_length=100, unique=True, null=True, blank=True, verbose_name="支付编号") class Meta: db_table = 'tb_payment'
class Migration(migrations.Migration): dependencies = [ ('orders', '0006_auto_20200512_2019'), ] operations = [ migrations.AlterField( model_name='order', name='order_number', field=models.CharField( default=apps.orders.models.Order.short_order_number, max_length=30), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('carts', '0003_cart_products'), ] operations = [ migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('status', models.CharField( choices=[(apps.orders.models.OrderStatus['CREATED'], 'CREATED'), (apps.orders.models.OrderStatus['PAYED'], 'PAYED'), (apps.orders.models.OrderStatus['COMPLETED'], 'COMPLETED'), (apps.orders.models.OrderStatus['CANCELED'], 'CANCELED')], default=apps.orders.models.OrderStatus['CREATED'], max_length=50)), ('shipping_total', models.DecimalField(decimal_places=2, default=5, max_digits=8)), ('total', models.DecimalField(decimal_places=2, default=0, max_digits=8)), ('created_at', models.DateTimeField(auto_now_add=True)), ('cart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='carts.Cart')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=255, verbose_name='Title')), ('description', models.TextField(verbose_name='Description')), ('complete_to', models.DateTimeField(default=apps.orders.models.one_day_hence, verbose_name='Complete to')), ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')), ('updated_at', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated at')), ('completed_at', models.DateTimeField(blank=True, null=True, verbose_name='Completed at')), ], options={ 'verbose_name': 'Order', 'verbose_name_plural': 'Orders', 'db_table': 'orders', 'ordering': ('-created_at', ), }, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('products', '0001_initial'), ] operations = [ migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('first_name', models.CharField(max_length=50, verbose_name='voornaam')), ('last_name', models.CharField(max_length=50, verbose_name='achternaam')), ('email', models.EmailField(max_length=254, verbose_name='email')), ('address', models.CharField(max_length=250, verbose_name='adres')), ('postal_code', models.CharField(max_length=20, verbose_name='postcode')), ('city', models.CharField(max_length=100, verbose_name='plaats')), ], options={ 'verbose_name': 'Order', 'verbose_name_plural': 'Orders', }, ), migrations.CreateModel( name='OrderItem', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('custom_image', models.CharField(blank=True, max_length=200, null=True, verbose_name='nummer afbeelding')), ('custom_color', models.CharField(blank=True, max_length=200, null=True, verbose_name='nummer kleur')), ('product_name', models.CharField(blank=True, max_length=250, null=True, verbose_name='artikelnaam')), ('size', models.CharField(blank=True, max_length=100, null=True, verbose_name='kleur')), ('color', models.CharField(blank=True, max_length=100, null=True, verbose_name='postcode')), ('price', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='prijs')), ('quantity', models.PositiveIntegerField( default=1, validators=[ django.core.validators.MaxValueValidator(100000) ], verbose_name='aantal')), ('image', models.ImageField( upload_to=apps.orders.models.orders_image_upload, verbose_name='afbeelding')), ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='orders.Order', verbose_name='order')), ('product', models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='order_items', to='products.Product', verbose_name='artikel')), ], options={ 'verbose_name': 'Artikel', 'verbose_name_plural': 'Artikelen', }, ), ]