Add migration

This commit is contained in:
PCoder 2019-04-03 06:13:12 +02:00
parent 6d42f88be1
commit 0bc8c35031

View file

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2019-04-03 03:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import utils.mixins
class Migration(migrations.Migration):
dependencies = [
('membership', '0007_auto_20180213_0128'),
('hosting', '0049_auto_20181005_0736'),
]
operations = [
migrations.CreateModel(
name='MonthlyHostingBill',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', models.DateTimeField(help_text='When the invoice was created')),
('receipt_number', models.CharField(help_text='The receipt number that is generated on Stripe', max_length=100)),
('invoice_number', models.CharField(help_text='The invoice number that is generated on Stripe', max_length=100)),
('paid_at', models.DateTimeField(help_text='Date on which the bill was paid')),
('period_start', models.DateTimeField()),
('period_end', models.DateTimeField()),
('billing_reason', models.CharField(max_length=25)),
('discount', models.PositiveIntegerField()),
('total', models.IntegerField()),
('lines_data_count', models.IntegerField()),
('invoice_id', models.CharField(max_length=100, unique=True)),
('lines_meta_data_csv', models.TextField()),
('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='membership.StripeCustomer')),
('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hosting.HostingOrder')),
],
options={
'permissions': (('view_monthlyhostingbill', 'View Monthly Hosting'),),
},
bases=(utils.mixins.AssignPermissionsMixin, models.Model),
),
]