# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-07-10 09:27
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='GblProcess',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('process_id', models.CharField(help_text=b'Process ID', max_length=50, unique=True)),
                ('job_id', models.CharField(help_text=b'Request ID', max_length=50)),
                ('exec_program', models.CharField(help_text=b'Exec Program', max_length=60)),
                ('exec_userid', models.CharField(help_text=b'Exec UserId', max_length=50)),
                ('exec_start_dttm', models.DateTimeField(blank=True, help_text=b'Start DateTime', null=True)),
                ('exec_end_dttm', models.DateTimeField(blank=True, help_text=b'End DateTime', null=True)),
                ('exec_status', models.CharField(choices=[(b'SUCCESS', b'SUCCESS'), (b'WARNING', b'WARNING'), (b'ERROR', b'ERROR'), (b'CANCELLED', b'CANCELLED'), (b'RUNNING', b'RUNNING'), (b'QUEUED', b'QUEUED')], help_text=b'Status', max_length=10)),
                ('exec_params', models.CharField(help_text=b'Exec Params', max_length=400)),
            ],
            options={
                'db_table': 'gbl_process',
            },
        ),
        migrations.CreateModel(
            name='GblProcMsgLog',
            fields=[
                ('tracking_id', models.AutoField(help_text=b'Tracking ID', primary_key=True, serialize=False)),
                ('request_id', models.CharField(help_text=b'Request ID', max_length=20)),
                ('message_set', models.CharField(help_text=b'Message Set', max_length=20)),
                ('message_id', models.CharField(help_text=b'Message ID', max_length=20)),
                ('severity', models.CharField(help_text=b'Severity', max_length=10)),
                ('message_text', models.CharField(help_text=b'Text Message', max_length=50)),
                ('explanation', models.CharField(help_text=b'Explanation', max_length=1024, verbose_name=b'Explanation')),
                ('process_id', models.ForeignKey(help_text=b'Process ID_ID', on_delete=django.db.models.deletion.CASCADE, to='jobs.GblProcess')),
            ],
            options={
                'db_table': 'gbl_proc_msg_log',
            },
        ),
        migrations.CreateModel(
            name='ImportRequestDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('process_options', models.CharField(choices=[(b'Import Only', b'Import Only'), (b'Purge Only', b'Purge Only'), (b'Purge & Import', b'Purge & Import')], default=b'Import Only', help_text=b'Request Process Options', max_length=20)),
                ('calendar_id', models.CharField(blank=True, help_text=b'Calendar ID', max_length=30, null=True)),
                ('year', models.CharField(blank=True, help_text=b'Year', max_length=4, null=True)),
                ('cutoff_date', models.DateField(blank=True, help_text=b'Cut Off Date', null=True)),
                ('import_id', models.CharField(blank=True, help_text=b'Import ID', max_length=110, null=True)),
                ('import_data_error', models.BooleanField(default=False, help_text=b'Do not import data on error or warning')),
                ('data_type', models.CharField(blank=True, choices=[(b'Cashbook Transactions', b'Cashbook Transactions'), (b'Custodial Transactions', b'Custodial Transactions'), (b'Break Transactions', b'Break Transactions')], help_text=b'Data Type', max_length=40, null=True)),
            ],
            options={
                'db_table': 'imp_request_detail',
            },
        ),
        migrations.CreateModel(
            name='ImportRequestDetailGrid',
            fields=[
                ('id', models.AutoField(help_text=b'Sequence Number', primary_key=True, serialize=False)),
                ('format_id', models.CharField(help_text=b'Format ID', max_length=20)),
                ('data_type', models.CharField(blank=True, help_text=b'Data Type', max_length=40, null=True)),
                ('file_path', models.TextField(help_text=b'File Location')),
                ('file_name', models.CharField(help_text=b'File Name', max_length=100)),
                ('archive_method', models.CharField(choices=[(b'Move', b'Move'), (b'Copy', b'Copy'), (b'Delete', b'Delete')], default=b'Move', help_text=b'Archive Method', max_length=8)),
                ('archive_path', models.TextField(blank=True, help_text=b'Archive Location', null=True)),
                ('sheet_name', models.CharField(default=b'Sheet1', help_text=b'Sheet Name', max_length=20)),
                ('header_row', models.IntegerField(default=1, help_text=b'Header Row')),
                ('skip_row_top', models.IntegerField(default=0, help_text=b'Skip Row Top')),
                ('skip_row_bottom', models.IntegerField(default=0, help_text=b'Skip Row Bottom')),
            ],
            options={
                'db_table': 'imp_request_detail_grid',
            },
        ),
        migrations.CreateModel(
            name='JobMessageHdr',
            fields=[
                ('id', models.AutoField(help_text=b'ID', primary_key=True, serialize=False)),
                ('message_set', models.CharField(help_text=b'Message Set', max_length=10)),
                ('set_description', models.CharField(help_text=b'Description', max_length=30)),
                ('audit_name', models.CharField(help_text=b'Audit Name', max_length=30, null=True)),
                ('audit_dttm', models.DateTimeField(blank=True, help_text=b'Audit DateTime', null=True)),
            ],
            options={
                'db_table': 'gbl_messages_hdr',
            },
        ),
        migrations.CreateModel(
            name='JobMessagesDtl',
            fields=[
                ('id', models.AutoField(help_text=b'Sequence ID', primary_key=True, serialize=False)),
                ('message_id', models.CharField(help_text=b'Message ID', max_length=50)),
                ('status', models.CharField(choices=[(b'Active', b'Active'), (b'Inactive', b'Inactive')], default=b'Active', help_text=b'Status', max_length=10)),
                ('severity', models.CharField(choices=[(b'Success', b'Success'), (b'Warning', b'Warning'), (b'Error', b'Error')], default=b'Success', help_text=b'Severity', max_length=10)),
                ('broadcast', models.CharField(help_text=b'Broadcast', max_length=50)),
                ('message_text', models.CharField(help_text=b'Message', max_length=50)),
                ('explanation', models.CharField(help_text=b'Explanation', max_length=1024)),
                ('message_set', models.ForeignKey(help_text=b'MessageSet_ID', on_delete=django.db.models.deletion.CASCADE, related_name='message_dtl', to='jobs.JobMessageHdr')),
            ],
            options={
                'db_table': 'sunrise_contrb_job_message_dtl',
            },
        ),
        migrations.CreateModel(
            name='ReqHeader',
            fields=[
                ('id', models.AutoField(help_text=b'ID', primary_key=True, serialize=False)),
                ('request_nm', models.CharField(help_text=b'Request ID', max_length=50)),
                ('description', models.CharField(help_text=b'Description:', max_length=20)),
                ('type', models.CharField(choices=[(b'Private', b'Private'), (b'Public', b'Public')], default=b'Private', help_text=b'Type:', max_length=20)),
                ('status', models.CharField(choices=[(b'Active', b'Active'), (b'Inactive', b'Inactive')], default=b'Active', help_text=b'Status', max_length=20)),
                ('hide', models.CharField(blank=True, choices=[(b'Y', b'Yes'), (b'N', b'No')], default=b'N', help_text=b'', max_length=3, null=True)),
                ('program_id', models.CharField(help_text=b'Program ID', max_length=50)),
                ('schedule_request', models.BooleanField(default=False, help_text=b'Schedule Request')),
                ('schedule_next', models.BooleanField(default=False, help_text=b'Schedule Next Request When')),
                ('start_date', models.DateTimeField(blank=True, help_text=b'Start Date', null=True)),
                ('start_time', models.TimeField(blank=True, help_text=b'Start Time', null=True)),
                ('end_date', models.DateTimeField(blank=True, help_text=b'End Date', null=True)),
                ('end_time', models.TimeField(blank=True, help_text=b'End Time', null=True)),
                ('run_clndr_id', models.CharField(blank=True, help_text=b'Run On Calendar', max_length=50, null=True)),
                ('run_sch_days', models.IntegerField(blank=True, help_text=b'Run on Schedule Days', null=True)),
                ('no_run_clndr_id', models.CharField(blank=True, help_text=b'Do Not Run On Calendar', max_length=50, null=True)),
                ('no_run_clndr_year', models.CharField(blank=True, help_text=b'Do Not Run On Calendar year', max_length=5, null=True)),
                ('no_run_sch_days', models.IntegerField(blank=True, help_text=b'Do Not Run on Schedule Days', null=True)),
                ('clndr_conflict_res', models.CharField(blank=True, help_text=b'Calendar Conflict Result', max_length=5, null=True)),
                ('audit_name', models.CharField(help_text=b'Audit Name', max_length=30)),
                ('audit_dttm', models.DateTimeField(help_text=b'Audit DateTime')),
                ('run_name', models.CharField(blank=True, help_text=b'Last Run By', max_length=30, null=True)),
                ('run_dttm', models.DateTimeField(blank=True, help_text=b'Last Run DateTime', null=True)),
            ],
            options={
                'db_table': 'sunrise_contrb_job',
            },
        ),
        migrations.CreateModel(
            name='RequestBroadcast',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_type', models.CharField(choices=[(b'USER', b'USER'), (b'ROLE', b'ROLE')], default=b'USER', help_text=b'ID Type', max_length=6)),
                ('broadcast_rcpt', models.CharField(help_text=b'Broadcast ID', max_length=50)),
                ('error', models.BooleanField(default=False, help_text=b'On Error')),
                ('warning', models.BooleanField(default=False, help_text=b'On Warning')),
                ('success', models.BooleanField(default=False, help_text=b'On Success')),
                ('disabled', models.BooleanField(default=False, help_text=b'Disabled')),
                ('request_id', models.ForeignKey(help_text=b'Job ID_ID', on_delete=django.db.models.deletion.CASCADE, to='jobs.ReqHeader')),
            ],
            options={
                'db_table': 'sunrise_contrb_job_broadcast',
            },
        ),
        migrations.AlterUniqueTogether(
            name='reqheader',
            unique_together=set([('request_nm', 'type', 'program_id')]),
        ),
        migrations.AddField(
            model_name='importrequestdetailgrid',
            name='request_id',
            field=models.ForeignKey(help_text=b'Job ID', on_delete=django.db.models.deletion.CASCADE, to='jobs.ReqHeader'),
        ),
        migrations.AddField(
            model_name='importrequestdetail',
            name='request_id',
            field=models.ForeignKey(help_text=b'Request ID_ID', on_delete=django.db.models.deletion.CASCADE, to='jobs.ReqHeader'),
        ),
    ]
