# Generated by Django 2.1.5 on 2019-04-29 15:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('orgs', '0006_auto_20190429_2326'),
        ('authtoken', '0002_auto_20160226_1747'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='PrivateToken',
            fields=[
                ('token_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='authtoken.Token')),
            ],
            options={
                'managed': False,
                'verbose_name': 'Private Token',
            },
            bases=('authtoken.token',),
        ),
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('file', models.FileField(upload_to=common.utils.upload_file_path, verbose_name='')),
                ('filename', models.CharField(max_length=256, verbose_name='原附件名称')),
                ('filesize', models.IntegerField(verbose_name='文件大小')),
                ('orgin', models.CharField(max_length=256, null=True, verbose_name='来源')),
                ('type', models.CharField(max_length=64, null=True)),
                ('created_by', models.ForeignKey(on_delete=models.SET(-999), to=settings.AUTH_USER_MODEL)),
                ('org', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orgs.Organization')),
            ],
            options={
                'verbose_name': '附件表',
                'db_table': 'attachments',
            },
        ),
    ]
