Пример #1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('user_type',
                 models.CharField(blank=True,
                                  choices=[('Student', 'Student'),
                                           ('School', 'School'),
                                           ('Blood Bank', 'Blood Bank'),
                                           ('Parent', 'Parent'),
                                           ('Hospital', 'Hospital'),
                                           ('Teacher', 'Teacher'),
                                           ('Community', 'Community'),
                                           ('Driver', 'Driver'),
                                           ('Hospital Staff', 'Hospital Staff')
                                           ],
                                  max_length=20,
                                  null=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Hospital',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('tahsil', models.CharField(max_length=100)),
                ('name', models.CharField(max_length=50)),
                ('key', models.CharField(max_length=50, null=True,
                                         unique=True)),
                ('state', models.CharField(max_length=50)),
                ('district', models.CharField(max_length=50)),
                ('mobile_number', models.BigIntegerField()),
                ('region', models.CharField(max_length=50)),
                ('latitude',
                 models.DecimalField(decimal_places=10, max_digits=15)),
                ('longitude',
                 models.DecimalField(decimal_places=10, max_digits=15)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('board', models.CharField(max_length=100)),
                ('address', models.TextField()),
                ('mobile_number', models.BigIntegerField()),
                ('state', models.CharField(max_length=50)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address', models.TextField()),
                ('mobile_number', models.BigIntegerField()),
                ('state', models.CharField(max_length=50)),
                ('school_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.School')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('father_name', models.CharField(max_length=50)),
                ('father_aadhar', models.BigIntegerField()),
                ('mobile_number', models.BigIntegerField()),
                ('address', models.TextField()),
                ('state', models.CharField(max_length=50)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Parent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('state', models.CharField(max_length=50)),
                ('mobile_number', models.BigIntegerField()),
                ('address', models.TextField()),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='HospitalStaff',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('hospital_name', models.CharField(max_length=100)),
                ('mobile_number', models.BigIntegerField()),
                ('state', models.CharField(max_length=50)),
                ('tahseel', models.CharField(max_length=50)),
                ('district', models.CharField(max_length=50)),
                ('region', models.CharField(max_length=50)),
                ('village', models.CharField(max_length=50)),
                ('latitude',
                 models.DecimalField(decimal_places=10, max_digits=15)),
                ('longitude',
                 models.DecimalField(decimal_places=10, max_digits=15)),
                ('staff_type',
                 models.CharField(choices=[('ward', 'ward'), ('lab', 'lab')],
                                  max_length=10)),
                ('hospital_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Hospital')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('dl_number', models.CharField(max_length=50)),
                ('driving_exp',
                 models.DecimalField(decimal_places=2, max_digits=15)),
                ('age', models.IntegerField()),
                ('photo', models.FileField(upload_to='drivers/')),
                ('mobile_number', models.BigIntegerField()),
                ('state', models.CharField(max_length=50)),
                ('district', models.CharField(max_length=50)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Community',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('service', models.CharField(max_length=100)),
                ('amb_number', models.CharField(max_length=50)),
                ('latitude',
                 models.DecimalField(decimal_places=10, max_digits=15)),
                ('longitude',
                 models.DecimalField(decimal_places=10, max_digits=15)),
                ('district', models.CharField(max_length=50)),
                ('address', models.TextField()),
                ('mobile_number', models.BigIntegerField()),
                ('state', models.CharField(max_length=50)),
                ('org_name', models.CharField(max_length=100)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='BloodBank',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('tahsil', models.CharField(max_length=50)),
                ('mobile_number', models.BigIntegerField()),
                ('address', models.TextField()),
                ('state', models.CharField(max_length=50)),
                ('district', models.CharField(max_length=50)),
                ('region', models.CharField(max_length=50)),
                ('latitude',
                 models.DecimalField(decimal_places=10, max_digits=15)),
                ('longitude',
                 models.DecimalField(decimal_places=10, max_digits=15)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('nombre', models.CharField(max_length=200)),
                ('password', models.CharField(max_length=256)),
                ('email',
                 models.CharField(max_length=200,
                                  primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('apellido', models.CharField(max_length=200)),
                ('telefono', models.CharField(max_length=200)),
                ('fecha_nac', models.DateTimeField()),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Paciente',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('dni', models.BigIntegerField()),
                ('email', models.CharField(max_length=200)),
                ('telefono', models.CharField(max_length=15)),
                ('nombre', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Pedido',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('fechaDePedido', models.DateTimeField()),
                ('montoTotal',
                 models.DecimalField(decimal_places=4, max_digits=19)),
                ('tipoDePago',
                 models.CharField(choices=[('CR', 'Tarjeta de Credito'),
                                           ('DB', 'Tarjeta de Debito'),
                                           ('VT', 'Billetera Virtual'),
                                           ('EF', 'Efectivo')],
                                  default='EF',
                                  max_length=2)),
                ('estado',
                 models.CharField(choices=[('PT', 'Pendiente'),
                                           ('PD', 'Pedido'),
                                           ('TL', 'Enviado a Taller'),
                                           ('FN', 'Finalizado')],
                                  default='PT',
                                  max_length=2)),
                ('paciente',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='optometria.paciente')),
            ],
        ),
        migrations.CreateModel(
            name='Producto',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=200)),
                ('tipo', models.CharField(max_length=200)),
                ('precio', models.DecimalField(decimal_places=2,
                                               max_digits=8)),
                ('distancia',
                 models.CharField(choices=[('LE', 'Lejos'), ('CE', 'Cerca')],
                                  default='LE',
                                  max_length=2)),
                ('lado',
                 models.CharField(choices=[('IQ', 'Izquierda'),
                                           ('DR', 'Derecha')],
                                  default='DR',
                                  max_length=2)),
                ('armazon', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Gerente',
            fields=[
                ('usuario',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='optometria.usuario')),
            ],
        ),
        migrations.CreateModel(
            name='PersonalMedico',
            fields=[
                ('usuario',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='optometria.usuario')),
            ],
        ),
        migrations.CreateModel(
            name='Secretaria',
            fields=[
                ('usuario',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='optometria.usuario')),
            ],
        ),
        migrations.CreateModel(
            name='Tecnico',
            fields=[
                ('usuario',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='optometria.usuario')),
            ],
        ),
        migrations.CreateModel(
            name='Vendedor',
            fields=[
                ('usuario',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='optometria.usuario')),
            ],
        ),
        migrations.CreateModel(
            name='Turno',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('fechaDeTurno', models.DateTimeField()),
                ('paciente',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='optometria.paciente')),
                ('secretaria',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='optometria.secretaria')),
            ],
        ),
        migrations.CreateModel(
            name='ProductoPedido',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('cantidad', models.IntegerField(default=1)),
                ('pedido',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='optometria.pedido')),
                ('producto',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='optometria.producto')),
            ],
        ),
        migrations.AddField(
            model_name='pedido',
            name='vendedor',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='optometria.vendedor'),
        ),
        migrations.CreateModel(
            name='HistorialMedico',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('paciente',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='optometria.paciente')),
                ('turno',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='optometria.turno')),
                ('personalMedico',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='optometria.personalmedico')),
            ],
        ),
    ]
Пример #3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('is_customer', models.BooleanField(default=False)),
                ('is_seller', models.BooleanField(default=False)),
                ('company_name', models.CharField(blank=True, max_length=50)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
            ],
            options={
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('image', models.ImageField(upload_to='product/images/')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200, unique=True)),
                ('description', models.TextField(max_length=4000)),
                ('quantity', models.IntegerField(default=1)),
                ('price', models.DecimalField(decimal_places=10, default=0.0, max_digits=19)),
                ('is_discontinued', models.BooleanField(default=False)),
                ('slug', models.SlugField(max_length=250, unique=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='product_category', to='cumba_api.category')),
                ('images', models.ManyToManyField(related_name='product_images', to='cumba_api.Image')),
                ('seller', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='product_seller', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('order_number', models.CharField(max_length=10)),
                ('date', models.DateTimeField(auto_now=True)),
                ('amount', models.DecimalField(decimal_places=10, default=0.0, max_digits=19)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='order_customer', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone', models.CharField(max_length=11)),
                ('address', models.TextField()),
                ('city', models.CharField(max_length=30)),
                ('state', models.CharField(max_length=30)),
                ('current', models.BooleanField(default=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customer_address', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=10, default=0.0, max_digits=19)),
                ('quantity', models.IntegerField(default=1)),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cart_order', to='cumba_api.order')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cart_product', to='cumba_api.product')),
            ],
            options={
                'unique_together': {('order', 'product')},
            },
        ),
    ]
