# Generated by Django 3.0.6 on 2020-05-09 09:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('begin', models.DateField(blank=True, null=True, verbose_name='begin date')),
                ('end', models.DateField(blank=True, null=True, verbose_name='end date')),
                ('creator', models.CharField(blank=True, max_length=20, null=True, verbose_name='creator')),
                ('modifier', models.CharField(blank=True, max_length=20, null=True, verbose_name='modifier')),
                ('creation', models.DateTimeField(auto_now_add=True, null=True, verbose_name='creation')),
                ('modification', models.DateTimeField(auto_now=True, null=True, verbose_name='modification')),
                ('code', models.CharField(blank=True, max_length=20, null=True, verbose_name='organ code')),
                ('name', models.CharField(max_length=120, verbose_name='organ name')),
                ('short', models.CharField(blank=True, max_length=20, null=True, verbose_name='short name')),
                ('pinyin', models.CharField(blank=True, max_length=120, null=True, verbose_name='pinyin')),
                ('status', models.BooleanField(default=True, verbose_name='in use')),
                ('tax_num', models.CharField(blank=True, max_length=40, null=True, verbose_name='tax num')),
                ('tax_address', models.CharField(blank=True, max_length=40, null=True, verbose_name='tax address')),
                ('tax_account', models.CharField(blank=True, max_length=80, null=True, verbose_name='tax account')),
                ('represent', models.CharField(blank=True, max_length=40, null=True, verbose_name='representative ')),
                ('address', models.CharField(blank=True, max_length=120, null=True, verbose_name='address')),
                ('zipcode', models.CharField(blank=True, max_length=8, null=True, verbose_name='zipcode')),
                ('fax', models.CharField(blank=True, max_length=20, null=True, verbose_name='fax')),
                ('contacts', models.CharField(blank=True, max_length=40, null=True, verbose_name='contacts')),
                ('phone', models.CharField(blank=True, max_length=40, null=True, verbose_name='phone')),
                ('website', models.CharField(blank=True, max_length=40, null=True, verbose_name='website')),
                ('email', models.CharField(blank=True, max_length=40, null=True, verbose_name='email')),
                ('lic_code', models.CharField(blank=True, max_length=40, null=True, verbose_name='license code')),
                ('cer_code', models.CharField(blank=True, max_length=40, null=True, verbose_name='certificate code')),
                ('license', models.FileField(blank=True, null=True, upload_to='organ', verbose_name='business license')),
                ('certificate', models.FileField(blank=True, null=True, upload_to='organ', verbose_name='organization code certificate')),
                ('weight', models.IntegerField(default=9, verbose_name='weight')),
            ],
            options={
                'verbose_name': 'organization',
                'verbose_name_plural': 'organization',
            },
        ),
        migrations.CreateModel(
            name='OrgUnit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('begin', models.DateField(blank=True, null=True, verbose_name='begin date')),
                ('end', models.DateField(blank=True, null=True, verbose_name='end date')),
                ('creator', models.CharField(blank=True, max_length=20, null=True, verbose_name='creator')),
                ('modifier', models.CharField(blank=True, max_length=20, null=True, verbose_name='modifier')),
                ('creation', models.DateTimeField(auto_now_add=True, null=True, verbose_name='creation')),
                ('modification', models.DateTimeField(auto_now=True, null=True, verbose_name='modification')),
                ('code', models.CharField(blank=True, max_length=8, null=True, verbose_name='code')),
                ('name', models.CharField(max_length=120, verbose_name='name')),
                ('short', models.CharField(blank=True, max_length=20, null=True, verbose_name='short name')),
                ('pinyin', models.CharField(blank=True, max_length=120, null=True, verbose_name='pinyin')),
                ('unit_type', models.IntegerField(choices=[(1, 'BRANCH'), (2, 'DEPARTMENT'), (3, 'OFFICE'), (4, 'TEAM'), (5, 'COMMITTEE')], default=2, verbose_name='type')),
                ('status', models.BooleanField(default=True, verbose_name='in use')),
                ('virtual', models.BooleanField(default=False, verbose_name='is virtual')),
                ('fax', models.CharField(blank=True, max_length=20, null=True, verbose_name='fax')),
                ('phone', models.CharField(blank=True, max_length=40, null=True, verbose_name='phone')),
                ('contacts', models.CharField(blank=True, max_length=40, null=True, verbose_name='contacts')),
                ('email', models.CharField(blank=True, max_length=40, null=True, verbose_name='email')),
                ('weight', models.IntegerField(default=99, verbose_name='weight')),
                ('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organ.Organization', verbose_name='organization')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organ.OrgUnit', verbose_name='parent')),
            ],
            options={
                'verbose_name': 'org unit',
                'verbose_name_plural': 'org unit',
            },
        ),
        migrations.CreateModel(
            name='Position',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('begin', models.DateField(blank=True, null=True, verbose_name='begin date')),
                ('end', models.DateField(blank=True, null=True, verbose_name='end date')),
                ('creator', models.CharField(blank=True, max_length=20, null=True, verbose_name='creator')),
                ('modifier', models.CharField(blank=True, max_length=20, null=True, verbose_name='modifier')),
                ('creation', models.DateTimeField(auto_now_add=True, null=True, verbose_name='creation')),
                ('modification', models.DateTimeField(auto_now=True, null=True, verbose_name='modification')),
                ('code', models.CharField(blank=True, max_length=8, null=True, verbose_name='position code')),
                ('name', models.CharField(max_length=120, verbose_name='position name')),
                ('short', models.CharField(blank=True, max_length=20, null=True, verbose_name='short name')),
                ('pinyin', models.CharField(blank=True, max_length=120, null=True, verbose_name='pinyin')),
                ('series', models.CharField(choices=[('A', '管理/行政类'), ('S', '营销/市场类'), ('T', '技术/研发类'), ('P', '生产/操作类')], default='A', max_length=1, verbose_name='position series')),
                ('grade', models.CharField(choices=[('01', '员级'), ('02', '初级'), ('03', '中级'), ('04', '高级'), ('05', '专家')], default='01', max_length=2, verbose_name='position grade')),
                ('virtual', models.BooleanField(default=False, verbose_name='is virtual')),
                ('status', models.BooleanField(default=True, verbose_name='in use')),
                ('description', models.TextField(blank=True, null=True, verbose_name='position description')),
                ('qualification', models.TextField(blank=True, null=True, verbose_name='qualification')),
                ('document', models.FileField(blank=True, null=True, upload_to='', verbose_name='reference')),
                ('weight', models.IntegerField(default=99, verbose_name='weight')),
                ('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organ.Organization', verbose_name='organization')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organ.Position', verbose_name='parent')),
                ('unit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organ.OrgUnit', verbose_name='org unit')),
            ],
            options={
                'verbose_name': 'position',
                'verbose_name_plural': 'position',
            },
        ),
    ]
