<reponame>water-law/waterlawblog
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2019-10-15 13:59
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AliyunAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='阿里云用户名')),
                ('app_id', models.CharField(editable=False, max_length=64, verbose_name='阿里云app_id')),
                ('app_secret', models.CharField(editable=False, max_length=64, verbose_name='阿里云app_secret')),
            ],
        ),
        migrations.CreateModel(
            name='SmsMessage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone_numbers', models.CharField(max_length=30, verbose_name='短信接收号码')),
                ('params', models.TextField(blank=True, verbose_name='消息参数')),
                ('up_extend_code', models.CharField(blank=True, max_length=20, verbose_name='上行短信扩展码')),
                ('out_id', models.CharField(blank=True, max_length=30, verbose_name='外部流水扩展字段')),
                ('code', models.CharField(max_length=20, verbose_name='短信接口返回码')),
                ('created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='SmsSign',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('signature', models.CharField(max_length=30, verbose_name='签名')),
                ('sign_type', models.SmallIntegerField(choices=[(1, '验证码或短信通知'), (2, '推广短信或群发助手')], default=1, verbose_name='签名类型')),
                ('price', models.FloatField(verbose_name='每条短信的价格')),
                ('sign_use', models.SmallIntegerField(choices=[(1, '签名为自己产品名／网站名'), (2, '签名为他人产品名／网站名')], default=1, verbose_name='签名用途')),
                ('enabled', models.BooleanField(default=True, verbose_name='是否启用')),
            ],
        ),
        migrations.CreateModel(
            name='SmsTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='模版名称')),
                ('template_code', models.CharField(max_length=30, verbose_name='模版CODE')),
                ('template_type', models.SmallIntegerField(choices=[(1, '验证码'), (2, '短信通知')], default=1, verbose_name='模版类型')),
                ('price', models.FloatField(verbose_name='每条短信的价格')),
                ('params', models.TextField(blank=True, verbose_name='模板参数')),
                ('content', models.TextField(blank=True, verbose_name='模版内容')),
                ('enabled', models.BooleanField(default=True, verbose_name='是否启用')),
            ],
        ),
        migrations.AddField(
            model_name='smsmessage',
            name='sign',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='misaka.SmsSign', verbose_name='短信签名'),
        ),
        migrations.AddField(
            model_name='smsmessage',
            name='template',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='misaka.SmsTemplate', verbose_name='短信模板'),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2019-10-15 13:59
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AliyunAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='阿里云用户名')),
                ('app_id', models.CharField(editable=False, max_length=64, verbose_name='阿里云app_id')),
                ('app_secret', models.CharField(editable=False, max_length=64, verbose_name='阿里云app_secret')),
            ],
        ),
        migrations.CreateModel(
            name='SmsMessage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone_numbers', models.CharField(max_length=30, verbose_name='短信接收号码')),
                ('params', models.TextField(blank=True, verbose_name='消息参数')),
                ('up_extend_code', models.CharField(blank=True, max_length=20, verbose_name='上行短信扩展码')),
                ('out_id', models.CharField(blank=True, max_length=30, verbose_name='外部流水扩展字段')),
                ('code', models.CharField(max_length=20, verbose_name='短信接口返回码')),
                ('created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='SmsSign',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('signature', models.CharField(max_length=30, verbose_name='签名')),
                ('sign_type', models.SmallIntegerField(choices=[(1, '验证码或短信通知'), (2, '推广短信或群发助手')], default=1, verbose_name='签名类型')),
                ('price', models.FloatField(verbose_name='每条短信的价格')),
                ('sign_use', models.SmallIntegerField(choices=[(1, '签名为自己产品名／网站名'), (2, '签名为他人产品名／网站名')], default=1, verbose_name='签名用途')),
                ('enabled', models.BooleanField(default=True, verbose_name='是否启用')),
            ],
        ),
        migrations.CreateModel(
            name='SmsTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='模版名称')),
                ('template_code', models.CharField(max_length=30, verbose_name='模版CODE')),
                ('template_type', models.SmallIntegerField(choices=[(1, '验证码'), (2, '短信通知')], default=1, verbose_name='模版类型')),
                ('price', models.FloatField(verbose_name='每条短信的价格')),
                ('params', models.TextField(blank=True, verbose_name='模板参数')),
                ('content', models.TextField(blank=True, verbose_name='模版内容')),
                ('enabled', models.BooleanField(default=True, verbose_name='是否启用')),
            ],
        ),
        migrations.AddField(
            model_name='smsmessage',
            name='sign',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='misaka.SmsSign', verbose_name='短信签名'),
        ),
        migrations.AddField(
            model_name='smsmessage',
            name='template',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='misaka.SmsTemplate', verbose_name='短信模板'),
        ),
    ]
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2019-10-15 13:59