Пример #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('role',
                 models.IntegerField(choices=[(1, 'owner'), (2, 'customer'),
                                              (3, 'Anonymous')],
                                     default=3)),
                ('age', models.IntegerField(default=10)),
                ('impf',
                 models.ImageField(default='Note.jpg', upload_to='Profiles/')),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=10)),
                ('first_name', models.CharField(max_length=100)),
                ('last_name', models.CharField(max_length=100)),
                ('phone_no', models.IntegerField(null=True)),
                ('car_regno', models.CharField(max_length=20)),
                ('address', models.CharField(max_length=200)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserService',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('car_make', models.CharField(max_length=100)),
                ('car_model', models.CharField(max_length=100)),
                ('service_type', models.CharField(max_length=100)),
                ('price', models.DecimalField(decimal_places=2, max_digits=6)),
                ('uid',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address', models.CharField(max_length=150)),
                ('phone', models.CharField(max_length=11)),
                ('choose', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'axf_address',
            },
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('num', models.IntegerField(default=1)),
                ('isChoose', models.BooleanField(default=True)),
            ],
            options={
                'db_table': 'axf_cart',
            },
        ),
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
            options={
                'db_table': 'axf_collection',
            },
        ),
        migrations.CreateModel(
            name='FoodTypes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('typeid', models.CharField(max_length=7)),
                ('typename', models.CharField(max_length=10)),
                ('childtypenames', models.CharField(max_length=200)),
                ('typesort', models.IntegerField()),
            ],
            options={
                'db_table': 'axf_foodtypes',
            },
        ),
        migrations.CreateModel(
            name='Goods',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('productid', models.CharField(max_length=10)),
                ('productimg', models.CharField(max_length=100)),
                ('productname', models.CharField(max_length=100)),
                ('productlongname', models.CharField(max_length=100)),
                ('isxf', models.BooleanField(default=False)),
                ('pmdesc', models.BooleanField(default=False)),
                ('specifics', models.CharField(max_length=20)),
                ('price', models.CharField(max_length=10)),
                ('marketprice', models.CharField(max_length=10)),
                ('categoryid', models.CharField(max_length=10)),
                ('childcid', models.CharField(max_length=10)),
                ('childcidname', models.CharField(max_length=20)),
                ('dealerid', models.CharField(max_length=10)),
                ('storenums', models.CharField(max_length=20)),
                ('productnum', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'axf_goods',
            },
        ),
        migrations.CreateModel(
            name='MainShow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('trackid', models.CharField(max_length=10)),
                ('name', models.CharField(max_length=100)),
                ('img', models.CharField(max_length=200)),
                ('categoryid', models.CharField(max_length=200)),
                ('brandname', models.CharField(max_length=200)),
                ('img1', models.CharField(max_length=200)),
                ('childcid1', models.CharField(max_length=200)),
                ('productid1', models.CharField(max_length=200)),
                ('longname1', models.CharField(max_length=200)),
                ('price1', models.CharField(max_length=20)),
                ('marketprice1', models.CharField(max_length=200)),
                ('img2', models.CharField(max_length=200)),
                ('childcid2', models.CharField(max_length=200)),
                ('productid2', models.CharField(max_length=200)),
                ('longname2', models.CharField(max_length=200)),
                ('price2', models.CharField(max_length=20)),
                ('marketprice2', models.CharField(max_length=200)),
                ('img3', models.CharField(max_length=200)),
                ('childcid3', models.CharField(max_length=200)),
                ('productid3', models.CharField(max_length=200)),
                ('longname3', models.CharField(max_length=200)),
                ('price3', models.CharField(max_length=20)),
                ('marketprice3', models.CharField(max_length=200)),
            ],
            options={
                'db_table': 'axf_mainshow',
            },
        ),
        migrations.CreateModel(
            name='MustBuy',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('img', models.CharField(max_length=100)),
                ('name', models.CharField(max_length=50)),
                ('trackid', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'axf_mustbuy',
            },
        ),
        migrations.CreateModel(
            name='Nav',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('img', models.CharField(max_length=100)),
                ('name', models.CharField(max_length=50)),
                ('trackid', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'axf_nav',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('money', models.DecimalField(decimal_places=2, max_digits=8)),
                ('status', models.IntegerField(default=0)),
                ('message', models.CharField(max_length=100)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('orderId', models.CharField(max_length=20)),
                ('address',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Address')),
            ],
            options={
                'db_table': 'axf_order',
            },
        ),
        migrations.CreateModel(
            name='OrderDetail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('goodsImg', models.CharField(max_length=200)),
                ('goodsName', models.CharField(max_length=100)),
                ('price', models.CharField(max_length=20)),
                ('num', models.IntegerField(default=1)),
                ('total', models.CharField(max_length=10)),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Order')),
            ],
            options={
                'db_table': 'axf_orderdetail',
            },
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('img', models.CharField(max_length=100)),
                ('name', models.CharField(max_length=50)),
                ('trackid', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'axf_shop',
            },
        ),
        migrations.CreateModel(
            name='Wheel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('img', models.CharField(max_length=100)),
                ('name', models.CharField(max_length=50)),
                ('trackid', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'axf_wheel',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('sex', models.BooleanField(default=True)),
                ('age', models.IntegerField(default=20)),
                ('icon', models.CharField(max_length=70)),
                ('phone', models.CharField(max_length=11)),
                ('isCheckBoxChoose', models.BooleanField(default=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'db_table': 'axf_user',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='collection',
            name='product_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='App.Goods'),
        ),
        migrations.AddField(
            model_name='collection',
            name='user_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='cart',
            name='goods',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='App.Goods'),
        ),
        migrations.AddField(
            model_name='cart',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='address',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('phone_number', models.CharField(max_length=255)),
                ('admin', models.BooleanField(default=False)),
                ('register_time', models.DateTimeField(auto_now=True)),
                ('first_name', models.CharField(max_length=255)),
                ('last_name', models.CharField(max_length=255)),
                ('birthday', models.DateField()),
                ('user_image', models.URLField()),
                ('validate_status', models.BooleanField(default=False)),
                ('validate_time', models.DateTimeField()),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address_line_1', models.CharField(max_length=255)),
                ('address_line_2', models.CharField(max_length=255)),
                ('city', models.CharField(max_length=255)),
                ('province', models.CharField(max_length=255)),
                ('country', models.CharField(max_length=255)),
                ('zip_code', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Community',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('category',
                 models.CharField(choices=[('product', 'Product'),
                                           ('service', 'Service'),
                                           ('expertise', 'Expertise')],
                                  max_length=9)),
                ('name', models.CharField(max_length=255)),
                ('image', models.URLField()),
                ('price', models.DecimalField(decimal_places=2,
                                              max_digits=10)),
                ('stock', models.IntegerField()),
                ('description', models.TextField()),
                ('discount',
                 models.DecimalField(decimal_places=2, max_digits=10)),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('time', models.DateTimeField(auto_now=True)),
                ('amount', models.IntegerField()),
                ('txid', models.CharField(max_length=255)),
                ('receiver_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='receiver_id',
                                   to=settings.AUTH_USER_MODEL)),
                ('sender_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='sender_id',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('user_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('status', models.CharField(max_length=255)),
                ('buyer_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='buyer_id',
                                   to=settings.AUTH_USER_MODEL)),
                ('item_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='reframery.item')),
                ('seller_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='seller_id',
                                   to=settings.AUTH_USER_MODEL)),
                ('transaction_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='reframery.transaction')),
            ],
        ),
        migrations.AddField(
            model_name='item',
            name='subcategory_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='reframery.subcategory'),
        ),
        migrations.AddField(
            model_name='item',
            name='user_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Feedback',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('rating', models.IntegerField()),
                ('created_time', models.DateTimeField(auto_now=True)),
                ('description', models.TextField()),
                ('item_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='reframery.item')),
                ('user_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='customuser',
            name='address',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='reframery.address'),
        ),
        migrations.AddField(
            model_name='customuser',
            name='community',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='reframery.community'),
        ),
        migrations.AddField(
            model_name='customuser',
            name='groups',
            field=models.ManyToManyField(
                blank=True,
                help_text=
                'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Group',
                verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='customuser',
            name='user_permissions',
            field=models.ManyToManyField(
                blank=True,
                help_text='Specific permissions for this user.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Permission',
                verbose_name='user permissions'),
        ),
    ]
Пример #7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'permissions': [('crud_users', 'Can modify any User')],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Weather',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=80, null=False)),
                ('description', models.CharField(max_length=254, null=False)),
            ],
        ),
        migrations.CreateModel(
            name='Activity',
            fields=[
                (
                    'id',
                    models.AutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID'),
                ),
                ('date', models.DateTimeField(null=False)),
                ('distance', models.PositiveIntegerField(null=False)),
                ('latitude',
                 models.DecimalField(null=True, decimal_places=6,
                                     max_digits=9)),
                ('longitude',
                 models.DecimalField(null=True, decimal_places=6,
                                     max_digits=9)),
                ('user',
                 models.ForeignKey(null=False,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('weather',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='api.Weather')),
            ],
            options={
                'permissions':
                [('crud_others_activities',
                  'Can change the any activity (owned by other user)')],
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('is_student',
                 models.BooleanField(default=False,
                                     verbose_name='student status')),
                ('is_teacher',
                 models.BooleanField(default=False,
                                     verbose_name='teacher status')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Applicant',
            fields=[
                ('applId',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   primary_key=True,
                                   serialize=False,
                                   to=settings.AUTH_USER_MODEL)),
                ('DOB', models.DateField(default=None, null=True)),
                ('mobile', models.CharField(default='', max_length=10)),
                ('gender', models.CharField(default='', max_length=6)),
                ('parent_guardianName',
                 models.CharField(default='', max_length=20)),
                ('parent_guardianEmail',
                 models.EmailField(default='', max_length=254)),
                ('parent_guardianMobile',
                 models.CharField(default='', max_length=10)),
                ('father_occ', models.CharField(default='', max_length=10)),
                ('mother_occ', models.CharField(default='', max_length=10)),
                ('family_ann_inc', models.CharField(default='',
                                                    max_length=20)),
                ('relation', models.CharField(default='', max_length=10)),
                ('pwd', models.BooleanField(default=False)),
                ('mother_tongue', models.CharField(default='', max_length=15)),
                ('defence_type', models.CharField(default='', max_length=15)),
                ('religion', models.CharField(default='', max_length=15)),
                ('addr_line_1', models.TextField()),
                ('state', models.CharField(default='', max_length=10)),
                ('country', models.CharField(default='India', max_length=10)),
                ('district', models.CharField(default='', max_length=10)),
                ('pincode', models.CharField(default='', max_length=10)),
                ('nationality',
                 models.CharField(default='Indian', max_length=10)),
                ('ssc_aggregate_marks',
                 models.DecimalField(decimal_places=2,
                                     default=None,
                                     max_digits=5,
                                     null=True)),
                ('ssc_marks_out_of',
                 models.DecimalField(decimal_places=2,
                                     default=None,
                                     max_digits=5,
                                     null=True)),
                ('ssc_year', models.CharField(default='', max_length=10)),
                ('ssc_board', models.CharField(default='', max_length=10)),
                ('hsc_aggregate_marks',
                 models.DecimalField(decimal_places=2,
                                     default=None,
                                     max_digits=5,
                                     null=True)),
                ('hsc_marks_out_of',
                 models.DecimalField(decimal_places=2,
                                     default=None,
                                     max_digits=5,
                                     null=True)),
                ('hsc_physics_marks',
                 models.DecimalField(decimal_places=2,
                                     default=None,
                                     max_digits=5,
                                     null=True)),
                ('hsc_math_marks',
                 models.DecimalField(decimal_places=2,
                                     default=None,
                                     max_digits=5,
                                     null=True)),
                ('hsc_chemistry_marks',
                 models.DecimalField(decimal_places=2,
                                     default=None,
                                     max_digits=5,
                                     null=True)),
                ('hsc_year', models.CharField(default='', max_length=10)),
                ('hsc_board', models.CharField(default='', max_length=10)),
                ('SET', models.IntegerField(default=None, null=True)),
                ('cet', models.IntegerField(default=None, null=True)),
                ('cet_maths', models.IntegerField(default=None, null=True)),
                ('cet_physics', models.IntegerField(default=None, null=True)),
                ('cet_chemistry', models.IntegerField(default=None,
                                                      null=True)),
                ('jee_mains', models.IntegerField(default=None, null=True)),
                ('jee_adv', models.IntegerField(default=None, null=True)),
                ('candidate_photo',
                 models.ImageField(default=None, upload_to='')),
                ('signature', models.ImageField(default=None, upload_to='')),
                ('ssc_result', models.ImageField(default=None, upload_to='')),
                ('hsc_result', models.ImageField(default=None, upload_to='')),
                ('hsc_LC', models.ImageField(default=None, upload_to='')),
                ('cet_result', models.ImageField(default=None, upload_to='')),
                ('jee_mains_result',
                 models.ImageField(default=None, upload_to='')),
                ('jee_adv_result', models.ImageField(default=None,
                                                     upload_to='')),
                ('set_result', models.ImageField(default=None, upload_to='')),
                ('minority_proof', models.ImageField(default=None,
                                                     upload_to='')),
                ('nationality_proof',
                 models.ImageField(default=None, upload_to='')),
                ('tfws_proof', models.ImageField(default=None, upload_to='')),
                ('maharashtra_citizen_proof',
                 models.ImageField(default=None, upload_to='')),
                ('address_proof', models.ImageField(default=None,
                                                    upload_to='')),
                ('ssc_marksheet_verified', models.BooleanField(default=False)),
                ('hsc_marksheet_verified', models.BooleanField(default=False)),
                ('cet_marksheet_verified', models.BooleanField(default=False)),
                ('jee_mains_markssheet_verified',
                 models.BooleanField(default=False)),
                ('jee_adv_markssheet_verified',
                 models.BooleanField(default=False)),
                ('signature_verified', models.BooleanField(default=False)),
                ('candidate_photo_verified',
                 models.BooleanField(default=False)),
                ('all_verified', models.BooleanField(default=False)),
            ],
        ),
    ]
Пример #9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='app_mod',
            fields=[
                ('id_app', models.AutoField(primary_key=True, serialize=False)),
                ('titulo', models.CharField(max_length=100, verbose_name='Título de la aplicacion: ')),
                ('desc', models.CharField(max_length=80, verbose_name='Descricion de la aplicacion ')),
                ('url_doc', models.URLField(verbose_name='Direción local a la documentación o manual de la aplicación')),
                ('version', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Versión de desarrollo de la aplicación: ')),
                ('ver_mod', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Versión de desarrollo de la aplicación: ')),
                ('activo', models.BooleanField(default=False, verbose_name='estatus de la aplicacion ')),
                ('instalada', models.BooleanField(default=False, verbose_name='¿La aplicación se encuentra instalada? ')),
                ('visible', models.BooleanField(default=False, verbose_name='¿Activa o desactiva la visibilidad de la aplicacion.?')),
            ],
            options={
                'verbose_name': 'app_mod',
                'verbose_name_plural': 'app_mods',
            },
        ),
        migrations.CreateModel(
            name='func_app',
            fields=[
                ('id_func', models.AutoField(primary_key=True, serialize=False)),
                ('nom_func', models.CharField(blank=True, max_length=30, null=True, verbose_name='Nombre de la función: ')),
                ('lib_func', models.CharField(blank=True, max_length=30, null=True, verbose_name='Librería que contiene la función: ')),
                ('url_loc', models.URLField(blank=True, null=True, verbose_name='Direción local a la documentación o manual de la aplicación')),
                ('com_exc', models.CharField(blank=True, max_length=20, null=True, verbose_name='Comando de Ejecución de la Función: ')),
                ('text', models.CharField(blank=True, max_length=80, null=True, verbose_name='Nombre de Función para menús o etiquetas.: ')),
                ('context', models.CharField(blank=True, max_length=20, null=True, verbose_name='Contexto: ')),
                ('activa', models.BooleanField(default=False, verbose_name='¿Activa o desactiva.?')),
                ('indice', models.IntegerField()),
            ],
            options={
                'verbose_name': 'func_app',
                'verbose_name_plural': 'func_apps',
            },
        ),
        migrations.CreateModel(
            name='log_acc_mod',
            fields=[
                ('id_log_acces', models.AutoField(primary_key=True, serialize=False)),
                ('fch_ini', models.DateField(verbose_name='fecha de inicio')),
                ('fch_fin', models.DateField(verbose_name='fecha de fin')),
            ],
            options={
                'verbose_name': 'log_acc_mod',
                'verbose_name_plural': 'log_acc_mods',
            },
        ),
        migrations.CreateModel(
            name='log_acc_pltf',
            fields=[
                ('id_acc_pltf', models.AutoField(primary_key=True, serialize=False)),
                ('fch_ini', models.DateField(verbose_name='fecha de inicio')),
                ('fch_fin', models.DateField(verbose_name='fecha de fin')),
            ],
            options={
                'verbose_name': 'log_acc_pltf',
                'verbose_name_plural': 'log_acc_pltfs',
            },
        ),
        migrations.CreateModel(
            name='mod',
            fields=[
                ('fech_crear', models.DateField(auto_now_add=True, null=True)),
                ('fech_modf', models.DateField(auto_now=True)),
                ('id_mod', models.AutoField(primary_key=True, serialize=False)),
                ('titulo', models.CharField(max_length=40, verbose_name='Título del módulo')),
                ('desc', models.CharField(max_length=50, verbose_name='descripcion del Módulo')),
                ('url_doc', models.URLField(verbose_name='url Documentación')),
                ('version', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Versión de desarrollo ')),
                ('activo', models.BooleanField(default=False, verbose_name='Activo')),
                ('instalado', models.BooleanField(default=False, verbose_name='¿el módulo se encuentra instalado?')),
                ('visible', models.BooleanField(default=False, verbose_name='¿Activa o desactiva la visibilidad de la aplicacion.?')),
                ('ls_param_cnf', models.CharField(default='0', max_length=100, verbose_name='Listado de parámetro de configuración')),
            ],
            options={
                'verbose_name': 'mod',
                'verbose_name_plural': 'mods',
            },
        ),
        migrations.CreateModel(
            name='rol',
            fields=[
                ('group_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='auth.group')),
                ('etq_rol', models.CharField(blank=True, max_length=30, null=True, verbose_name='Etiqueta: ')),
                ('desc', models.CharField(blank=True, max_length=150, null=True, verbose_name='Descripcion del Rol: ')),
                ('tipo', models.IntegerField(blank=True, choices=[(0, 'Sistema'), (1, 'Módulo'), (2, 'Aplicación'), (3, 'Extensión'), (4, 'Otro')], default=0, null=True)),
                ('req_reg', models.BooleanField(default=False, verbose_name='¿Activa o desactiva.?')),
                ('id_app', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='App_modadm.app_mod')),
                ('id_mod', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='App_modadm.mod')),
            ],
            options={
                'verbose_name': 'rol',
                'verbose_name_plural': 'rols',
            },
            bases=('auth.group',),
            managers=[
                ('objects', django.contrib.auth.models.GroupManager()),
            ],
        ),
        migrations.CreateModel(
            name='rl_mod_app_mod',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('id_mod', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App_modadm.mod')),
                ('ls_app', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App_modadm.app_mod')),
            ],
            options={
                'verbose_name': 'rl_mod_app_mod',
                'verbose_name_plural': 'rl_mod_app_mods',
            },
        ),
        migrations.CreateModel(
            name='rl_func_rol',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('reg_bd', models.BooleanField(default=True, verbose_name='requiere registrar en la base de datos')),
                ('id_func', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='App_modadm.func_app')),
                ('id_rol', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='App_modadm.rol')),
            ],
            options={
                'verbose_name': 'rl_func_rol',
                'verbose_name_plural': 'rl_func_rol',
            },
        ),
        migrations.CreateModel(
            name='rl_func_app',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('id_app', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='App_modadm.app_mod')),
                ('id_func', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App_modadm.func_app')),
            ],
            options={
                'verbose_name': 'rl_func_app',
                'verbose_name_plural': 'rl_func_apps',
            },
        ),
        migrations.CreateModel(
            name='rl_app_mod_func',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('id_app', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App_modadm.app_mod')),
                ('ls_func', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App_modadm.func_app')),
            ],
            options={
                'verbose_name': 'rl_app_mod_func',
                'verbose_name_plural': 'rl_app_mod_funcs',
            },
        ),
        migrations.CreateModel(
            name='mod_adm',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('sesion', models.CharField(blank=True, max_length=150, null=True, verbose_name='Sesion: ')),
                ('id_mod', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App_modadm.mod')),
            ],
            options={
                'verbose_name': 'mod_adm',
                'verbose_name_plural': 'mod_adms',
            },
        ),
    ]
