# Generated by Django 2.1.7 on 2020-12-21 18:17

import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0100_auto_20201219_1322'),
    ]

    operations = [
        migrations.CreateModel(
            name='WxOpenid',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('wx_openid', models.CharField(db_index=True, max_length=50, verbose_name='微信OpenID')),
                ('wx_nickname', models.CharField(db_index=True, max_length=100, verbose_name='微信昵称')),
                ('wx_headimgurl', models.CharField(max_length=400, verbose_name='微信头像')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wxopenid_company', to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '公司登录帐号OPENID',
                'verbose_name_plural': '公司登录帐号OPENID',
            },
        ),
        migrations.AddField(
            model_name='user',
            name='wxopenids',
            field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(verbose_name='使用过的OPENID'), blank=True, null=True, size=None),
        ),
        migrations.AlterUniqueTogether(
            name='wxopenid',
            unique_together={('company', 'wx_openid')},
        ),
    ]
