dynamicweb/hosting/migrations/0050_monthlyhostingbill.py
2019-04-03 06:13:12 +02:00

42 lines
2 KiB
Python

# -*- 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),
),
]