Пример #10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('student_id', models.CharField(blank=True, max_length=20)),
                ('department', models.CharField(blank=True, max_length=50)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Choice',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('choice_text',
                 models.CharField(help_text='Choice', max_length=200)),
                ('is_correct',
                 models.BooleanField(default=False,
                                     help_text='Is this choice correct?')),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('question_text',
                 models.CharField(help_text='Your question', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Quiz',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quiz_name',
                 models.CharField(help_text='Enter your quiz name',
                                  max_length=200)),
                ('pub_date_time',
                 models.DateTimeField(
                     help_text='What time do you want to start the quiz?')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('duration',
                 models.DecimalField(decimal_places=2,
                                     default=1.0,
                                     help_text='The quiz duration(in hour)',
                                     max_digits=4)),
            ],
        ),
        migrations.AddField(
            model_name='question',
            name='quiz',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='quiz.Quiz'),
        ),
        migrations.AddField(
            model_name='choice',
            name='question',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='quiz.Question'),
        ),
    ]
Пример #11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('sessions', '0001_initial'),
        ('tabla', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserSession',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('session',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='sessions.Session')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Perfil',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('telefono',
                 models.CharField(blank=True, max_length=40, null=True)),
                ('foto',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=perfiles.models.get_image_filename)),
                ('fecha_clave',
                 models.DateField(
                     blank=True,
                     null=True,
                     verbose_name='Última actualización de clave')),
                ('email_contacto',
                 models.EmailField(
                     blank=True,
                     max_length=100,
                     null=True,
                     validators=[django.core.validators.EmailValidator()],
                     verbose_name='E-mail de contacto')),
                ('nivel',
                 models.ManyToManyField(blank=True,
                                        related_name='nivel',
                                        to='tabla.Tabla')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='perfil',
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Usuario')),
            ],
            options={
                'verbose_name_plural': 'perfiles',
            },
        ),
        migrations.CreateModel(
            name='HistoricalPreferencia',
            fields=[
                ('id',
                 models.IntegerField(auto_created=True,
                                     blank=True,
                                     db_index=True,
                                     verbose_name='ID')),
                ('vista', models.CharField(max_length=60)),
                ('opcion', models.CharField(max_length=60)),
                ('fecha', models.DateField(blank=True, null=True)),
                ('caracter',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('numero',
                 models.DecimalField(blank=True,
                                     decimal_places=4,
                                     max_digits=14,
                                     null=True)),
                ('logico', models.BooleanField(default=False, null=True)),
                ('history_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason',
                 models.CharField(max_length=100, null=True)),
                ('history_type',
                 models.CharField(choices=[('+', 'Created'), ('~', 'Changed'),
                                           ('-', 'Deleted')],
                                  max_length=1)),
                ('history_user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL)),
                ('usuario',
                 models.ForeignKey(
                     blank=True,
                     db_constraint=False,
                     default=django.contrib.auth.models.User,
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical preferencia',
                'db_table': 'historico_preferencia',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalPerfil',
            fields=[
                ('id',
                 models.IntegerField(auto_created=True,
                                     blank=True,
                                     db_index=True,
                                     verbose_name='ID')),
                ('telefono',
                 models.CharField(blank=True, max_length=40, null=True)),
                ('foto', models.TextField(blank=True,
                                          max_length=100,
                                          null=True)),
                ('fecha_clave',
                 models.DateField(
                     blank=True,
                     null=True,
                     verbose_name='Última actualización de clave')),
                ('email_contacto',
                 models.EmailField(
                     blank=True,
                     max_length=100,
                     null=True,
                     validators=[django.core.validators.EmailValidator()],
                     verbose_name='E-mail de contacto')),
                ('history_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason',
                 models.CharField(max_length=100, null=True)),
                ('history_type',
                 models.CharField(choices=[('+', 'Created'), ('~', 'Changed'),
                                           ('-', 'Deleted')],
                                  max_length=1)),
                ('history_user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(
                     blank=True,
                     db_constraint=False,
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Usuario')),
            ],
            options={
                'verbose_name': 'historical perfil',
                'db_table': 'historico_perfil',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='Preferencia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('vista', models.CharField(max_length=60)),
                ('opcion', models.CharField(max_length=60)),
                ('fecha', models.DateField(blank=True, null=True)),
                ('caracter',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('numero',
                 models.DecimalField(blank=True,
                                     decimal_places=4,
                                     max_digits=14,
                                     null=True)),
                ('logico', models.BooleanField(default=False, null=True)),
                ('usuario',
                 models.ForeignKey(
                     blank=True,
                     default=django.contrib.auth.models.User,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('usuario', 'vista', 'opcion')},
            },
        ),
    ]
Пример #12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Full Name')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Marks',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('subject_theory',
                 models.FloatField(blank=True,
                                   null=True,
                                   verbose_name='Theory')),
                ('subject_mcq',
                 models.FloatField(blank=True, null=True, verbose_name='MCQ')),
                ('subject_practical',
                 models.FloatField(blank=True,
                                   null=True,
                                   verbose_name='Practical')),
                ('subject_total_marks',
                 models.FloatField(blank=True,
                                   null=True,
                                   verbose_name='Total Marks')),
                ('subject_gpa_sub',
                 models.CharField(blank=True,
                                  help_text='Please keep blank',
                                  max_length=5,
                                  null=True,
                                  verbose_name='Subject GPA Sub')),
                ('subject_marks',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     help_text='Please give proper number',
                                     max_digits=5,
                                     null=True)),
                ('subject_gradepoint',
                 models.DecimalField(blank=True,
                                     decimal_places=1,
                                     help_text='Please keep blank',
                                     max_digits=3,
                                     null=True,
                                     verbose_name='Grade Point')),
                ('subject_gpa',
                 models.CharField(blank=True,
                                  help_text='Please keep blank',
                                  max_length=5,
                                  null=True,
                                  verbose_name='Subject GPA')),
            ],
            options={
                'verbose_name': 'Mark Details',
                'verbose_name_plural': 'Result Sheet Details',
                'ordering': ['subject_name'],
            },
        ),
        migrations.CreateModel(
            name='Rank',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('total_marks',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     default=0,
                                     help_text='Please give proper number',
                                     max_digits=5,
                                     null=True)),
                ('total_gpa',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     default=0,
                                     help_text='Please give proper number',
                                     max_digits=5,
                                     null=True)),
                ('class_rank',
                 models.IntegerField(blank=True, default=0, null=True)),
                ('school_rank',
                 models.IntegerField(blank=True,
                                     default=0,
                                     null=True,
                                     verbose_name='All School Rank')),
            ],
            options={
                'verbose_name': 'Rank',
                'verbose_name_plural': 'Rank',
                'ordering': ['class_rank'],
            },
        ),
        migrations.CreateModel(
            name='StdSubject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('subject_name',
                 models.CharField(max_length=100,
                                  verbose_name='Subject Name')),
                ('subject_group',
                 models.CharField(choices=[('S', 'Science'),
                                           ('B', 'Business Studies'),
                                           ('H', 'Humatics'),
                                           ('G', 'General')],
                                  default='G',
                                  max_length=10,
                                  verbose_name='Subject Group')),
                ('subject_code',
                 models.CharField(max_length=10, verbose_name='Subject Code')),
                ('subjet_class',
                 models.CharField(choices=[('6', 'Six'), ('7', 'Seven'),
                                           ('8', 'Eight'), ('9', 'Nine'),
                                           ('10', 'Ten')],
                                  default='6',
                                  max_length=2,
                                  verbose_name='Subject Class')),
                ('subject_type',
                 models.CharField(choices=[('R', 'REGULAR'),
                                           ('O', 'OPTIONAL')],
                                  default='R',
                                  max_length=1,
                                  verbose_name='Subject Type')),
                ('subject_full_marks',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     default=100,
                                     max_digits=5,
                                     null=True,
                                     verbose_name='Full Marks')),
                ('subject_theory_full_marks',
                 models.FloatField(blank=True,
                                   null=True,
                                   verbose_name='Theory Marks')),
                ('subject_mcq_full_marks',
                 models.FloatField(blank=True, null=True, verbose_name='MCQ')),
                ('subject_practical_marks',
                 models.FloatField(blank=True,
                                   null=True,
                                   verbose_name='Practical')),
                ('subject_total_marks',
                 models.FloatField(blank=True,
                                   help_text='Plz dont input any number',
                                   null=True,
                                   verbose_name='Total Marks')),
                ('subject_form_searh_name',
                 models.CharField(blank=True,
                                  max_length=500,
                                  null=True,
                                  verbose_name='Subject Search Form name')),
            ],
            options={
                'verbose_name': 'Subject',
                'verbose_name_plural': 'Subject',
                'ordering': ['subject_code'],
            },
        ),
        migrations.CreateModel(
            name='StudentInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('std_name',
                 models.CharField(
                     blank=True,
                     help_text=
                     'Type only student Full Name like as Nazmul Islam or Nazrul Islam',
                     max_length=100,
                     null=True,
                     verbose_name='Student Name')),
                ('std_class',
                 models.CharField(choices=[('6', 'Six'), ('7', 'Seven'),
                                           ('8', 'Eight'), ('9', 'Nine'),
                                           ('10', 'Ten')],
                                  default=6,
                                  help_text='Select a class',
                                  max_length=2,
                                  verbose_name='Student Class')),
                ('std_roll',
                 models.IntegerField(
                     help_text='Type Student Roll Number (Only Number)',
                     verbose_name='Roll Number')),
                ('std_group',
                 models.CharField(choices=[('S', 'Science'),
                                           ('B', 'Business Studies'),
                                           ('H', 'Humatics'),
                                           ('G', 'General')],
                                  default='G',
                                  max_length=1,
                                  verbose_name='Group')),
                ('std_gender',
                 models.CharField(choices=[('MALE', 'Male'),
                                           ('FEMALE', 'Female')],
                                  default='MALE',
                                  max_length=10,
                                  verbose_name='Gender')),
                ('std_total_marks',
                 models.FloatField(blank=True,
                                   default=0,
                                   null=True,
                                   verbose_name='Total Marks')),
                ('std_gpa',
                 models.CharField(blank=True,
                                  default='F',
                                  max_length=50,
                                  null=True,
                                  verbose_name='GPA')),
                ('std_grade_point_total_sum',
                 models.FloatField(
                     blank=True,
                     null=True,
                     verbose_name='Total Avg Number per Subject')),
                ('std_grade_point_total_subject_avg',
                 models.FloatField(blank=True,
                                   null=True,
                                   verbose_name='Total GPA')),
                ('std_fail_subject',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='Fail Subject')),
                ('school_rank',
                 models.IntegerField(blank=True,
                                     default=0,
                                     null=True,
                                     verbose_name='Student Rank in School')),
                ('class_rank',
                 models.IntegerField(blank=True,
                                     default=0,
                                     null=True,
                                     verbose_name='Student Rank in Class')),
            ],
            options={
                'verbose_name': 'Student Detail',
                'verbose_name_plural': "Student Detail's",
                'ordering': ['std_roll'],
            },
        ),
        migrations.CreateModel(
            name='SubjectTecher',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('teacher_name',
                 models.CharField(max_length=100,
                                  verbose_name='Teacher Name')),
                ('teach_phone_number',
                 models.IntegerField(verbose_name='Mobile Number')),
                ('teach_major_subject',
                 models.CharField(max_length=100,
                                  verbose_name='Subject Name: ')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='stdsubject',
            name='teacher',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='teacher',
                to='results.SubjectTecher'),
        ),
        migrations.AddField(
            model_name='rank',
            name='std',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='std',
                to='results.StudentInfo'),
        ),
        migrations.AddField(
            model_name='marks',
            name='std_name',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='results.StudentInfo'),
        ),
        migrations.AddField(
            model_name='marks',
            name='subject_name',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='results.StdSubject'),
        ),
    ]
