# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-12-28 13:46
from __future__ import unicode_literals

from django.db import migrations, models
import django_fsm


class Migration(migrations.Migration):

    dependencies = [
        ('support', '0033_issuestatus'),
    ]

    def bootstrap_default_statuses(apps, schema_editor):
        IssueStatus = apps.get_model('support', 'IssueStatus')

        class Types(object):
            RESOLVED = 0
            CANCELED = 1

        for status in ['Resolved', 'Closed', 'Completed', 'Done']:
            IssueStatus.objects.create(
                name=status,
                type=Types.RESOLVED
            )

        for status in ['Canceled', 'Declined']:
            IssueStatus.objects.create(
                name=status,
                type=Types.CANCELED
            )

    operations = [
        migrations.RunPython(bootstrap_default_statuses),
    ]
