# Generated by Django 2.1 on 2019-05-16 01:05

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='GiftCoupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('updated_time', models.DateTimeField(auto_now=True)),
                ('sender_msg', models.CharField(blank=True, max_length=100, verbose_name='메세지 입력')),
                ('receiver_name', models.CharField(max_length=15, verbose_name='받는 사람')),
                ('receiver_phone', models.CharField(blank=True, max_length=15, verbose_name='받는 사람 연락처')),
                ('receiver_email', models.CharField(max_length=50, verbose_name='받는 사람 이메일')),
                ('expire_date', models.DateField(verbose_name='쿠폰 만료일')),
                ('coupon_code', models.UUIDField(default=uuid.uuid4, editable=False, verbose_name='쿠폰번호')),
                ('price', models.PositiveIntegerField(verbose_name='금액')),
                ('is_used', models.BooleanField(default=False, verbose_name='사용함')),
                ('used_date', models.DateField(null=True, verbose_name='사용한 날짜')),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='보낸 사람')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserGiftCoupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('updated_time', models.DateTimeField(auto_now=True)),
                ('is_owner', models.BooleanField(default=True, verbose_name='쿠폰 사용가능자')),
                ('is_registrant', models.BooleanField(default=True, verbose_name='쿠폰 등록자')),
                ('gift_coupon', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='coupon.GiftCoupon', verbose_name='gift coupon')),
                ('prior_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='prior_user', to=settings.AUTH_USER_MODEL, verbose_name='양도 해준 사람')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user', to=settings.AUTH_USER_MODEL, verbose_name='쿠폰 사용자')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