Пример #13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('last_name',
                 models.CharField(max_length=30, verbose_name='Last Name')),
                ('first_name',
                 models.CharField(max_length=30, verbose_name='First Name')),
                ('start_date',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Start Date')),
                ('rate',
                 models.DecimalField(decimal_places=3,
                                     default=1.0,
                                     max_digits=4,
                                     verbose_name='Rate')),
                ('is_active',
                 models.BooleanField(default=True,
                                     verbose_name='Currently Employed')),
                ('notes',
                 models.TextField(blank=True, null=True,
                                  verbose_name='Notes')),
            ],
            options={
                'ordering': ['last_name', 'first_name'],
            },
        ),
        migrations.CreateModel(
            name='EmployeeLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sign_in_date',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Signed In')),
                ('sign_out_date',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='Signed Out')),
                ('employee',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='employee.Employee',
                     verbose_name='Employee')),
            ],
            options={
                'ordering': ['sign_in_date'],
            },
        ),
        migrations.CreateModel(
            name='HistoricalEmployee',
            fields=[
                ('id',
                 models.IntegerField(auto_created=True,
                                     blank=True,
                                     db_index=True,
                                     verbose_name='ID')),
                ('last_name',
                 models.CharField(max_length=30, verbose_name='Last Name')),
                ('first_name',
                 models.CharField(max_length=30, verbose_name='First Name')),
                ('start_date',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Start Date')),
                ('rate',
                 models.DecimalField(decimal_places=3,
                                     default=1.0,
                                     max_digits=4,
                                     verbose_name='Rate')),
                ('is_active',
                 models.BooleanField(default=True,
                                     verbose_name='Currently Employed')),
                ('notes',
                 models.TextField(blank=True, null=True,
                                  verbose_name='Notes')),
                ('history_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason',
                 models.CharField(max_length=100, null=True)),
                ('history_type',
                 models.CharField(choices=[('+', 'Created'), ('~', 'Changed'),
                                           ('-', 'Deleted')],
                                  max_length=1)),
                ('history_user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical employee',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalEmployeeLog',
            fields=[
                ('id',
                 models.IntegerField(auto_created=True,
                                     blank=True,
                                     db_index=True,
                                     verbose_name='ID')),
                ('sign_in_date',
                 models.DateTimeField(blank=True,
                                      editable=False,
                                      verbose_name='Signed In')),
                ('sign_out_date',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='Signed Out')),
                ('history_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason',
                 models.CharField(max_length=100, null=True)),
                ('history_type',
                 models.CharField(choices=[('+', 'Created'), ('~', 'Changed'),
                                           ('-', 'Deleted')],
                                  max_length=1)),
                ('employee',
                 models.ForeignKey(
                     blank=True,
                     db_constraint=False,
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='+',
                     to='employee.Employee',
                     verbose_name='Employee')),
                ('history_user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical employee log',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalLocation',
            fields=[
                ('id',
                 models.IntegerField(auto_created=True,
                                     blank=True,
                                     db_index=True,
                                     verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='Name')),
                ('history_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason',
                 models.CharField(max_length=100, null=True)),
                ('history_type',
                 models.CharField(choices=[('+', 'Created'), ('~', 'Changed'),
                                           ('-', 'Deleted')],
                                  max_length=1)),
                ('history_user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical location',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='Name')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='historicalemployeelog',
            name='location',
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name='+',
                to='employee.Location',
                verbose_name='Location'),
        ),
        migrations.AddField(
            model_name='historicalemployee',
            name='location',
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name='+',
                to='employee.Location',
                verbose_name='Location'),
        ),
        migrations.AddField(
            model_name='historicalemployee',
            name='user',
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name='+',
                to=settings.AUTH_USER_MODEL,
                verbose_name='User'),
        ),
        migrations.AddField(
            model_name='employeelog',
            name='location',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='employee.Location',
                verbose_name='Location'),
        ),
        migrations.AddField(
            model_name='employee',
            name='location',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='employee.Location',
                verbose_name='Location'),
        ),
        migrations.AddField(
            model_name='employee',
            name='user',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to=settings.AUTH_USER_MODEL,
                verbose_name='User'),
        ),
    ]
Пример #14
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('warehouse',
                 models.CharField(default='Windsor', max_length=100)),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('user_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('company',
                 models.CharField(blank=True, default='', max_length=50)),
                ('shipping_address',
                 models.CharField(blank=True, max_length=300, null=True)),
                ('city', models.CharField(default='Windsor', max_length=20)),
                ('province',
                 models.CharField(choices=[
                     ('AB', 'Alberta'), ('MB', 'Manitoba'), ('ON', 'Ontario'),
                     ('QC', 'Quebec')
                 ],
                                  default='ON',
                                  max_length=2)),
                ('interested_in', models.ManyToManyField(to='myapp.Category')),
            ],
            options={
                'ordering': ['id'],
            },
            bases=('auth.user', ),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('num_units', models.PositiveIntegerField(default=100)),
                ('order_status',
                 models.IntegerField(choices=[(0, 'Order Cancelled'),
                                              (1, 'Order Placed'),
                                              (2, 'Order Shipped'),
                                              (3, 'Order Delivered')],
                                     default=1)),
                ('status_date',
                 models.DateField(default=datetime.date.today,
                                  verbose_name='Date')),
                ('client',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='clients',
                                   to='myapp.Client')),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('price', models.DecimalField(decimal_places=2,
                                              max_digits=10)),
                ('stock', models.PositiveIntegerField(default=100)),
                ('available', models.BooleanField(default=True)),
                ('description',
                 models.TextField(blank=True, default='', max_length=500)),
                ('interested', models.PositiveIntegerField(default=0)),
                ('category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='products',
                                   to='myapp.Category')),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.AddField(
            model_name='order',
            name='product',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='products',
                to='myapp.Product'),
        ),
    ]
