# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2019-03-06 14:25
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='Consumer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('private_key', models.CharField(max_length=600)),
                ('public_key', models.CharField(max_length=600)),
            ],
            options={
                'db_table': 't_sso_consumer',
            },
        ),
        migrations.CreateModel(
            name='Token',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('userid', models.IntegerField(verbose_name='用户id')),
                ('request_token', models.CharField(blank=True, max_length=600, null=True, verbose_name='请求token')),
                ('access_token', models.CharField(blank=True, max_length=600, null=True, verbose_name='ͨ通过token')),
                ('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='')),
                ('consumer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sso_server.Consumer')),
            ],
            options={
                'db_table': 't_sso_token',
            },
        ),
    ]
