# Generated by Django 3.2.9 on 2021-12-05 09:29

from decimal import Decimal
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=10, unique=True, verbose_name='用户名')),
                ('password', models.CharField(max_length=20, verbose_name='密码')),
                ('avatar', models.ImageField(default='avatar/default.png', upload_to='', verbose_name='头像')),
                ('phoneNumber', models.CharField(default='', max_length=11, verbose_name='手机号码')),
                ('email', models.EmailField(default='', max_length=254, verbose_name='邮箱')),
                ('balance', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=12, verbose_name='余额')),
                ('registerDate', models.DateField(auto_now_add=True, verbose_name='创建时间')),
            ],
            options={
                'db_table': 'user',
            },
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='收货人姓名')),
                ('phoneNumber', models.CharField(max_length=11, verbose_name='手机号码')),
                ('address', models.TextField(verbose_name='收货地址')),
                ('username', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
            options={
                'db_table': 'address',
            },
        ),
    ]