Пример #15
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Athlete',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=50, verbose_name='Nombres')),
                ('last_name', models.CharField(max_length=50, verbose_name='Apellidos')),
                ('image', models.ImageField(blank=True, null=True, upload_to='files/athletes', verbose_name='Foto')),
                ('birthday', models.DateField(verbose_name='Fecha de Nacimiento')),
                ('birthplace', models.CharField(max_length=50, verbose_name='Lugar de nacimiento')),
                ('age', models.IntegerField(verbose_name='Edad')),
                ('weight', models.DecimalField(decimal_places=2, help_text='libras', max_digits=5, max_length=50, verbose_name='Nombres')),
                ('height', models.DecimalField(decimal_places=2, help_text='metros', max_digits=3, max_length=50, verbose_name='Altura')),
                ('coach', models.CharField(max_length=100, verbose_name='Entrenador')),
            ],
        ),
        migrations.CreateModel(
            name='Sport',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Nombre')),
                ('icono', models.FileField(blank=True, null=True, upload_to='files/icons', verbose_name='Ícono')),
            ],
        ),
        migrations.CreateModel(
            name='Mode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Nombre')),
                ('gender', models.CharField(choices=[('M', 'Masculino'), ('F', 'Femenino')], default='M', max_length=50, verbose_name='Nombre')),
                ('sport_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sport_mode', to='tokio2020.Sport', verbose_name='Deporte')),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(verbose_name='Fecha')),
                ('time', models.TimeField(verbose_name='Hora')),
                ('datetime', models.DateTimeField(null=True, verbose_name='Fecha y Hora')),
                ('result', models.CharField(max_length=50, verbose_name='Resultado')),
                ('mode_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='modet_event', to='tokio2020.Mode', verbose_name='Modalidad')),
                ('sport_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sport_event', to='tokio2020.Sport', verbose_name='Deporte')),
            ],
        ),
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('first_name', models.CharField(max_length=50, verbose_name='Nombres')),
                ('last_name', models.CharField(max_length=50, verbose_name='Apellidos')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Пример #16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('username', models.CharField(max_length=200, unique=True)),
                ('email',
                 models.EmailField(help_text='Required', max_length=200)),
                ('first_name', models.CharField(max_length=200)),
                ('last_name', models.CharField(max_length=200)),
                ('password',
                 models.CharField(default=None, max_length=100, null=True)),
                ('confirm_password',
                 models.CharField(default=None, max_length=100, null=True)),
                ('phone_number', models.CharField(max_length=10)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'User',
                'verbose_name_plural': 'Users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('amount',
                 models.DecimalField(decimal_places=4,
                                     default=None,
                                     max_digits=10)),
                ('giver',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='From',
                                   to=settings.AUTH_USER_MODEL)),
                ('taker',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='To',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Status',
                'verbose_name_plural': 'Status',
            },
        ),
        migrations.CreateModel(
            name='OTP',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('otp', models.IntegerField()),
                ('sent_on', models.DateTimeField(auto_now_add=True)),
                ('receiver',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'OTP',
                'verbose_name_plural': 'OTPs',
            },
        ),
        migrations.CreateModel(
            name='GroupModel',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('type',
                 models.CharField(choices=[('APARTMENT', 'Apartment'),
                                           ('HOUSE', 'House'),
                                           ('TRIP', 'Trip'),
                                           ('OTHER', 'Other')],
                                  default='Trip',
                                  max_length=200)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('admin',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='admin',
                                   to=settings.AUTH_USER_MODEL)),
                ('users',
                 models.ManyToManyField(related_name='group_members',
                                        to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Group',
                'verbose_name_plural': 'Groups',
            },
        ),
        migrations.CreateModel(
            name='Friend',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('friends',
                 models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='friends_list',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Expense',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('bill_name', models.CharField(max_length=200)),
                ('description', models.TextField(default=None)),
                ('amount',
                 models.DecimalField(decimal_places=4,
                                     default=0,
                                     max_digits=10)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('group_name',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='quickstart.GroupModel')),
                ('payer',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('patronymic', models.CharField(blank=True, max_length=150, verbose_name='Отчество')),
                ('balance', models.DecimalField(decimal_places=2, default=0, max_digits=9, verbose_name='Баланс')),
                ('passport_number', models.CharField(blank=True, max_length=15, verbose_name='Номер паспорта')),
                ('passport_data', models.CharField(blank=True, max_length=195, verbose_name='Паспортные данные')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=180, verbose_name='Заголовок')),
                ('slug', models.SlugField(max_length=200, unique=True, verbose_name='Slug( URL )')),
                ('short_description', models.TextField(max_length=400, verbose_name='Краткое описание статьи')),
                ('text', ckeditor_uploader.fields.RichTextUploadingField(verbose_name='Текст')),
                ('active', models.BooleanField(verbose_name='Активна')),
            ],
            options={
                'verbose_name': 'Статья',
                'verbose_name_plural': 'Статьи',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Coach',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Имя')),
                ('description', models.TextField(verbose_name='Описание')),
                ('photo', models.ImageField(blank=True, upload_to='photos_of_coaches/', verbose_name='Фото')),
                ('active', models.BooleanField(verbose_name='Активный')),
            ],
            options={
                'verbose_name': 'Тренер',
                'verbose_name_plural': 'Тренеры',
            },
        ),
        migrations.CreateModel(
            name='Court',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120, verbose_name='Наименование')),
                ('description', models.TextField(blank=True, verbose_name='Описание')),
                ('address', models.CharField(max_length=120, verbose_name='Адрес')),
                ('metro', models.CharField(max_length=50, verbose_name='Станция метро')),
                ('photo', models.ImageField(blank=True, upload_to='photos_of_courts/', verbose_name='Фото')),
                ('longitude', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True, verbose_name='Долгота')),
                ('latitude', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True, verbose_name='Широта')),
                ('passport_required', models.BooleanField(verbose_name='Требуется паспорт')),
                ('active', models.BooleanField(verbose_name='Активный')),
            ],
            options={
                'verbose_name': 'Зал',
                'verbose_name_plural': 'Залы',
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=120, verbose_name='Заголовок')),
                ('date', models.DateField(auto_now_add=True, verbose_name='Дата')),
                ('text', models.TextField(blank=True, verbose_name='Текст')),
                ('image', models.ImageField(blank=True, upload_to='news_images/', verbose_name='Изображение')),
            ],
            options={
                'verbose_name': 'Новость',
                'verbose_name_plural': 'Новости',
                'ordering': ['-date'],
            },
        ),
        migrations.CreateModel(
            name='OneTimeTraining',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.PositiveSmallIntegerField(verbose_name='Цена(руб.)')),
            ],
            options={
                'verbose_name': 'Стоимость разового занятия',
                'verbose_name_plural': 'Стоимость разового занятия',
            },
        ),
        migrations.CreateModel(
            name='SubscriptionSample',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=80, verbose_name='Наименование')),
                ('amount', models.PositiveIntegerField(verbose_name='Стоимость(руб.)')),
                ('trainings_qty', models.PositiveSmallIntegerField(verbose_name='Количество тренировок')),
                ('validity', models.PositiveSmallIntegerField(verbose_name='Срок действия(дней)')),
                ('active', models.BooleanField(verbose_name='Активный')),
            ],
            options={
                'verbose_name': 'Абонемент',
                'verbose_name_plural': 'Абонементы',
            },
        ),
        migrations.CreateModel(
            name='Training',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day_of_week', models.SmallIntegerField(choices=[(1, 'Понедельник'), (2, 'Вторник'), (3, 'Среда'), (4, 'Четверг'), (5, 'Пятница'), (6, 'Суббота'), (7, 'Воскресенье')], verbose_name='день недели')),
                ('skill_level', models.SmallIntegerField(choices=[(1, 'начальный уровень'), (2, 'уровень начальный+'), (3, 'средний уровень')], verbose_name='уровень')),
                ('start_time', models.TimeField(verbose_name='время начала')),
                ('active', models.BooleanField(default=True, verbose_name='активно')),
                ('status', models.SmallIntegerField(choices=[(1, 'OK'), (2, 'замена тренера'), (3, 'перенос по времени'), (4, 'отменена')], default=1, verbose_name='статус')),
                ('date', models.DateField(verbose_name='Дата')),
                ('coach', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='volleyballschool.coach', verbose_name='тренер')),
                ('court', models.ForeignKey(limit_choices_to={'active': True}, on_delete=django.db.models.deletion.CASCADE, to='volleyballschool.court', verbose_name='зал')),
                ('learners', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='Посетители')),
            ],
            options={
                'verbose_name': 'Тренировка',
                'verbose_name_plural': 'Тренировки',
            },
        ),
        migrations.CreateModel(
            name='Timetable',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day_of_week', models.SmallIntegerField(choices=[(1, 'Понедельник'), (2, 'Вторник'), (3, 'Среда'), (4, 'Четверг'), (5, 'Пятница'), (6, 'Суббота'), (7, 'Воскресенье')], verbose_name='день недели')),
                ('skill_level', models.SmallIntegerField(choices=[(1, 'начальный уровень'), (2, 'уровень начальный+'), (3, 'средний уровень')], verbose_name='уровень')),
                ('start_time', models.TimeField(verbose_name='время начала')),
                ('active', models.BooleanField(default=True, verbose_name='активно')),
                ('coach', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='volleyballschool.coach', verbose_name='тренер')),
                ('court', models.ForeignKey(limit_choices_to={'active': True}, on_delete=django.db.models.deletion.CASCADE, to='volleyballschool.court', verbose_name='зал')),
            ],
            options={
                'verbose_name': 'Расписание',
                'verbose_name_plural': 'Расписание',
            },
        ),
        migrations.AddConstraint(
            model_name='training',
            constraint=models.UniqueConstraint(fields=('skill_level', 'court', 'date'), name='unique_training'),
        ),
    ]
Пример #18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Developer',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='auth.user')),
                ('name', models.CharField(max_length=100, unique=True)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('grade', models.DecimalField(decimal_places=1, default=5.0, max_digits=2)),
                ('price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('type', models.CharField(choices=[('ACT', '动作'), ('RPG', '角色扮演'), ('PS', '射击'), ('RTS', '战略'), ('SLG', '策略'), ('MOBA', '多人竞技')], default='动作', max_length=10)),
                ('pubtime', models.DateTimeField(auto_now_add=True)),
                ('avatar', models.FileField(upload_to='avatar')),
                ('n_comments', models.IntegerField(default=0)),
                ('developer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Gamehub.developer', to_field='name')),
            ],
            options={
                'ordering': ['-pubtime'],
            },
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='auth.user')),
                ('name', models.CharField(max_length=100, unique=True)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Friend',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('player1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='player1', to='Gamehub.player')),
                ('player2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='player2', to='Gamehub.player', to_field='name')),
            ],
        ),
        migrations.CreateModel(
            name='DreamList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Gamehub.game', to_field='name')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='Gamehub.player')),
            ],
        ),
        migrations.CreateModel(
            name='Depository',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Gamehub.game', to_field='name')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='Gamehub.player')),
            ],
        ),
        migrations.CreateModel(
            name='Play',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('progress', models.DecimalField(decimal_places=1, default=0, max_digits=2)),
                ('rate', models.DecimalField(decimal_places=1, default=5.0, max_digits=2)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Gamehub.game', to_field='name')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Gamehub.player')),
            ],
            options={
                'unique_together': {('game', 'player')},
            },
        ),
    ]
Пример #19
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('stocks', '0001_initial'),
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('mobile', models.CharField(blank=True, max_length=11, null=True, unique=True, verbose_name='手机号码')),
                ('email', models.CharField(blank=True, max_length=30, null=True, verbose_name='邮箱')),
                ('identity', models.CharField(blank=True, max_length=20, null=True, verbose_name='身份证号')),
                ('isactive', models.BooleanField(default=False, verbose_name='是否激活')),
                ('isban', models.BooleanField(default=False, verbose_name='是否禁用')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': '用户信息',
                'verbose_name_plural': '用户信息',
                'db_table': 'User',
                'ordering': ['-id'],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Bank',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=40, verbose_name='持卡人姓名')),
                ('bank', models.CharField(choices=[(0, '中国银行'), (1, '工商银行'), (2, '建设银行'), (3, '农业银行'), (4, '交通银行'), (5, '招商银行')], default=0, max_length=40, verbose_name='开户行')),
                ('bankNo', models.CharField(max_length=40, verbose_name='卡号')),
                ('tradepwd', models.CharField(max_length=100, verbose_name='交易密码')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
            ],
            options={
                'verbose_name': '银行表',
                'verbose_name_plural': '银行表',
                'db_table': 'Bank',
            },
        ),
        migrations.CreateModel(
            name='Fund',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('money', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True, verbose_name='总资金')),
                ('frozen_money', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True, verbose_name='冻结资金')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
            ],
            options={
                'verbose_name': '资金表',
                'verbose_name_plural': '资金表',
                'db_table': 'Fund',
            },
        ),
        migrations.CreateModel(
            name='Hold',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.IntegerField(blank=True, null=True, verbose_name='持有数量')),
                ('frozen', models.IntegerField(blank=True, null=True, verbose_name='冻结股')),
                ('stock', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stocks.Stock', verbose_name='股票')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
            ],
            options={
                'verbose_name': '持仓表',
                'verbose_name_plural': '持仓表',
                'db_table': 'Hold',
            },
        ),
    ]
