# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-27 17:38
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    replaces = [('billing', '0001_initial'), ('billing', '0002_auto_20150917_1445'), ('billing', '0003_auto_20150917_1457'), ('billing', '0004_auto_20150917_1521')]

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('trans', '0045_auto_20150916_1007'),
    ]

    operations = [
        migrations.CreateModel(
            name='Billing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Plan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('price', models.IntegerField()),
                ('limit_strings', models.IntegerField(default=0)),
                ('limit_languages', models.IntegerField(default=0)),
                ('limit_repositories', models.IntegerField(default=0)),
                ('limit_projects', models.IntegerField(default=0)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='billing',
            name='plan',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='billing.Plan'),
        ),
        migrations.AddField(
            model_name='billing',
            name='projects',
            field=models.ManyToManyField(blank=True, to='trans.Project'),
        ),
        migrations.AddField(
            model_name='billing',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterModelOptions(
            name='plan',
            options={'ordering': ['price']},
        ),
        migrations.AddField(
            model_name='plan',
            name='yearly_price',
            field=models.IntegerField(default=0),
        ),
        migrations.AlterField(
            model_name='plan',
            name='price',
            field=models.IntegerField(default=0),
        ),
    ]
