<gh_stars>0
# Generated by Django 3.2.8 on 2021-11-18 14:42

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CustomField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('creator', models.CharField(max_length=50)),
                ('gmt_created', models.DateTimeField(auto_now_add=True)),
                ('gmt_modified', models.DateTimeField(auto_now=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('workflow_id', models.IntegerField()),
                ('field_type_id', models.IntegerField()),
                ('field_key', models.CharField(max_length=50)),
                ('field_name', models.CharField(max_length=50)),
                ('order_id', models.IntegerField(default=0)),
                ('default_value', models.CharField(blank=True, max_length=100, null=True)),
                ('description', models.CharField(blank=True, default='', max_length=100)),
                ('field_template', models.TextField(blank=True, default='')),
                ('boolean_field_display', models.CharField(blank=True, default='{}', max_length=100)),
                ('field_choice', models.CharField(blank=True, default='{}', max_length=1000)),
                ('label', models.CharField(blank=True, default='{}', max_length=100)),
            ],
            options={
                'verbose_name': '工作流自定义字段',
                'verbose_name_plural': '工作流自定义字段',
            },
        ),
        migrations.CreateModel(
            name='CustomNotice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('creator', models.CharField(max_length=50)),
                ('gmt_created', models.DateTimeField(auto_now_add=True)),
                ('gmt_modified', models.DateTimeField(auto_now=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(blank=True, max_length=100, null=True)),
                ('hook_url', models.CharField(blank=True, max_length=100, null=True)),
                ('hook_token', models.CharField(blank=True, max_length=100, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='State',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('creator', models.CharField(max_length=50)),
                ('gmt_created', models.DateTimeField(auto_now_add=True)),
                ('gmt_modified', models.DateTimeField(auto_now=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50)),
                ('workflow_id', models.IntegerField()),
                ('is_hidden', models.BooleanField(default=False)),
                ('order_id', models.IntegerField(default=0)),
                ('type_id', models.IntegerField(default=0)),
                ('enable_retreat', models.BooleanField(default=False)),
                ('remember_last_man_enable', models.BooleanField(default=False)),
                ('participant_type_id', models.IntegerField(blank=True, default=1)),
                ('participant', models.CharField(blank=True, default='', max_length=1000)),
                ('distribute_type_id', models.IntegerField(default=1)),
                ('state_field_str', models.TextField(default='{}')),
                ('label', models.CharField(default='{}', max_length=1000)),
            ],
            options={
                'verbose_name': '工作流状态',
                'verbose_name_plural': '工作流状态',
            },
        ),
        migrations.CreateModel(
            name='Transition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('creator', models.CharField(max_length=50)),
                ('gmt_created', models.DateTimeField(auto_now_add=True)),
                ('gmt_modified', models.DateTimeField(auto_now=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50)),
                ('workflow_id', models.IntegerField()),
                ('transition_type_id', models.IntegerField(default=1)),
                ('timer', models.IntegerField(default=0)),
                ('source_state_id', models.IntegerField()),
                ('destination_state_id', models.IntegerField()),
                ('condition_expression', models.CharField(default='[]', max_length=1000)),
                ('attribute_type_id', models.IntegerField(default=1)),
                ('field_require_check', models.BooleanField(default=True)),
                ('alert_enable', models.BooleanField(default=False)),
                ('alert_text', models.CharField(blank=True, default='', max_length=100)),
            ],
            options={
                'verbose_name': '工作流流转',
                'verbose_name_plural': '工作流流转',
            },
        ),
        migrations.CreateModel(
            name='Workflow',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('creator', models.CharField(max_length=50)),
                ('gmt_created', models.DateTimeField(auto_now_add=True)),
                ('gmt_modified', models.DateTimeField(auto_now=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=50)),
                ('notices', models.CharField(blank=True, default='', max_length=50)),
                ('view_permission_check', models.BooleanField(default=True)),
                ('limit_expression', models.CharField(blank=True, default='{}', max_length=1000)),
                ('display_form_str', models.CharField(blank=True, default='[]', max_length=10000)),
                ('title_template', models.CharField(blank=True, default='你有一个待办工单:{title}', max_length=50, null=True)),
                ('content_template', models.CharField(blank=True, default='标题:{title}, 创建时间:{gmt_created}', max_length=1000, null=True)),
            ],
            options={
                'verbose_name': '工作流',
                'verbose_name_plural': '工作流',
            },
        ),
        migrations.CreateModel(
            name='WorkflowScript',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('creator', models.CharField(max_length=50)),
                ('gmt_created', models.DateTimeField(auto_now_add=True)),
                ('gmt_modified', models.DateTimeField(auto_now=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50)),
                ('saved_name', models.FileField(upload_to=workflow.models.upload_workflow_script)),
                ('description', models.CharField(blank=True, max_length=100, null=True)),
                ('is_active', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': '工作流脚本',
                'verbose_name_plural': '工作流脚本',
            },
        ),
        migrations.CreateModel(
            name='WorkflowAdmin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('creator', models.CharField(max_length=50)),
                ('gmt_created', models.DateTimeField(auto_now_add=True)),
                ('gmt_modified', models.DateTimeField(auto_now=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('username', models.CharField(max_length=100)),
                ('workflow', models.ForeignKey(db_constraint=False, on_delete=django.db.models.deletion.CASCADE, to='workflow.workflow')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