Пример #20
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Calendar',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('name',
                 models.CharField(default=django.contrib.auth.models.User,
                                  max_length=50)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='CurrentWeek',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('start_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('year_number', models.IntegerField(default=0)),
                ('month_number', models.IntegerField(default=0)),
                ('week_number', models.IntegerField(default=0)),
                ('calendar',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='calendars.calendar')),
            ],
        ),
        migrations.CreateModel(
            name='UserEvent',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('description', models.TextField(blank=True)),
                ('duration',
                 models.DecimalField(decimal_places=2, default=0,
                                     max_digits=4)),
                ('start_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('end_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('week_number', models.IntegerField(default=0)),
                ('month_number', models.IntegerField(default=0)),
                ('classification',
                 models.CharField(blank=True,
                                  choices=[('RR', 'Road Race'),
                                           ('CR', 'Crit/Circuit Race'),
                                           ('TT', 'Time Trial'),
                                           ('HC', 'Hill Climb'),
                                           ('SP', 'Sportive'),
                                           ('US',
                                            'Ultra Sportive/Endurance Event'),
                                           ('CX', 'Cyclo Cross'),
                                           ('MTB', 'MTB CX'),
                                           ('EMTB', 'Enduro MTB'),
                                           ('ENMTB', 'Endurance MTB'),
                                           ('NT', 'No Training'),
                                           ('TC', 'Training Camp')],
                                  max_length=5)),
                ('priority',
                 models.CharField(blank=True,
                                  choices=[('A', 'A Event'), ('B', 'B Event'),
                                           ('C', 'C Event'),
                                           ('FTP', 'FTP Test')],
                                  max_length=3)),
                ('type',
                 models.CharField(choices=[('AD', 'All day'), ('AM', 'AM'),
                                           ('PM', 'PM')],
                                  default='AM',
                                  max_length=3)),
                ('calendar',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='calendars.calendar')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CurrentWeekEvent',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('description', models.TextField(blank=True)),
                ('duration',
                 models.DecimalField(decimal_places=2, default=0,
                                     max_digits=4)),
                ('start_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('end_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('week_number', models.IntegerField(default=0)),
                ('month_number', models.IntegerField(default=0)),
                ('comments', models.CharField(blank=True, max_length=250)),
                ('day', models.CharField(blank=True, max_length=10)),
                ('day_number', models.IntegerField(default=0)),
                ('calendar',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='calendars.calendar')),
                ('current_week',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='currentweekevent',
                                   to='calendars.currentweek')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddConstraint(
            model_name='currentweek',
            constraint=models.UniqueConstraint(fields=('calendar',
                                                       'week_number'),
                                               name='unique_week'),
        ),
        migrations.AddConstraint(
            model_name='currentweek',
            constraint=models.UniqueConstraint(fields=('calendar',
                                                       'start_date'),
                                               name='unique_start'),
        ),
        migrations.AddConstraint(
            model_name='currentweek',
            constraint=models.UniqueConstraint(fields=('week_number',
                                                       'start_date'),
                                               name='unique_week_start'),
        ),
    ]
Пример #21
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[\\w.@+-]+$',
                             'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.'
                         )
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('address', models.TextField(blank=True, null=True)),
                ('phone', models.IntegerField(blank=True, null=True)),
                ('utr', models.IntegerField(blank=True, null=True)),
                ('bank', models.CharField(blank=True,
                                          max_length=180,
                                          null=True)),
                ('sort_code',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('account_number', models.IntegerField(blank=True, null=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('address', models.TextField()),
                ('email', models.CharField(max_length=150)),
            ],
            options={
                'verbose_name': 'Company',
                'verbose_name_plural': 'Companies',
            },
        ),
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('person', models.CharField(max_length=80)),
                ('phone', models.IntegerField(blank=True, null=True)),
                ('created', models.DateTimeField(blank=True)),
                ('paid', models.BooleanField(default=False)),
                ('utr', models.BooleanField(default=False)),
                ('company',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='invoice.Company')),
            ],
        ),
        migrations.CreateModel(
            name='InvoiceItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description', models.CharField(max_length=200)),
                ('cost', models.DecimalField(decimal_places=2, max_digits=10)),
                ('invoice',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='items',
                                   to='invoice.Invoice')),
            ],
            options={
                'ordering': ['id'],
            },
        ),
    ]
Пример #22
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, null=True)),
                ('price_bought', models.FloatField(default=0, verbose_name='How much does this cost to buy?')),
                ('reimbursement', models.FloatField(default=0, null=True, verbose_name='How much do you make? (Fill if you sell the items, or provide them against donation)')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('image', sorl.thumbnail.fields.ImageField(blank=True, null=True, upload_to='whatever')),
            ],
        ),
        migrations.CreateModel(
            name='Items_Storage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('quantity', models.IntegerField(default=0)),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplies.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Space',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('description', models.TextField(blank=True, null=True)),
                ('address', models.CharField(blank=True, max_length=50, null=True)),
                ('longitude', models.DecimalField(decimal_places=6, max_digits=9, null=True)),
                ('latitude', models.DecimalField(decimal_places=6, max_digits=9, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('image', sorl.thumbnail.fields.ImageField(blank=True, null=True, upload_to='whatever')),
            ],
        ),
        migrations.CreateModel(
            name='Storage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('image', sorl.thumbnail.fields.ImageField(blank=True, null=True, upload_to='whatever')),
                ('item', models.ManyToManyField(related_name='Item', through='supplies.Items_Storage', to='supplies.Item')),
                ('space', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplies.Space')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
            ],
            options={
                'proxy': True,
                'indexes': [],
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='space',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplies.User'),
        ),
        migrations.AddField(
            model_name='items_storage',
            name='storage',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplies.Storage'),
        ),
        migrations.AddField(
            model_name='item',
            name='storages',
            field=models.ManyToManyField(related_name='Storage', through='supplies.Items_Storage', to='supplies.Storage'),
        ),
        migrations.AlterUniqueTogether(
            name='items_storage',
            unique_together=set([('storage', 'item')]),
        ),
    ]
Пример #23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='BankAccount',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('balance',
                 models.DecimalField(decimal_places=2,
                                     default=0.0,
                                     max_digits=8)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AccountHolder',
            fields=[
                ('user_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Account holder',
                'verbose_name_plural': 'Account holders',
            },
            bases=('bank.user', ),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('amount', models.DecimalField(decimal_places=2,
                                               max_digits=8)),
                ('created_date',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('sent_from',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='sent_transaction',
                                   to='bank.BankAccount')),
                ('sent_to',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='revieved_transaction',
                                   to='bank.BankAccount')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='bankaccount',
            name='account_holder',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='bank.AccountHolder'),
        ),
    ]
Пример #24
0
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        ('catalogo', '0002_auto_20181129_2220'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('alugou', models.IntegerField(default=0)),
                ('gastou',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=10)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='filme',
            name='classificacao',
            field=models.CharField(blank=True,
                                   choices=[('0', 'Nao-classificado'),
                                            ('1', '1 Estrela'),
                                            ('2', '2 Estrela'),
                                            ('3', '3 Estrela'),
                                            ('4', '4 Estrela'),
                                            ('5', '5 Estrela')],
                                   default='0',
                                   max_length=1),
        ),
        migrations.AlterField(
            model_name='historicofilmesavaliacao',
            name='id',
            field=models.AutoField(auto_created=True,
                                   primary_key=True,
                                   serialize=False,
                                   verbose_name='ID'),
        ),
    ]
Пример #25
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('identity',
                 models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('balance',
                 models.DecimalField(decimal_places=2,
                                     default=9999,
                                     max_digits=6)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('total_price',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=10)),
                ('success', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now=True)),
                ('customer',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='pos.Customer')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('price', models.DecimalField(decimal_places=2, max_digits=6)),
                ('present_item', models.IntegerField(default=0)),
                ('ordered_times', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now=True)),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='pos.Order')),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='pos.Product')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('id',
                 models.CharField(max_length=15,
                                  primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('username', models.CharField(max_length=256, unique=True)),
                ('email', models.EmailField(max_length=254)),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date joined')),
                ('last_login',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='last login')),
                ('is_active', models.BooleanField(default=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Пример #26
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=225)),
                ('description', models.CharField(max_length=400)),
                ('price', models.DecimalField(decimal_places=2, max_digits=9)),
                ('created_date', models.DateField(auto_now_add=True)),
                ('updated_date', models.DateField(auto_now=True)),
                ('photo',
                 models.URLField(
                     blank=True,
                     default=
                     'https://ricesplash.learningu.org/media/images/not-available.jpg',
                     null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ProductComment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.CharField(max_length=250)),
                ('rating', models.IntegerField()),
                ('created_date', models.DateField(auto_now_add=True)),
                ('updated_date', models.DateField(auto_now=True)),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='shop.product')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Orders',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order_status',
                 models.CharField(choices=[('open', 'Новый'),
                                           ('process', 'В процессе'),
                                           ('done', 'Выполнен')],
                                  default='open',
                                  max_length=225)),
                ('created_date', models.DateField(auto_now_add=True)),
                ('updated_date', models.DateField(auto_now=True)),
                ('total_quantity', models.IntegerField()),
                ('total_sum',
                 models.DecimalField(decimal_places=2, max_digits=12)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrderPositions',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='positions',
                                   to='shop.orders')),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='positions',
                                   to='shop.product')),
            ],
        ),
        migrations.CreateModel(
            name='Collections',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('header', models.CharField(max_length=100)),
                ('text', models.CharField(max_length=400)),
                ('created_date', models.DateField(auto_now_add=True)),
                ('updated_date', models.DateField(auto_now=True)),
                ('product',
                 models.ManyToManyField(related_name='collections',
                                        to='shop.Product')),
            ],
        ),
    ]
Пример #27
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('cash', models.IntegerField(default=0)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Lottery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=255)),
                ('total_count', models.IntegerField(default=100)),
                ('now_count', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Merchandise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=255)),
                ('price', models.DecimalField(decimal_places=2, max_digits=6)),
                ('pic', models.ImageField(blank=True, null=True, upload_to='images')),
            ],
        ),
        migrations.CreateModel(
            name='UserScore',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.IntegerField(default=0, null=True)),
                ('lottery', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Lottery')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='lottery',
            name='merchandise',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Merchandise'),
        ),
        migrations.AddField(
            model_name='user',
            name='active_lottery',
            field=models.ManyToManyField(through='main.UserScore', to='main.Lottery'),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
    ]
Пример #28
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('id',
                 models.AutoField(db_column='customer_id',
                                  default=0,
                                  primary_key=True,
                                  serialize=False)),
                ('username', models.CharField(max_length=50, unique=True)),
                ('password', models.CharField(max_length=40)),
                ('company', models.CharField(max_length=50)),
                ('linkman',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='\u8054\u7cfb\u4eba')),
                ('phone',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='\u7535\u8bdd')),
                ('mobile',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='\u624b\u673a')),
                ('email',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='\u90ae\u7bb1')),
                ('im',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='QQ/MSN')),
                ('address',
                 models.CharField(blank=True,
                                  max_length=120,
                                  null=True,
                                  verbose_name='\u5730\u5740')),
            ],
            options={
                'db_table': 'core_customer',
                'managed': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='CommonVar',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('var_type',
                 models.CharField(
                     choices=[(b'joke', '\u7b11\u8bdd\u5e93'),
                              (b'motto', '\u683c\u8a00\u5e93'),
                              (b'health', '\u517b\u751f\u5e93')],
                     max_length=10,
                     verbose_name='\u516c\u5171\u53d8\u91cf\u7c7b\u578b')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='\u4efb\u52a1\u540d\u79f0')),
                ('content',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='\u5185\u5bb9')),
                ('created',
                 models.DateTimeField(
                     auto_now_add=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('updated',
                 models.DateTimeField(
                     auto_now=True, verbose_name='\u4fee\u6539\u65f6\u95f4')),
            ],
            options={
                'db_table': 'core_common_var',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='CoreArea',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  verbose_name='\u533a\u57df\u540d\u79f0')),
            ],
            options={
                'db_table': 'core_customer_area',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='CoreLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('datetime',
                 models.DateTimeField(
                     auto_now_add=True,
                     verbose_name='\u64cd\u4f5c\u65f6\u95f4')),
                ('user_type',
                 models.CharField(choices=[
                     (b'', '--'), (b'users', '\u666e\u901a\u7528\u6237'),
                     (b'manager', '\u7ba1\u7406\u5458'),
                     (b'system', '\u7cfb\u7edf'),
                     (b'super', '\u8d85\u7ea7\u7528\u6237'),
                     (b'agents', '\u4ee3\u7406\u7528\u6237')
                 ],
                                  default='manager',
                                  max_length=20,
                                  verbose_name='\u7528\u6237\u7c7b\u578b')),
                ('target_name',
                 models.CharField(blank=True,
                                  max_length=80,
                                  null=True,
                                  verbose_name='\u540d\u79f0')),
                ('action',
                 models.CharField(choices=[
                     (b'add_account', '\u6dfb\u52a0\u7fa4\u53d1\u5e10\u6237'),
                     (b'edit_account', '\u4fee\u6539\u5e10\u6237\u4fe1\u606f'),
                     (b'del_account', '\u5220\u9664\u7fa4\u53d1\u5e10\u6237'),
                     (b'init_service',
                      '\u521d\u59cb\u5316\u7fa4\u53d1\u670d\u52a1'),
                     (b'set_service',
                      '\u66f4\u6539\u7fa4\u53d1\u670d\u52a1\u8bbe\u7f6e'),
                     (b'add_ip', '\u6dfb\u52a0IP\u5730\u5740'),
                     (b'del_ip', '\u5220\u9664IP\u5730\u5740'),
                     (b'add_domain', '\u6dfb\u52a0\u57df\u540d'),
                     (b'del_domain', '\u5220\u9664\u57df\u540d'),
                     (b'add_mailbox', '\u6dfb\u52a0\u53d1\u9001\u5e10\u53f7'),
                     (b'set_mailbox', '\u4fee\u6539\u53d1\u9001\u5e10\u53f7'),
                     (b'del_mailbox', '\u5220\u9664\u53d1\u9001\u5e10\u53f7'),
                     (b'update_count', '\u4fee\u6539\u7fa4\u53d1\u91cf'),
                     (b'sys_auto_return',
                      '\u7cfb\u7edf\u81ea\u52a8\u8fd4\u91cf'),
                     (b'disable_account',
                      '\u5220\u9664\u7fa4\u53d1\u5e10\u6237'),
                     (b'recover_account',
                      '\u6062\u590d\u7fa4\u53d1\u5e10\u6237')
                 ],
                                  db_index=True,
                                  default='',
                                  max_length=20,
                                  verbose_name='\u64cd\u4f5c\u7c7b\u578b')),
                ('desc', models.TextField(verbose_name='\u8bf4\u660e')),
                ('ip',
                 models.CharField(blank=True,
                                  max_length=15,
                                  null=True,
                                  verbose_name='\u540d\u79f0')),
            ],
            options={
                'db_table': 'core_log',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='CoreLoginAreaIp',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_open',
                 models.BooleanField(
                     default=False,
                     verbose_name=
                     '\u662f\u5426\u5f00\u542f\u767b\u9646\u4fdd\u62a4')),
                ('area',
                 models.TextField(
                     help_text=
                     '\u533a\u57df\u4e4b\u95f4\u7528\u201c,\u201d\u53f7\u9694\u5f00',
                     verbose_name=
                     '\u5ba2\u6237\u767b\u9646\u6240\u5c5e\u533a\u57df')),
                ('ip',
                 models.TextField(
                     help_text=
                     'IP\u4e4b\u95f4\u7528\u201c,\u201d\u53f7\u9694\u5f00',
                     verbose_name='\u5ba2\u6237\u767b\u9646\u6240\u5c5eIP')),
            ],
            options={
                'db_table': 'core_customer_area_ip_setting',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='CorePasswordAlter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('uuid', models.CharField(max_length=50, verbose_name='UUID')),
                ('token', models.CharField(max_length=50,
                                           verbose_name='TOKEN')),
                ('isvalid',
                 models.BooleanField(default=True,
                                     verbose_name='\u662f\u5426\u5b9e\u73b0')),
                ('expire_time',
                 models.FloatField(default=0,
                                   verbose_name='\u8fc7\u671f\u65f6\u95f4')),
            ],
            options={
                'db_table': 'core_password_alter',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='CoreSuggest',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('score',
                 models.SmallIntegerField(
                     default=1, verbose_name='\u8bc4\u4ef7\u7ea7\u522b')),
                ('suggest',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='\u5efa\u8bae')),
                ('created',
                 models.DateTimeField(
                     auto_now_add=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
            ],
            options={
                'db_table': 'core_suggest',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='CustomerDomain',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('domain',
                 models.CharField(
                     help_text=
                     '\u4e0d\u5efa\u8bae\u6dfb\u52a0\u4f01\u4e1a\u90ae\u7bb1\u57df\u540d\uff0c\u5c06\u5bfc\u81f4\u4f01\u4e1a\u90ae\u7bb1\u6536\u4fe1\u5f02\u5e38\uff0c\u5efa\u8bae\u5728\u5df2\u6709\u4f01\u4e1a\u90ae\u7bb1\u57df\u540d\u7684\u60c5\u51b5\u4e0b\u521b\u5efa\u4e8c\u7ea7\u57df\u540d\u3002',
                     max_length=100,
                     verbose_name='\u53d1\u9001\u57df\u540d')),
                ('status',
                 models.CharField(choices=[(b'Y', '\u9a8c\u8bc1\u901a\u8fc7'),
                                           (b'N', '\u5f85\u9a8c\u8bc1'),
                                           (b'f',
                                            '\u9a8c\u8bc1\u672a\u901a\u8fc7')],
                                  default='N',
                                  max_length=1,
                                  verbose_name='\u72b6\u6001')),
                ('dkim_selector',
                 models.CharField(blank=True,
                                  default='umail',
                                  max_length=50,
                                  null=True,
                                  verbose_name='\u5b50\u57df\u540d')),
                ('dkim_private',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='\u79c1\u94a5')),
                ('dkim_public',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='\u516c\u94a5')),
                ('add_time',
                 models.DateTimeField(
                     auto_now_add=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('is_spf',
                 models.CharField(choices=[(b'Y', '\u9a8c\u8bc1\u901a\u8fc7'),
                                           (b'N', '\u5f85\u9a8c\u8bc1'),
                                           (b'f',
                                            '\u9a8c\u8bc1\u672a\u901a\u8fc7')],
                                  default='N',
                                  max_length=1,
                                  verbose_name='spf\u68c0\u6d4b\u72b6\u6001')),
                ('is_mx',
                 models.CharField(choices=[(b'Y', '\u9a8c\u8bc1\u901a\u8fc7'),
                                           (b'N', '\u5f85\u9a8c\u8bc1'),
                                           (b'f',
                                            '\u9a8c\u8bc1\u672a\u901a\u8fc7')],
                                  default='N',
                                  max_length=1,
                                  verbose_name='mx\u68c0\u6d4b\u72b6\u6001')),
                ('is_dkim',
                 models.CharField(
                     choices=[(b'Y', '\u9a8c\u8bc1\u901a\u8fc7'),
                              (b'N', '\u5f85\u9a8c\u8bc1'),
                              (b'f', '\u9a8c\u8bc1\u672a\u901a\u8fc7')],
                     default='N',
                     max_length=1,
                     verbose_name='dkim\u68c0\u6d4b\u72b6\u6001')),
            ],
            options={
                'db_table': 'core_customer_domain',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='CustomerMailbox',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('domain',
                 models.CharField(max_length=100,
                                  verbose_name='\u53d1\u9001\u57df\u540d')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=25,
                                  null=True,
                                  verbose_name='\u540d\u79f0')),
                ('mailbox',
                 models.CharField(blank=True,
                                  max_length=80,
                                  null=True,
                                  verbose_name='\u90ae\u7bb1\u8d26\u53f7')),
                ('password',
                 models.CharField(blank=True,
                                  max_length=40,
                                  null=True,
                                  verbose_name='\u5bc6\u7801')),
                ('disabled',
                 models.CharField(blank=True,
                                  choices=[(b'0', '\u6b63\u5e38'),
                                           (b'1', '\u7981\u7528')],
                                  default='0',
                                  max_length=1,
                                  null=True,
                                  verbose_name='\u662f\u5426\u7981\u7528')),
            ],
            options={
                'db_table': 'core_mailbox',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='CustomerOrder',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('orderno',
                 models.CharField(editable=False,
                                  max_length=50,
                                  unique=True,
                                  verbose_name='\u8ba2\u5355\u53f7')),
                ('product_desc',
                 models.CharField(max_length=128,
                                  verbose_name='\u5546\u54c1\u63cf\u8ff0')),
                ('product_detail',
                 models.TextField(max_length=1000,
                                  verbose_name='\u5546\u54c1\u8be6\u60c5')),
                ('fee',
                 models.DecimalField(
                     decimal_places=0,
                     max_digits=6,
                     verbose_name='\u91d1\u989d(\u5355\u4f4d:\u5143)')),
                ('qty_buy',
                 models.IntegerField(default=0,
                                     verbose_name='\u8d2d\u4e70\u70b9\u6570')),
                ('attach',
                 models.CharField(blank=True,
                                  max_length=127,
                                  null=True,
                                  verbose_name='\u9644\u52a0\u6570\u636e')),
                ('dt_start',
                 models.DateTimeField(
                     blank=True,
                     null=True,
                     verbose_name='\u4ea4\u6613\u5f00\u59cb\u65f6\u95f4')),
                ('dt_end',
                 models.DateTimeField(
                     blank=True,
                     null=True,
                     verbose_name='\u4ea4\u6613\u5931\u6548\u65f6\u95f4')),
                ('dt_pay',
                 models.DateTimeField(
                     blank=True,
                     null=True,
                     verbose_name='\u4ed8\u6b3e\u65f6\u95f4')),
                ('status',
                 models.CharField(choices=[(b'waiting',
                                            '\u7b49\u5f85\u4ed8\u6b3e'),
                                           (b'paied', '\u5df2\u4ed8\u6b3e'),
                                           (b'lapsed', '\u5df2\u5931\u6548'),
                                           (b'cancel', '\u5df2\u53d6\u6d88')],
                                  default='waiting',
                                  max_length=10,
                                  verbose_name='\u72b6\u6001')),
                ('payway',
                 models.CharField(choices=[
                     (b'WEIXIN', '\u5fae\u4fe1\u652f\u4ed8'),
                     (b'ALI', '\u652f\u4ed8\u5b9d\u652f\u4ed8')
                 ],
                                  default=b'WEIXIN',
                                  max_length=10,
                                  verbose_name='\u652f\u4ed8\u65b9\u5f0f')),
                ('created',
                 models.DateTimeField(
                     auto_now_add=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('updated',
                 models.DateTimeField(
                     auto_now=True, verbose_name='\u4fee\u6539\u65f6\u95f4')),
            ],
            options={
                'db_table': 'core_customer_order',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='CustomerTplSetting',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('encoding',
                 models.CharField(choices=[(b'base64', 'base64'),
                                           (b'quoted-printable',
                                            'quoted-printable')],
                                  default='base64',
                                  max_length=50,
                                  verbose_name='\u90ae\u4ef6\u7f16\u7801')),
                ('character',
                 models.CharField(
                     choices=[
                         (b'utf-8', 'utf-8'), (b'iso-8859-1', 'iso-8859-1'),
                         (b'gb180308', 'gb180308'), (b'euc-jp', 'euc-jp')
                     ],
                     default='utf-8',
                     max_length=32,
                     verbose_name='\u8f6c\u6362\u5b57\u7b26\u96c6')),
                ('image_encode',
                 models.CharField(
                     choices=[(b'N', '\u5426'), (b'Y', '\u662f')],
                     default='N',
                     help_text=
                     '\u5426\uff1a\u90ae\u4ef6\u5185\u7684\u56fe\u7247\u4f1a\u81ea\u52a8\u4e0a\u4f20\u5230U-Mail\u670d\u52a1\u5668\u4e0a\uff0c\u4ee5\u5916\u90e8\u56fe\u50cf\u94fe\u63a5\u7684\u65b9\u5f0f\u663e\u793a\u56fe\u7247\u3002\u662f\uff1a\u90ae\u4ef6\u6240\u4f7f\u7528\u7684\u56fe\u50cf\u5185\u5d4c\u5728\u90ae\u4ef6\u6d88\u606f\u4e2d\u3002 \u8fd9\u5c06\u5bfc\u81f4\u90ae\u4ef6\u5927\u5c0f\u7684\u589e\u52a0(\u6263\u9664\u66f4\u591a\u7fa4\u53d1\u70b9\u6570), \u4f46\u662f\u90ae\u4ef6\u5374\u53ef\u4ee5\u8131\u673a\u6d4f\u89c8\u3002 ',
                     max_length=32,
                     verbose_name='\u662f\u5426\u5185\u5d4c\u7167\u7247')),
                ('attachtype',
                 models.CharField(
                     choices=[(b'common',
                               '\u4f20\u7edf\u5185\u5d4c\u9644\u4ef6'),
                              (b'html', '\u5728\u7ebf\u9644\u4ef6')],
                     default='common',
                     help_text=
                     '\u4f20\u7edf\u9644\u4ef6\uff1a\u4ee5\u666e\u901a\u7684\u90ae\u4ef6\u9644\u4ef6\u5f62\u5f0f\u53d1\u9001\uff0c\u9644\u4ef6\u5927\u5c0f\u4f1a\u589e\u52a0\u90ae\u4ef6\u5927\u5c0f\uff0c\u4f46\u662f\u9644\u4ef6\u53ef\u4ee5\u8131\u673a\u67e5\u770b\u3002\u5728\u7ebf\u9644\u4ef6\uff1a\u90ae\u4ef6\u7684\u9644\u4ef6\u4ee5HTML\u8d85\u94fe\u63a5\u7684\u5f62\u5f0f\u5185\u5d4c\u5728\u90ae\u4ef6\u6d88\u606f\u4e2d\uff0c\u4e0d\u4f1a\u589e\u5927\u90ae\u4ef6\u5927\u5c0f\uff0c\u4f46\u662f\u9700\u8981\u7f51\u7edc\u624d\u53ef\u8bbf\u95ee\u3002 ',
                     max_length=32,
                     verbose_name='\u9644\u4ef6\u8bbe\u7f6e')),
            ],
            options={
                'db_table': 'core_customer_tpl_setting',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='DefaultMailbox',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('account',
                 models.CharField(blank=True,
                                  max_length=64,
                                  null=True,
                                  verbose_name='\u540d\u79f0')),
            ],
            options={
                'db_table': 'core_mss_default_acct',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Domain',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('domain',
                 models.CharField(max_length=100,
                                  verbose_name='\u53d1\u9001\u57df\u540d')),
                ('grant_agent',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='\u4ee3\u7406\u5546')),
            ],
            options={
                'db_table': 'core_domain',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='MailBox',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('domain',
                 models.CharField(blank=True,
                                  db_index=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='\u5ba2\u6237\u57df\u540d')),
                ('name',
                 models.CharField(
                     blank=True,
                     max_length=25,
                     null=True,
                     verbose_name='\u53d1\u4ef6\u4eba\u540d\u79f0')),
                ('mailbox',
                 models.CharField(
                     blank=True,
                     db_index=True,
                     max_length=80,
                     null=True,
                     verbose_name='\u53d1\u4ef6\u4eba\u90ae\u7bb1')),
                ('password',
                 models.CharField(blank=True,
                                  max_length=40,
                                  null=True,
                                  verbose_name='\u5bc6\u7801')),
                ('disabled',
                 models.CharField(choices=[(b'0', '\u6b63\u5e38'),
                                           (b'1', '\u7981\u7528')],
                                  default='0',
                                  max_length=1,
                                  verbose_name='\u72b6\u6001')),
            ],
            options={
                'db_table': 'core_mailbox',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Manager',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('username', models.CharField(max_length=25, unique=True)),
                ('fullname', models.CharField(max_length=50)),
                ('phone',
                 models.CharField(max_length=20, verbose_name='\u7535\u8bdd')),
                ('mobile',
                 models.CharField(max_length=20, verbose_name='\u624b\u673a')),
                ('email',
                 models.CharField(max_length=50, verbose_name='\u90ae\u7bb1')),
                ('im', models.CharField(max_length=50, verbose_name='QQ/MSN')),
            ],
            options={
                'db_table': 'core_manager',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Prefs',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(db_index=True,
                                  max_length=30,
                                  verbose_name='\u952e')),
                ('value',
                 models.TextField(blank=True, null=True,
                                  verbose_name='\u503c')),
            ],
            options={
                'db_table': 'core_prefs',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Services',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_trial',
                 models.CharField(
                     choices=[(b'0', b'0'), (b'1', b'1')],
                     default='0',
                     max_length=1,
                     verbose_name='\u662f\u5426\u4e3a\u6d4b\u8bd5\u7528\u6237')
                 ),
                ('is_verify',
                 models.CharField(
                     choices=[(b'0', b'0'), (b'1', b'1')],
                     default='0',
                     max_length=1,
                     verbose_name='\u662f\u5426\u4e3a\u5ba1\u6838\u7528\u6237')
                 ),
                ('server_type',
                 models.CharField(choices=[(b'0', b'0'), (b'1', b'1'),
                                           (b'2', b'2'), (b'3', b'3'),
                                           (b'4', b'4'), (b'5', b'5')],
                                  default='0',
                                  max_length=1)),
                ('send_type',
                 models.CharField(choices=[(b'local', b'local'),
                                           (b'remote', b'remote')],
                                  default='local',
                                  max_length=16)),
                ('service_type',
                 models.CharField(choices=[(b'all', b'all'), (b'day', b'day')],
                                  default='local',
                                  max_length=16)),
                ('service_start',
                 models.DateTimeField(
                     default='0000-00-00 00:00:00',
                     verbose_name='\u670d\u52a1\u5f00\u59cb\u65f6\u95f4')),
                ('service_end',
                 models.DateTimeField(
                     default='0000-00-00 00:00:00',
                     verbose_name='\u670d\u52a1\u7ed3\u675f\u65f6\u95f4')),
                ('qty_count', models.IntegerField(default=0)),
                ('qty_valid', models.IntegerField(default=0)),
                ('qty_buytotal', models.IntegerField(default=0)),
                ('error_stat_ratio', models.FloatField(default=0.15)),
                ('refuse_error_stat_ratio', models.FloatField(default=0.5)),
                ('ws_rate_limit', models.IntegerField(default=0)),
                ('module_permit', models.TextField(blank=True, null=True)),
                ('disabled',
                 models.CharField(choices=[(b'0', '\u6b63\u5e38'),
                                           (b'1', '\u7981\u7528')],
                                  default='0',
                                  max_length=1)),
                ('disabled_date', models.DateField(default='0000-00-00')),
                ('track_domain',
                 models.CharField(
                     blank=True,
                     help_text=
                     '\u5ba2\u6237\u6307\u5b9a\u57df\u540d\uff0c\u66ff\u6362\u8ddf\u8e2a\u7edf\u8ba1\u94fe\u63a5\u57df\u540d',
                     max_length=100,
                     null=True,
                     verbose_name='\u5ba2\u6237\u6307\u5b9a\u57df\u540d')),
                ('addr_export',
                 models.CharField(
                     choices=[(b'0', b'0'), (b'1', b'1')],
                     default='1',
                     help_text=
                     '\u5730\u5740\u6c60\u5bfc\u51fa\u529f\u80fd\uff0c1\u4e3a\u5f00\u542f\uff0c0\u4e3a\u7981\u7528\uff0c\u9ed8\u8ba4\u4e3a1',
                     max_length=1,
                     verbose_name='\u5f00\u542f\u5bfc\u51fa\u6309\u94ae')),
                ('addr_export_max',
                 models.IntegerField(
                     default=0,
                     help_text=
                     '\u5730\u5740\u5bfc\u51fa\u6700\u5927\u6570\uff0c0\u4e3a\u65e0\u9650\u5236',
                     verbose_name='\u5730\u5740\u6c60\u5bfc\u51fa\u9650\u5236')
                 ),
                ('timezone',
                 models.SmallIntegerField(
                     default=8,
                     help_text=
                     '\u65f6\u533a\uff0c\u76f8\u5bf9GMT\u65f6\u95f4\uff0c\u59828\u8868\u793aGMT+8\uff0c\u5317\u4eac\u65f6\u95f4',
                     verbose_name='\u65f6\u533a')),
                ('cannotview_html',
                 models.TextField(
                     blank=True,
                     help_text=
                     '\u90ae\u4ef6\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\uff0c\u63d0\u793a\u67e5\u770b\u5728\u7ebf\u7248\u672c\u7684\u5185\u5bb9',
                     null=True)),
                ('unsubscribe_html',
                 models.TextField(
                     blank=True,
                     help_text=
                     '\u9000\u8ba2\u90ae\u4ef6\u5217\u8868\u94fe\u63a5\u5185\u5bb9',
                     null=True)),
                ('is_maintain', models.SmallIntegerField(default=0)),
                ('is_high_quality', models.SmallIntegerField(default=0)),
                ('maintain_rate', models.IntegerField(default=50)),
                ('updated',
                 models.DateTimeField(
                     default='0000-00-00 00:00:00',
                     verbose_name='\u66f4\u65b0\u65f6\u95f4')),
            ],
            options={
                'db_table': 'core_services',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='WeixinCustomer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('unionid',
                 models.CharField(max_length=50,
                                  unique=True,
                                  verbose_name='nionid')),
                ('openid',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='openid')),
                ('access_token',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='access_token')),
                ('refresh_token',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='refresh_token')),
                ('province',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='\u7701\u4efd')),
                ('headimgurl',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='\u5934\u50cf\u56fe\u7247')),
                ('language',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='\u8bed\u8a00')),
                ('city',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='\u57ce\u5e02')),
                ('country',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='\u56fd\u5bb6')),
                ('sex',
                 models.CharField(blank=True,
                                  choices=[(b'1', '\u7537'), (b'2', '\u5973')],
                                  default='1',
                                  max_length=20,
                                  null=True,
                                  verbose_name='\u7701\u4efd')),
                ('nickname',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='\u540d\u79f0')),
                ('created',
                 models.DateTimeField(
                     auto_now_add=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('updated',
                 models.DateTimeField(
                     auto_now=True, verbose_name='\u4fee\u6539\u65f6\u95f4')),
            ],
            options={
                'db_table': 'core_weixin_customer',
                'managed': False,
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Listing',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=64)),
                ('description', models.CharField(max_length=9000)),
                ('image_url', models.URLField(max_length=900)),
                ('is_active', models.BooleanField(default=False)),
                ('starting_bid',
                 models.DecimalField(
                     decimal_places=2,
                     max_digits=10,
                     validators=[
                         django.core.validators.MinValueValidator(0.01)
                     ])),
                ('current_bid',
                 models.DecimalField(decimal_places=2, max_digits=10)),
                ('category',
                 models.CharField(choices=[('Watches', 'Watches'),
                                           ('Video Games', 'Video Games'),
                                           ('Everything Else',
                                            'Everything Else')],
                                  max_length=64)),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('seller',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Watchlist',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('listing',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='auctions.Listing')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.CharField(max_length=9000)),
                ('comment_time', models.DateTimeField(auto_now_add=True)),
                ('commenter',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
                ('listing',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='auctions.Listing')),
            ],
        ),
        migrations.CreateModel(
            name='Bid',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('bid_amount',
                 models.DecimalField(decimal_places=2, max_digits=5)),
                ('bid_time', models.DateTimeField(auto_now_add=True)),
                ('bidder',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
                ('listing',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='auctions.Listing')),
            ],
        ),
    ]
Пример #30
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('survey', models.BooleanField(default=False)),
                ('genre', models.CharField(default='', max_length=150)),
                ('followers',
                 models.ManyToManyField(related_name='followings',
                                        to=settings.AUTH_USER_MODEL)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Actor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Director',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('genreNm', models.CharField(max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('movieCd', models.CharField(max_length=20)),
                ('title', models.CharField(max_length=150)),
                ('description', models.TextField()),
                ('image', models.CharField(max_length=150)),
                ('openDt', models.CharField(max_length=12)),
                ('audiAcc', models.IntegerField()),
                ('score', models.DecimalField(decimal_places=2, max_digits=4)),
                ('backgroundImage', models.CharField(max_length=150)),
                ('actors',
                 models.ManyToManyField(related_name='movies',
                                        to='movies.Actor')),
                ('directors',
                 models.ManyToManyField(related_name='movies',
                                        to='movies.Director')),
                ('genres',
                 models.ManyToManyField(related_name='movies',
                                        to='movies.Genre')),
                ('like_users',
                 models.ManyToManyField(related_name='like_movies',
                                        to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.CharField(max_length=150)),
                ('score', models.IntegerField()),
                ('movie',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='movies.Movie')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]