class Migration(migrations.Migration):

    initial = True

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

    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')),
                ('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='Restaurant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('time_open', models.TimeField(default='00:00:00')),
                ('time_close', models.TimeField(default='00:00:00')),
                ('address', models.CharField(max_length=100)),
                ('type', models.CharField(max_length=30)),
                ('district', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('review', models.TextField(default='')),
                ('rating', models.FloatField(default=0)),
                ('upvotes', models.IntegerField(default=0)),
                ('downvotes', models.IntegerField(default=0)),
                ('restaurant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Restaurant')),
                ('user', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('bio', models.TextField(blank=True, max_length=512)),
                ('lon', models.DecimalField(decimal_places=3, max_digits=8, null=True)),
                ('lat', models.DecimalField(decimal_places=3, max_digits=8, null=True)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('caption', models.CharField(max_length=128)),
                ('description', models.TextField(blank=True)),
                ('limit', models.IntegerField(null=True)),
                ('start', models.DateTimeField()),
                ('duration', models.TimeField()),
                ('lon', models.DecimalField(decimal_places=3, max_digits=8)),
                ('lat', models.DecimalField(decimal_places=3, max_digits=8)),
            ],
        ),
        migrations.CreateModel(
            name='RoomCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('caption', models.CharField(max_length=128)),
            ],
        ),
        migrations.AddField(
            model_name='room',
            name='category',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.RoomCategory'),
        ),
        migrations.AddField(
            model_name='room',
            name='members',
            field=models.ManyToManyField(to=settings.AUTH_USER_MODEL),
        ),
    ]
Beispiel #3
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('phone', models.CharField(max_length=30, null=True)),
                ('address', models.TextField()),
                ('balance', models.IntegerField(validators=[ValueError])),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            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')),
                ('order_time', models.TimeField(auto_now_add=True)),
                ('status', models.IntegerField(choices=[(1, 1), (2, 2), (3, 3), (4, 4)])),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='market.Customer')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=10, unique=True)),
                ('name', models.CharField(max_length=100)),
                ('price', models.IntegerField(validators=[ValueError])),
                ('inventory', models.IntegerField(validators=[ValueError])),
            ],
        ),
        migrations.CreateModel(
            name='OrderRow',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.IntegerField()),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='market.Order')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='market.Product')),
            ],
        ),
    ]
Beispiel #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')),
                ('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')),
                ('interval', models.PositiveSmallIntegerField(default=1, verbose_name='Scheduling interval')),
                ('weekday', models.CharField(choices=[('MO', 'Monday'), ('TU', 'Tuesday'), ('WE', 'Wednesday'), ('TH', 'Thursday'), ('FR', 'Friday')], default='MO', max_length=20, verbose_name='Weekday')),
                ('email_time', models.TimeField(default=datetime.time(12, 0), verbose_name='Email time')),
                ('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='Baz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('content', tinymce.models.HTMLField(verbose_name='Content')),
            ],
        ),
        migrations.CreateModel(
            name='Target',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.EmailField(max_length=254, verbose_name='Email')),
                ('baz', models.ManyToManyField(related_name='baz_targets', to='main.Baz', verbose_name='Bazinga')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_targets', to=settings.AUTH_USER_MODEL, verbose_name='Customer')),
            ],
        ),
    ]
Beispiel #5
0
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        ('landowners', '0004_alter_landowners_contact_number'),
    ]

    operations = [
        migrations.CreateModel(
            name='LandownerListingsModel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('address', models.CharField(max_length=200)),
                ('city', models.CharField(max_length=100)),
                ('state', models.CharField(max_length=100)),
                ('zipcode', models.CharField(max_length=20)),
                ('price', models.IntegerField()),
                ('sqft', models.IntegerField()),
                ('lot_size', models.DecimalField(decimal_places=1, max_digits=5)),
                ('sale_type', models.CharField(choices=[('for Rent', 'For Rent'), ('for Lease', 'For Lease')], default='for Rent', max_length=50)),
                ('photo_main', models.ImageField(upload_to='photos/%Y/%m/%d')),
                ('photo_1', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d')),
                ('photo_2', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d')),
                ('photo_3', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d')),
                ('is_published', models.BooleanField(default=True)),
                ('date', models.DateField()),
                ('time', models.TimeField()),
                ('complete', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ['complete'],
            },
        ),
        migrations.CreateModel(
            name='RegisterLandownerModel',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, to='auth.user')),
                ('Landowner_id', models.BigAutoField(primary_key=True, serialize=False)),
                ('contact_number', models.CharField(default='', max_length=15)),
                ('description', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.DeleteModel(
            name='Landowners',
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
        ('firstApp', '0006_issue_authorization'),
    ]

    operations = [
        migrations.CreateModel(
            name='userProfile',
            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')),
                ('time_available', models.DecimalField(decimal_places=2, default=5, max_digits=5)),
                ('on_call_start', models.TimeField(blank=True)),
                ('on_call_end', models.TimeField(blank=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.AlterField(
            model_name='issue',
            name='authorization',
            field=models.CharField(default='https://bitbucket.org/auth', help_text='Copy and paste the authorization url you received', max_length=300),
        ),
    ]
Beispiel #7
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('location', models.CharField(max_length=200)),
                ('service',
                 models.CharField(choices=[('AM Break', 'AM_BREAK'),
                                           ('Breakfast', 'BREAKFAST'),
                                           ('Lunch', 'LUNCH'),
                                           ('PM Break', 'PM_BREAK'),
                                           ('Dinner', 'DINNER')],
                                  default='AM Break',
                                  max_length=20)),
                ('quantity', models.CharField(max_length=200)),
                ('time', models.TimeField()),
                ('status_choices',
                 models.CharField(choices=[('Ready', 'READY'),
                                           ('Stand-by', 'STANDBY'),
                                           ('Enroute', 'ENROUTE'),
                                           ('Delivered', 'DELIVERED')],
                                  default='Stand-by',
                                  max_length=20)),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('office',
                 models.ForeignKey(default=None,
                                   on_delete=django.contrib.auth.models.User,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Beispiel #8
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email_to', models.EmailField(max_length=254)),
                ('text', models.TextField()),
                ('time', models.TimeField()),
                ('is_sended', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[],
            options={
                'proxy': True,
            },
            bases=('auth.user', ),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='message',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='email_sender.User'),
        ),
    ]
Beispiel #9
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('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')),
                ('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')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('version', concurrency.fields.IntegerVersionField(default=0, help_text='record revision number')),
                ('email', models.EmailField(max_length=254)),
                ('nickname', models.CharField(max_length=32)),
                ('blocked', models.BooleanField(default=False)),
                ('note', models.TimeField(blank=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()),
            ],
        ),
    ]
Beispiel #10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
        ('Task', '0001_initial'),
        ('Option', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Group',
            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')),
                ('title', models.CharField(max_length=25)),
                ('money', models.IntegerField()),
                ('start', models.TimeField()),
                ('option_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Option.Option')),
                ('task_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Task.Task')),
            ],
            bases=('auth.group', ),
            managers=[
                ('objects', django.contrib.auth.models.GroupManager()),
            ],
        ),
    ]
Beispiel #11
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')),
                ('employee_id', models.CharField(blank=True, max_length=255, null=True, unique=True, verbose_name='社員番号')),
                ('employee_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='氏名')),
                ('employee_kana', models.CharField(blank=True, max_length=255, null=True, verbose_name='氏名(カナ)')),
                ('regular_entry_date', models.DateField(blank=True, null=True, verbose_name='正規の入社年月日')),
                ('job_entry_date', models.DateField(blank=True, null=True, verbose_name='入社年月日')),
                ('continuous_years', models.IntegerField(blank=True, null=True, verbose_name='勤続年数')),
                ('is_retirement', 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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='DayOff',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('the_year', models.IntegerField(verbose_name='年度')),
                ('day_off_type', models.IntegerField(choices=[(10, '有給休暇'), (20, '半日休暇(午前)'), (30, '半日休暇(午後)'), (40, '特別休暇'), (50, '欠勤'), (60, '半日欠勤'), (70, '時間制限有給休暇')], null=True, verbose_name='区分')),
                ('reason_type', models.IntegerField(choices=[(10, '病気'), (20, '家事都合'), (30, '慶事'), (40, '弔事'), (50, 'その他')], null=True, verbose_name='事由')),
                ('detail_type', models.IntegerField(blank=True, choices=[(10, '本人が結婚'), (20, '本人の子供が結婚'), (30, '配偶者の出産'), (40, '弔事(配偶者・実父母・実養子・祖父母・配偶者の父母・兄弟姉妹・孫)')], default=None, null=True, verbose_name='事由・詳細')),
                ('apply_day', models.DateField(null=True, verbose_name='届出日')),
                ('start_day', models.DateField(blank=True, null=True, verbose_name='開始日')),
                ('end_day', models.DateField(blank=True, null=True, verbose_name='終了日')),
                ('start_time', models.TimeField(blank=True, choices=[(datetime.time(8, 30), '8:30'), (datetime.time(9, 0), '9:00'), (datetime.time(9, 30), '9:30'), (datetime.time(10, 0), '10:00'), (datetime.time(10, 30), '10:30'), (datetime.time(11, 0), '11:00'), (datetime.time(11, 30), '11:30'), (datetime.time(12, 0), '12:00'), (datetime.time(12, 30), '12:30'), (datetime.time(13, 0), '13:00'), (datetime.time(13, 30), '13:30'), (datetime.time(14, 0), '14:00'), (datetime.time(14, 30), '14:30'), (datetime.time(15, 0), '15:00'), (datetime.time(15, 30), '15:30'), (datetime.time(16, 0), '16:00'), (datetime.time(16, 30), '16:30'), (datetime.time(17, 0), '17:00'), (datetime.time(17, 30), '17:30')], null=True, verbose_name='開始時間')),
                ('end_time', models.TimeField(blank=True, choices=[(datetime.time(8, 30), '8:30'), (datetime.time(9, 0), '9:00'), (datetime.time(9, 30), '9:30'), (datetime.time(10, 0), '10:00'), (datetime.time(10, 30), '10:30'), (datetime.time(11, 0), '11:00'), (datetime.time(11, 30), '11:30'), (datetime.time(12, 0), '12:00'), (datetime.time(12, 30), '12:30'), (datetime.time(13, 0), '13:00'), (datetime.time(13, 30), '13:30'), (datetime.time(14, 0), '14:00'), (datetime.time(14, 30), '14:30'), (datetime.time(15, 0), '15:00'), (datetime.time(15, 30), '15:30'), (datetime.time(16, 0), '16:00'), (datetime.time(16, 30), '16:30'), (datetime.time(17, 0), '17:00'), (datetime.time(17, 30), '17:30')], null=True, verbose_name='終了時間')),
                ('working_holiday', models.DateField(blank=True, null=True, verbose_name='休出日')),
                ('compensatory_holiday', models.DateField(blank=True, null=True, verbose_name='代休日')),
                ('transfer_day', models.DateField(blank=True, null=True, verbose_name='振替日')),
                ('working_day', models.DateField(blank=True, null=True, verbose_name='出勤日')),
                ('vacation_days', models.IntegerField(blank=True, default=0, null=True, verbose_name='休暇日数')),
                ('total_days', models.IntegerField(blank=True, default=0, null=True, verbose_name='合計日数')),
                ('total_time', models.IntegerField(blank=True, default=0, null=True, verbose_name='合計時間')),
                ('used_days', models.IntegerField(blank=True, default=0, null=True, verbose_name='使用日数')),
                ('used_time', models.IntegerField(blank=True, default=0, null=True, verbose_name='使用時間')),
                ('rest_days', models.IntegerField(blank=True, default=0, null=True, verbose_name='残日数')),
                ('rest_time', models.IntegerField(blank=True, default=40, null=True, verbose_name='残時間')),
                ('comment', models.TextField(blank=True, null=True, verbose_name='コメント')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vac', to=settings.AUTH_USER_MODEL, verbose_name='ユーザー')),
            ],
        ),
        migrations.CreateModel(
            name='Section',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255, null=True, verbose_name='所属名')),
                ('order', models.IntegerField(blank=True, null=True, verbose_name='ソート順')),
            ],
        ),
        migrations.CreateModel(
            name='Vacation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('the_year', models.IntegerField(default=0, verbose_name='年度')),
                ('transfer_days', models.IntegerField(default=0, verbose_name='繰越日数')),
                ('grant_days', models.IntegerField(default=0, verbose_name='付与日数')),
                ('total_days', models.IntegerField(default=0, verbose_name='合計日数')),
                ('used_days', models.IntegerField(default=0, verbose_name='使用日数')),
                ('used_time', models.IntegerField(default=0, verbose_name='使用時間')),
                ('rest_days', models.IntegerField(default=0, verbose_name='残日数')),
                ('rest_time', models.IntegerField(default=40, verbose_name='残時間')),
                ('absence_days', models.IntegerField(default=0, verbose_name='欠勤日数')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vacations', to=settings.AUTH_USER_MODEL, verbose_name='ユーザー')),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='section',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='users', to='vac.Section', verbose_name='所属'),
        ),
        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'),
        ),
    ]
Beispiel #12
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Participation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.PositiveIntegerField(default=None, null=True)),
                ('time', models.TimeField(default=None, null=True)),
                ('max_tempo', models.TimeField(default=None, null=True)),
                ('min_tempo', models.TimeField(default=None, null=True)),
                ('calories', models.PositiveIntegerField(default=None, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Run',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_datetime', models.DateTimeField()),
                ('distance', models.PositiveIntegerField()),
                ('privacy_level', models.CharField(choices=[('all', 'Public'), ('friends', 'Friends only'), ('me', 'Only me')], max_length=10)),
                ('max_runners', models.PositiveIntegerField()),
            ],
        ),
        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')),
                ('avatar', models.ImageField(upload_to='')),
                ('date_joined', models.DateField(auto_now_add=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.AddField(
            model_name='participation',
            name='run',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='REST.Run'),
        ),
        migrations.AddField(
            model_name='participation',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
Beispiel #13
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='NFCUser',
            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.ASCIIUsernameValidator(
                         )
                     ],
                     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')),
                ('name', models.CharField(max_length=20)),
                ('type',
                 models.CharField(choices=[('Faculty', 'Faculty'),
                                           ('Student', 'Student'),
                                           ('Admin', 'Admin')],
                                  max_length=10)),
                ('year',
                 models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3'),
                                           ('4', '4')],
                                  max_length=1)),
                ('branch',
                 models.CharField(choices=[('CCE', 'CCE'), ('CSE', 'CSE'),
                                           ('ECE', 'ECE'), ('MME', 'MME')],
                                  max_length=3)),
                ('clist', jsonfield.fields.JSONField()),
                ('lastClass', jsonfield.fields.JSONField()),
                ('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='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('year',
                 models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3'),
                                           ('4', '4'), ('5', 'Other')],
                                  max_length=1)),
                ('branch',
                 models.CharField(choices=[('CCE', 'CCE'), ('CSE', 'CSE'),
                                           ('ECE', 'ECE'), ('MME', 'MME')],
                                  max_length=3)),
                ('courseCode', models.CharField(max_length=10)),
                ('numClasses', models.IntegerField(default=0)),
                ('studentList', jsonfield.fields.JSONField()),
            ],
        ),
        migrations.CreateModel(
            name='LectureSlot',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField()),
                ('time', models.TimeField()),
                ('lt',
                 models.CharField(choices=[(1, 1), (2, 2), (3, 3), (4, 4)],
                                  max_length=4)),
                ('courseCode', models.CharField(max_length=10)),
            ],
        ),
    ]
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')),
            ],
            options={
                'abstract': False,
                'verbose_name_plural': 'users',
                'verbose_name': 'user',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('ais_num', models.PositiveIntegerField(primary_key=True, serialize=False)),
                ('subject', models.CharField(max_length=4)),
                ('catalog_code', models.IntegerField(validators=[django.core.validators.MinValueValidator(10000), django.core.validators.MaxValueValidator(99999)])),
                ('name', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='CourseOffering',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('archived', models.BooleanField(default=False)),
                ('state', models.PositiveIntegerField(choices=[(10, 'Open'), (20, 'Closed')], default=20)),
                ('url_slug', models.CharField(max_length=256, unique=True)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='officehours.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Slot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('start_time', models.TimeField()),
                ('end_time', models.TimeField()),
                ('room', models.CharField(max_length=64)),
                ('course_offering', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='officehours.CourseOffering')),
            ],
        ),
        migrations.CreateModel(
            name='Request',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('service_start_time', models.TimeField(blank=True, null=True)),
                ('service_end_time', models.TimeField(blank=True, null=True)),
                ('state', models.PositiveIntegerField(choices=[(10, 'Pending'), (20, 'Scheduled'), (30, 'In Progress'), (40, 'Completed'), (50, 'No-show'), (60, 'Could not schedule'), (70, 'Cancelled'), (80, 'Invalid')], default=10)),
                ('type', models.PositiveIntegerField(choices=[(10, 'Regular'), (20, 'Quick Question')], default=10)),
                ('description', models.TextField()),
                ('actual_slot', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assigned_slot', to='officehours.Slot')),
                ('additional_students', models.ManyToManyField(related_name='additional_requests', to=settings.AUTH_USER_MODEL)),
                ('course_offering', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='officehours.CourseOffering')),
                ('server', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assigned_requests', to=settings.AUTH_USER_MODEL)),
                ('slots', models.ManyToManyField(to='officehours.Slot')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Quarter',
            fields=[
                ('ais_num', models.PositiveIntegerField(primary_key=True, serialize=False)),
                ('year', models.PositiveIntegerField()),
                ('quarter', models.CharField(choices=[('aut', 'Autumn'), ('win', 'Winter'), ('spr', 'Spring'), ('sum', 'Summer')], max_length=3)),
            ],
            options={
                'unique_together': {('year', 'quarter')},
            },
        ),
        migrations.AddField(
            model_name='courseoffering',
            name='quarter',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='officehours.Quarter'),
        ),
        migrations.AddField(
            model_name='courseoffering',
            name='servers',
            field=models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='ActiveRequest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('course_offering', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='officehours.CourseOffering')),
                ('request', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='officehours.Request')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('user', 'course_offering')},
            },
        ),
        migrations.AddField(
            model_name='user',
            name='active_requests',
            field=models.ManyToManyField(blank=True, through='officehours.ActiveRequest', to='officehours.CourseOffering'),
        ),
        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'),
        ),
        migrations.AlterUniqueTogether(
            name='courseoffering',
            unique_together={('course', 'quarter')},
        ),
    ]
Beispiel #15
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_operator',
                 models.BooleanField(default=False, verbose_name='Опертор')),
                ('is_assistant',
                 models.BooleanField(default=False, verbose_name='Ассистент')),
                ('subscribe_mail',
                 models.BooleanField(
                     default=False,
                     verbose_name='Подписка на почтовую рассылку')),
                ('telegram',
                 models.CharField(blank=True,
                                  max_length=10,
                                  null=True,
                                  verbose_name='Телеграм чат-id')),
                ('subscribe_telegram',
                 models.BooleanField(
                     default=False,
                     verbose_name='Подписка на рассылку в телеграм')),
                ('phone',
                 models.CharField(max_length=100, 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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Application',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=255,
                                  verbose_name='Название приложения')),
                ('created_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Приложение',
                'verbose_name_plural': 'Приложения',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=255,
                                  verbose_name='Название мероприятия')),
                ('description', models.TextField(verbose_name='Описание')),
                ('date_start',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Дата начала мероприятия')),
                ('date_end',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Дата окончания мероприятия')),
                ('created_at', models.DateTimeField(auto_now=True)),
                ('status',
                 models.CharField(choices=[('wait', 'Ожидание'),
                                           ('ready', 'Готово'),
                                           ('rejection', 'Отказ'),
                                           ('completed', 'Окончено')],
                                  default='wait',
                                  max_length=100,
                                  verbose_name='Статус мероприятия')),
            ],
            options={
                'verbose_name': 'Мероприятие',
                'verbose_name_plural': 'Мероприятия',
                'ordering': ['date_start'],
            },
        ),
        migrations.CreateModel(
            name='Server',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=255,
                                  verbose_name='Название сервера')),
                ('server_address',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='Адрес сервера')),
                ('quota',
                 models.PositiveSmallIntegerField(
                     verbose_name='Количество лицензий')),
                ('created_at', models.DateTimeField(auto_now=True)),
                ('server_type',
                 models.CharField(choices=[('external', 'Внешний сервер'),
                                           ('local', 'Внутренний сервер')],
                                  default='local',
                                  max_length=100,
                                  verbose_name='Тип сервера')),
                ('application',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='schedule.application',
                                   verbose_name='Приложение')),
                ('responsible',
                 models.ManyToManyField(
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Ответственные сотрудники')),
            ],
            options={
                'verbose_name': 'Сервер',
                'verbose_name_plural': 'Сервера',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address',
                 models.CharField(max_length=255, verbose_name='Адрес')),
                ('room',
                 models.CharField(max_length=255, verbose_name='Комната')),
                ('quota',
                 models.PositiveIntegerField(verbose_name='Вместимость')),
                ('created_at', models.DateTimeField(auto_now=True)),
                ('applications',
                 models.ManyToManyField(related_name='related_room',
                                        to='schedule.Application',
                                        verbose_name='Доступные приложения')),
                ('responsible',
                 models.ManyToManyField(
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Ответственные сотрудники')),
            ],
            options={
                'verbose_name': 'Помещение',
                'verbose_name_plural': 'Помещения',
                'ordering': ['address'],
            },
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=255,
                                  verbose_name='Название организации')),
                ('created_at', models.DateTimeField(auto_now=True)),
                ('room',
                 models.ManyToManyField(related_name='related_room',
                                        to='schedule.Room',
                                        verbose_name='Доступные помещения')),
            ],
            options={
                'verbose_name': 'Организация',
                'verbose_name_plural': 'Организации',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Grade',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('grade',
                 models.SmallIntegerField(choices=[(1, 'Очень плохо'),
                                                   (2, 'Плохо'),
                                                   (3, 'Удовлетворительно'),
                                                   (4, 'Хорошо'),
                                                   (5, 'Отлично')],
                                          verbose_name='Оценка')),
                ('comment',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Комментарий')),
                ('created_at', models.DateTimeField(auto_now=True)),
                ('created_by',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Сотрудник')),
                ('event',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='schedule.event',
                                   verbose_name='Мероприятие')),
            ],
            options={
                'verbose_name': 'Оценка',
                'verbose_name_plural': 'Оценки',
                'ordering': ['created_at'],
            },
        ),
        migrations.AddField(
            model_name='event',
            name='organization',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='schedule.organization',
                verbose_name='Организация'),
        ),
        migrations.AddField(
            model_name='event',
            name='responsible',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='Ответственный сотрудник'),
        ),
        migrations.CreateModel(
            name='Conference',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Описание')),
                ('file',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to='uploads/%Y/%m/%d/',
                                  verbose_name='Файл')),
                ('quota',
                 models.PositiveSmallIntegerField(
                     blank=True,
                     null=True,
                     verbose_name='Количество участников')),
                ('link',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='Ссылка')),
                ('date', models.DateField(verbose_name='Дата проведения')),
                ('time_start', models.TimeField(verbose_name='Время начала')),
                ('time_end', models.TimeField(verbose_name='Время окончания')),
                ('created_at', models.DateTimeField(auto_now=True)),
                ('status',
                 models.CharField(choices=[('wait', 'Ожидание'),
                                           ('ready', 'Готово'),
                                           ('rejection', 'Отказ'),
                                           ('completed', 'Окончено')],
                                  default='wait',
                                  max_length=100,
                                  verbose_name='Статус видеоконференции')),
                ('comment',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Комментарий')),
                ('event',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='schedule.event',
                                   verbose_name='Мероприятие')),
                ('responsible',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Ответственный сотрудник')),
                ('server',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='schedule.server',
                                   verbose_name='Сервер')),
            ],
            options={
                'verbose_name': 'Конференция',
                'verbose_name_plural': 'Конференции',
                'ordering': ['date', 'time_start'],
            },
        ),
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('without_conference',
                 models.BooleanField(default=False,
                                     verbose_name='Без конференции')),
                ('quota',
                 models.PositiveSmallIntegerField(
                     verbose_name='Количество участников')),
                ('date', models.DateField(verbose_name='Дата проведения')),
                ('time_start', models.TimeField(verbose_name='Время начала')),
                ('time_end', models.TimeField(verbose_name='Время окончания')),
                ('created_at', models.DateTimeField(auto_now=True)),
                ('status',
                 models.CharField(choices=[('wait', 'Ожидание'),
                                           ('ready', 'Готово'),
                                           ('rejection', 'Отказ'),
                                           ('completed', 'Окончено')],
                                  default='wait',
                                  max_length=100,
                                  verbose_name='Статус бронирования')),
                ('comment',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Комментарий')),
                ('conference',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='schedule.conference',
                                   verbose_name='Конференция')),
                ('event',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='schedule.event',
                                   verbose_name='Мероприятие')),
                ('responsible',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Ответственный сотрудник')),
                ('room',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='schedule.room',
                                   verbose_name='Место проведения')),
            ],
            options={
                'verbose_name': 'Бронирование',
                'verbose_name_plural': 'Бронирования',
                'ordering': ['date', 'time_start'],
            },
        ),
        migrations.AddField(
            model_name='user',
            name='organization',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='schedule.organization',
                verbose_name='Организация'),
        ),
        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'),
        ),
    ]
Beispiel #16
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Reservacion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('realizado', models.BooleanField(default=False)),
                ('asientos', models.IntegerField()),
                ('estado_pago', models.BooleanField()),
                ('estado_reserva',
                 models.PositiveSmallIntegerField(choices=[(1, 'EN_ESPERA'),
                                                           (2, 'ACEPTADO'),
                                                           (3, 'RECHAZADO')],
                                                  default=1)),
            ],
            options={
                'verbose_name': 'Reservación',
                'verbose_name_plural': 'Reservaciones',
            },
        ),
        migrations.CreateModel(
            name='Tramo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('hora_inicio', models.TimeField()),
                ('hora_final', models.TimeField()),
                ('precio', models.IntegerField()),
                ('asientos_libres', models.IntegerField()),
                ('ciudad_origen', models.CharField(max_length=30)),
                ('ciudad_destino', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Valoracion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('valoracion', models.IntegerField()),
                ('comentario', models.CharField(max_length=140)),
            ],
            options={
                'verbose_name': 'Valoración',
                'verbose_name_plural': 'Valoraciones',
            },
        ),
        migrations.CreateModel(
            name='Viaje',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('tiempo_inicio', models.DateTimeField()),
                ('asientos', models.IntegerField()),
                ('ciudad_origen', models.CharField(max_length=30)),
                ('ciudad_destino', models.CharField(max_length=30)),
                ('en_curso', models.BooleanField(default=False)),
                ('realizado', models.BooleanField()),
            ],
        ),
        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')),
                ('es_chofer', models.BooleanField(default=False)),
                ('es_pasajero', models.BooleanField(default=False)),
                ('rut', models.IntegerField(default=0)),
                ('nacimiento',
                 models.DateField(default=django.utils.timezone.now)),
                ('celular', models.BigIntegerField(default=0)),
                ('fumador', models.BooleanField(default=False)),
                ('mascotas', models.BooleanField(default=False)),
                ('musica', models.BooleanField(default=False)),
                ('descripcion', models.CharField(default='', max_length=140)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Chofer',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('licencia', models.CharField(max_length=10)),
                ('clase', models.CharField(max_length=10)),
                ('patente', models.CharField(max_length=10)),
                ('marca', models.CharField(max_length=20)),
                ('modelo', models.CharField(max_length=20)),
                ('año', models.CharField(max_length=10)),
                ('color', models.CharField(max_length=20)),
                ('asientos', models.IntegerField()),
            ],
            options={
                'verbose_name': 'Chofer',
                'verbose_name_plural': 'Choferes',
            },
        ),
        migrations.CreateModel(
            name='Pasajero',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        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'),
        ),
        migrations.AddField(
            model_name='valoracion',
            name='emisor',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='emisor',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='valoracion',
            name='receptor',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='receptor',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='tramo',
            name='viaje',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='tramos',
                to='Nucleo.Viaje'),
        ),
        migrations.AddField(
            model_name='reservacion',
            name='tramos',
            field=models.ManyToManyField(related_name='reservas_del_tramo',
                                         to='Nucleo.Tramo'),
        ),
        migrations.AddField(
            model_name='viaje',
            name='conductor',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Nucleo.Chofer'),
        ),
        migrations.AddField(
            model_name='reservacion',
            name='pasajero',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Nucleo.Pasajero'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Owner',
            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')),
                ('full_name',
                 models.CharField(help_text='Full name of the user',
                                  max_length=200)),
                ('phone',
                 models.CharField(
                     help_text=
                     'User phone number (no spaces or dashes, 10 character max)',
                     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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('timestamp',
                 models.DateTimeField(
                     auto_now=True, help_text='Time that the event happened')),
                ('duration',
                 models.IntegerField(
                     help_text='Number of seconds that the event occurred for')
                 ),
                ('event_type',
                 models.CharField(
                     help_text=
                     'String representing the type of event that occurred',
                     max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Lock',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address',
                 models.CharField(
                     default='N/A',
                     help_text='Address of the home where the lock is',
                     max_length=400)),
                ('ip_address',
                 models.CharField(
                     default='127.0.0.1',
                     help_text=
                     'IP Address of Raspberry Pi so we can connect to it.',
                     max_length=14)),
                ('lock_owner',
                 models.ForeignKey(help_text='User ID who owns the lock',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Permission',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('allowed_access_general',
                 models.BooleanField(
                     default=False,
                     help_text='Is the user allowed to open the lock?')),
                ('time_start',
                 models.TimeField(
                     help_text=
                     'At what time can the user open the lock every day?')),
                ('time_end',
                 models.TimeField(
                     help_text='Until what time can the user open the lock?')),
                ('lock',
                 models.ForeignKey(
                     help_text='Lock that the permissions act on',
                     on_delete=django.db.models.deletion.CASCADE,
                     to='lock_owners.Lock')),
            ],
        ),
        migrations.CreateModel(
            name='Resident',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('full_name',
                 models.CharField(help_text='Full name of the resident',
                                  max_length=200)),
                ('lock',
                 models.ForeignKey(
                     help_text='The lock that this Resident was created for',
                     on_delete=django.db.models.deletion.CASCADE,
                     to='lock_owners.Lock')),
            ],
        ),
        migrations.CreateModel(
            name='ResidentImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image_bytes',
                 models.BinaryField(editable=True,
                                    help_text='Image in bytes')),
                ('resident',
                 models.ForeignKey(
                     help_text='Resident that this is an image of',
                     on_delete=django.db.models.deletion.CASCADE,
                     to='lock_owners.Resident')),
            ],
        ),
        migrations.CreateModel(
            name='StrangerReport',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('latitude',
                 models.FloatField(
                     help_text='latitude of suspicious reporting')),
                ('longitude',
                 models.FloatField(
                     help_text='longitude of suspicious reporting')),
                ('stranger_report_time',
                 models.DateTimeField(
                     default=datetime.datetime(2019, 4, 21, 10, 46, 16,
                                               560230),
                     help_text='Date and time the report was made')),
                ('lock',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='lock_owners.Lock')),
            ],
        ),
        migrations.CreateModel(
            name='TempAuth',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('visitor',
                 models.CharField(help_text='Identifying name for the visitor',
                                  max_length=200)),
                ('time_created',
                 models.DateTimeField(
                     auto_now=True,
                     help_text=
                     'Time that the temporary authentication code was assigned'
                 )),
                ('auth_code',
                 models.CharField(
                     default='4e1e68a3-c353-4dea-a26b-fe885c84db32',
                     editable=False,
                     help_text=
                     'The temporary authentication code to assign to the user',
                     max_length=200)),
                ('lock',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='lock_owners.Lock')),
            ],
        ),
        migrations.AddField(
            model_name='permission',
            name='resident',
            field=models.ForeignKey(
                help_text='User that permissions are for',
                on_delete=django.db.models.deletion.CASCADE,
                to='lock_owners.Resident'),
        ),
        migrations.AddField(
            model_name='event',
            name='lock',
            field=models.ForeignKey(
                help_text='Lock where the event occurred',
                on_delete=django.db.models.deletion.CASCADE,
                to='lock_owners.Lock'),
        ),
        migrations.AddField(
            model_name='owner',
            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'),
        ),
    ]
Beispiel #18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            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=20, verbose_name='Name')),
                ('dob', models.DateField(verbose_name='Date of Birth')),
                ('phone_number',
                 models.CharField(max_length=20, verbose_name='Phone Number')),
                ('address',
                 models.CharField(max_length=20, verbose_name='Address')),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=20)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('auth.user', ),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Food',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('food_name', models.CharField(max_length=30)),
                ('food_type',
                 models.CharField(choices=[('D', 'Dietary'),
                                           ('VF', 'Vegetable and Fruits'),
                                           ('K', 'Korean Food'),
                                           ('C', 'Chinese Food'),
                                           ('T', 'Taiwan Food')],
                                  max_length=20)),
                ('image',
                 models.ImageField(default='default.jpg',
                                   upload_to='food_pictures')),
                ('price', models.IntegerField()),
                ('quality',
                 models.CharField(choices=[('E', 'Excellent'), ('G', 'Good'),
                                           ('N', 'Normal'), ('B', 'Bad'),
                                           ('VB', 'Very Bad')],
                                  max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Staff',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='Name')),
                ('dob', models.DateField(verbose_name='Date of Birth')),
                ('phone_number',
                 models.CharField(max_length=20, verbose_name='Phone Number')),
                ('address',
                 models.CharField(max_length=20, verbose_name='Address')),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('supplier_name', models.CharField(max_length=30)),
                ('phone_number', models.CharField(max_length=20)),
                ('email', models.EmailField(max_length=20)),
                ('address', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(default='staff_pictures/default.jpg',
                                   upload_to='staff_pictures')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrderFood',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.IntegerField(default=1)),
                ('ordered', models.BooleanField(default=False)),
                ('customer',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Ordered By')),
                ('food',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='staff.food')),
            ],
        ),
        migrations.CreateModel(
            name='FoodCart',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('purchased_date', models.DateField(auto_now_add=True)),
                ('purchased_time', models.TimeField(auto_now_add=True)),
                ('ordered', models.BooleanField(default=False)),
                ('customer',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Ordered By')),
                ('food_to_order',
                 models.ManyToManyField(to='staff.OrderFood')),
            ],
        ),
        migrations.AddField(
            model_name='food',
            name='food_supplier',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='staff.supplier'),
        ),
        migrations.CreateModel(
            name='Delivery',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('delivered', models.BooleanField(default=True)),
                ('deliver_request_date', models.DateField(auto_now_add=True)),
                ('deliver_request_time', models.TimeField(auto_now_add=True)),
                ('customer',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='staff.customer')),
                ('food_to_deliver',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='staff.foodcart')),
                ('staff_to_deliver',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='staff.staff')),
            ],
        ),
        migrations.CreateModel(
            name='CustomerPayment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('total_price', models.IntegerField(default=1)),
                ('payment_method',
                 models.CharField(choices=[('M', 'Master'), ('F', 'Visa'),
                                           ('F', 'Paypal'), ('F', 'Cash'),
                                           ('F', 'Transfer')],
                                  max_length=20)),
                ('name_on_card', models.CharField(max_length=30)),
                ('card_number', models.CharField(max_length=30)),
                ('customer',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('food_cart',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='staff.foodcart')),
            ],
        ),
    ]
Beispiel #19
0
class Migration(migrations.Migration):

    initial = True

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

    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. 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')),
                ('phone', models.IntegerField(null=True, unique=True)),
                ('wallet',
                 models.DecimalField(decimal_places=2,
                                     default=Decimal('1000'),
                                     max_digits=64,
                                     null=True)),
                ('profile_type', models.CharField(max_length=50, null=True)),
                ('credit_number', models.IntegerField(default=1000,
                                                      null=True)),
                ('debit_number', models.IntegerField(default=10000,
                                                     null=True)),
                ('debit_balance', models.IntegerField(default=50000,
                                                      null=True)),
                ('credit_balance', models.IntegerField(default=50000,
                                                       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='BusinessProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('business_name', models.CharField(max_length=100,
                                                   unique=True)),
                ('register_date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('pan_number', models.IntegerField(unique=True)),
                ('pan_name', models.CharField(max_length=100)),
                ('address', models.TextField(max_length=200)),
                ('pincode', models.IntegerField()),
                ('city', models.CharField(max_length=50)),
                ('state', models.CharField(max_length=50)),
                ('business_url_endpoint',
                 models.CharField(max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Price',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('price', models.IntegerField(default=0, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('image', models.ImageField(blank=True, upload_to='image')),
                ('description',
                 models.CharField(default='No Description Added',
                                  max_length=100)),
                ('business_profile',
                 models.ManyToManyField(blank=True,
                                        related_name='business_of_services',
                                        to='business.BusinessProfile')),
                ('price',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='business.Price')),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('amount', models.IntegerField(default=0)),
                ('date', models.DateField(default=django.utils.timezone.now)),
                ('time', models.TimeField(default=django.utils.timezone.now)),
                ('by',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='by_profile',
                     to=settings.AUTH_USER_MODEL)),
                ('service',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='business.Service')),
                ('to',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='to_profile',
                     to='business.BusinessProfile')),
            ],
        ),
        migrations.AddField(
            model_name='businessprofile',
            name='service',
            field=models.ManyToManyField(blank=True,
                                         related_name='services_of_business',
                                         to='business.Service'),
        ),
        migrations.AddField(
            model_name='businessprofile',
            name='user',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
Beispiel #20
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('create_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('update_time',
                 models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_disable',
                 models.BooleanField(default=False, verbose_name='是否禁用')),
                ('is_delete',
                 models.BooleanField(default=False, verbose_name='是否删除')),
                ('title', models.CharField(max_length=100,
                                           verbose_name='轮播图标题')),
                ('image',
                 models.ImageField(upload_to='banner/%Y/%m',
                                   verbose_name='轮播图')),
                ('url', models.URLField(verbose_name='访问地址')),
                ('index', models.IntegerField(default=100,
                                              verbose_name='轮播图顺序')),
            ],
            options={
                'verbose_name': '轮播图',
                'verbose_name_plural': '轮播图',
            },
        ),
        migrations.CreateModel(
            name='EmailVerifyRecord',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('create_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('update_time',
                 models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_disable',
                 models.BooleanField(default=False, verbose_name='是否禁用')),
                ('is_delete',
                 models.BooleanField(default=False, verbose_name='是否删除')),
                ('code', models.CharField(max_length=20, verbose_name='验证码')),
                ('email', models.EmailField(max_length=50,
                                            verbose_name='邮箱地址')),
                ('send_type',
                 models.CharField(choices=[('register', '注册'),
                                           ('forget', '找回密码')],
                                  max_length=10,
                                  verbose_name='验证码类型')),
                ('send_time',
                 models.TimeField(default=datetime.datetime.now,
                                  verbose_name='发送时间')),
            ],
            options={
                'verbose_name': '邮箱验证码',
                'verbose_name_plural': '邮箱验证码',
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            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')),
                ('create_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('update_time',
                 models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_disable',
                 models.BooleanField(default=False, verbose_name='是否禁用')),
                ('is_delete',
                 models.BooleanField(default=False, verbose_name='是否删除')),
                ('nickname',
                 models.CharField(default='', max_length=50,
                                  verbose_name='昵称')),
                ('birthday',
                 models.DateField(blank=True, null=True, verbose_name='生日')),
                ('gender',
                 models.CharField(choices=[('male', '男'), ('female', '女')],
                                  default='',
                                  max_length=6,
                                  verbose_name='性别')),
                ('address',
                 models.CharField(default='',
                                  max_length=100,
                                  null=True,
                                  verbose_name='地址')),
                ('mobile',
                 models.CharField(blank=True,
                                  max_length=11,
                                  null=True,
                                  verbose_name='手机号')),
                ('image',
                 models.ImageField(default='image/default.png',
                                   upload_to='image/%Y/%m',
                                   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': '用户信息',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Beispiel #21
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='WxUser',
            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')),
                ('openid', models.CharField(blank=True, help_text='微信OpenID', max_length=100, null=True, unique=True, verbose_name='微信OpenID')),
                ('avatar_url', models.URLField(blank=True, help_text='头像', null=True, verbose_name='头像')),
                ('nick_name', models.CharField(blank=True, help_text='昵称', max_length=100, null=True, unique=True, verbose_name='昵称')),
                ('gender', models.SmallIntegerField(blank=True, choices=[(1, '男'), (2, '女'), (0, '未知')], help_text='性别', null=True, verbose_name='性别')),
                ('language', models.CharField(blank=True, help_text='语言', max_length=100, null=True, verbose_name='语言')),
                ('city', models.CharField(blank=True, help_text='城市', max_length=200, null=True, verbose_name='城市')),
                ('province', models.CharField(blank=True, help_text='省份', max_length=200, null=True, verbose_name='省份')),
                ('country', models.CharField(blank=True, help_text='国家', max_length=200, null=True, verbose_name='国家')),
                ('date_of_birth', models.DateField(blank=True, help_text='出生日期', null=True, verbose_name='出生日期')),
                ('desc', models.TextField(blank=True, help_text='描述', max_length=2000, null=True, verbose_name='描述')),
                ('mobile_data', models.TextField(blank=True, max_length=2000, null=True, verbose_name='手机号-数据')),
                ('mobile_index', models.TextField(blank=True, max_length=2000, null=True, unique=True, verbose_name='手机号-索引')),
                ('current_role', models.IntegerField(choices=[(0, '游客'), (1, '客户'), (2, '商家')], default=0, help_text='当前用户角色', null=True, verbose_name='当前用户角色')),
                ('is_owner', models.BooleanField(default=False, help_text='是商家', verbose_name='是商家')),
                ('is_client', models.BooleanField(default=True, help_text='是客户', verbose_name='是客户')),
                ('is_manager', models.BooleanField(default=False, help_text='是管理员', verbose_name='是管理员')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
                'swappable': 'AUTH_USER_MODEL',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Dish',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(help_text='商品名称', max_length=255, null=True, verbose_name='商品名称')),
                ('image', models.ImageField(help_text='主照片', null=True, upload_to='dish/', verbose_name='主照片')),
                ('image2', models.ImageField(blank=True, help_text='照片2', null=True, upload_to='dish/', verbose_name='照片2')),
                ('image3', models.ImageField(blank=True, help_text='照片3', null=True, upload_to='dish/', verbose_name='照片3')),
                ('dish4', models.ImageField(blank=True, help_text='照片4', null=True, upload_to='dish/', verbose_name='照片4')),
                ('dish_desc', models.TextField(blank=True, help_text='菜品描述', max_length=2000, null=True, verbose_name='菜品描述')),
                ('price', models.DecimalField(decimal_places=2, default=18.0, help_text='商品价格', max_digits=9, null=True, verbose_name='商品价格')),
                ('sales', models.BigIntegerField(default=0, help_text='销售数量', null=True, verbose_name='销售数量')),
                ('rate_count', models.BigIntegerField(default=0, help_text='点评数量', null=True, verbose_name='点评数量')),
                ('rate_score', models.FloatField(blank=True, help_text='评分', null=True, verbose_name='评分')),
                ('is_active', models.BooleanField(default=True, help_text='是否有效', verbose_name='是否有效')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('confirmed_by', models.ForeignKey(blank=True, help_text='审核人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dish_confirmed_by', to=settings.AUTH_USER_MODEL, verbose_name='审核人员')),
                ('created_by', models.ForeignKey(blank=True, help_text='创建人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dish_created_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人员')),
            ],
            options={
                'verbose_name': '商品',
                'verbose_name_plural': '商品',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='DistrictLevel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('level', models.CharField(help_text='辖区等级', max_length=100, null=True, unique=True, verbose_name='辖区等级')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '辖区等级',
                'verbose_name_plural': '辖区等级',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_code', models.CharField(blank=True, help_text='订单编号', max_length=255, null=True, unique=True, verbose_name='订单编号')),
                ('order_date', models.DateField(help_text='订单日期', null=True, verbose_name='订单日期')),
                ('order_type', models.IntegerField(choices=[(0, '早餐'), (1, '午餐'), (2, '下午茶'), (3, '晚餐'), (4, '夜宵'), (5, '其他')], default=1, help_text='订餐类型 (0-->早餐, 1-->午餐, 2-->下午茶, 3-->晚餐, 4-->夜宵, 5-->其他)', null=True, verbose_name='订餐类型')),
                ('deliver_time', models.TimeField(blank=True, help_text='送餐时间', null=True, verbose_name='送餐时间')),
                ('total_marked_price', models.DecimalField(blank=True, decimal_places=2, help_text='订单标价', max_digits=9, null=True, verbose_name='订单标价')),
                ('total_discount', models.DecimalField(blank=True, decimal_places=2, help_text='订单折扣', max_digits=9, null=True, verbose_name='订单折扣')),
                ('total_price', models.DecimalField(blank=True, decimal_places=2, help_text='订单金额', max_digits=9, null=True, verbose_name='订单金额')),
                ('item_count', models.IntegerField(blank=True, help_text='产品数量', null=True, verbose_name='产品数量')),
                ('is_submitted', models.BooleanField(default=False, help_text='已经提交', verbose_name='已经提交')),
                ('is_payed', models.BooleanField(default=False, help_text='已经支付', verbose_name='已经支付')),
                ('is_active', models.BooleanField(default=True, help_text='是否有效', verbose_name='是否有效')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('client', models.ForeignKey(help_text='用户', null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
            ],
            options={
                'verbose_name': '订单',
                'verbose_name_plural': '订单',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='UserLevel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('level_code', models.SmallIntegerField(blank=True, help_text='等级编号', null=True, unique=True, verbose_name='等级编号')),
                ('level_name', models.CharField(help_text='等级名称', max_length=100, null=True, unique=True, verbose_name='等级名称')),
                ('level_desc', models.TextField(blank=True, help_text='等级描述', max_length=1000, null=True, verbose_name='等级描述')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '用户等级',
                'verbose_name_plural': '用户等级',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Restaurant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('restaurant_name', models.CharField(help_text='餐馆名称', max_length=255, null=True, unique=True, verbose_name='餐馆名称')),
                ('restaurant_code', models.CharField(blank=True, help_text='餐馆识别码', max_length=255, null=True, verbose_name='餐馆识别码')),
                ('contact_person', models.CharField(help_text='联系人', max_length=255, null=True, verbose_name='联系人')),
                ('contact_mobile', models.CharField(help_text='联系方式', max_length=255, null=True, verbose_name='联系方式')),
                ('restaurant_address', models.TextField(help_text='餐馆地址', max_length=2000, null=True, verbose_name='餐馆地址')),
                ('center', models.CharField(blank=True, help_text='中心坐标', max_length=255, null=True, verbose_name='中心坐标')),
                ('is_confirmed', models.BooleanField(default=False, help_text='已审核', verbose_name='已审核')),
                ('is_active', models.BooleanField(default=False, help_text='有效', verbose_name='有效')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('confirmed_by', models.ForeignKey(blank=True, help_text='审核人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='restaurant_confirmed_by', to=settings.AUTH_USER_MODEL, verbose_name='审核人员')),
                ('created_by', models.ForeignKey(blank=True, help_text='创建人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='restaurant_created_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人员')),
            ],
            options={
                'verbose_name': '餐馆',
                'verbose_name_plural': '餐馆',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_count', models.IntegerField(default=1, help_text='数量', null=True, verbose_name='数量')),
                ('marked_price', models.DecimalField(blank=True, decimal_places=2, help_text='标价', max_digits=9, null=True, verbose_name='标价')),
                ('payed_unit_price', models.DecimalField(blank=True, decimal_places=2, help_text='单价', max_digits=9, null=True, verbose_name='单价')),
                ('payed_total_price', models.DecimalField(blank=True, decimal_places=2, help_text='小计', max_digits=9, null=True, verbose_name='小计')),
                ('rate_score', models.IntegerField(blank=True, help_text='评分', null=True, verbose_name='评分')),
                ('rate_notes', models.TextField(blank=True, help_text='点评', null=True, verbose_name='点评')),
                ('is_rated', models.BooleanField(default=True, help_text='已经点评', verbose_name='已经点评')),
                ('is_active', models.BooleanField(default=True, help_text='是否有效', verbose_name='是否有效')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('dish', models.ForeignKey(help_text='商品', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.Dish', verbose_name='商品')),
                ('order', models.ForeignKey(help_text='订单', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.Order', verbose_name='订单')),
            ],
            options={
                'verbose_name': '订单明细',
                'verbose_name_plural': '订单明细',
                'ordering': ['id'],
            },
        ),
        migrations.AddField(
            model_name='order',
            name='restaurant',
            field=models.ForeignKey(help_text='餐馆', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.Restaurant', verbose_name='餐馆'),
        ),
        migrations.CreateModel(
            name='DishTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag_name', models.CharField(help_text='标签', max_length=255, null=True, unique=True, verbose_name='标签')),
                ('is_confirmed', models.BooleanField(default=True, help_text='已审核', verbose_name='已审核')),
                ('is_active', models.BooleanField(default=True, help_text='是否有效', verbose_name='是否有效')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('confirmed_by', models.ForeignKey(blank=True, help_text='审核人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dish_tag_confirmed_by', to=settings.AUTH_USER_MODEL, verbose_name='审核人员')),
                ('created_by', models.ForeignKey(blank=True, help_text='创建人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dish_tag_created_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人员')),
            ],
            options={
                'verbose_name': '标签',
                'verbose_name_plural': '标签',
                'ordering': ['-id'],
            },
        ),
        migrations.AddField(
            model_name='dish',
            name='dish_tag',
            field=models.ManyToManyField(blank=True, help_text='标签', to='wx.DishTag', verbose_name='标签'),
        ),
        migrations.AddField(
            model_name='dish',
            name='restaurant',
            field=models.ForeignKey(help_text='餐馆', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.Restaurant', verbose_name='餐馆'),
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company_name', models.CharField(help_text='企业名称', max_length=255, null=True, unique=True, verbose_name='企业名称')),
                ('company_code', models.CharField(blank=True, help_text='企业识别码', max_length=255, null=True, unique=True, verbose_name='企业识别码')),
                ('company_address', models.TextField(help_text='企业地址', max_length=2000, null=True, verbose_name='企业地址')),
                ('contact_person', models.CharField(help_text='联系人', max_length=255, null=True, verbose_name='联系人')),
                ('contact_mobile', models.CharField(help_text='联系方式', max_length=255, null=True, verbose_name='联系方式')),
                ('center', models.CharField(blank=True, help_text='中心坐标', max_length=255, null=True, verbose_name='中心坐标')),
                ('deliver_time_0', models.TimeField(default='8:00:00', help_text='早餐送餐时间', null=True, verbose_name='早餐送餐时间')),
                ('deliver_time_1', models.TimeField(default='11:50:00', help_text='午餐送餐时间', null=True, verbose_name='午餐送餐时间')),
                ('deliver_time_2', models.TimeField(default='15:00:00', help_text='下午茶送餐时间', null=True, verbose_name='下午茶送餐时间')),
                ('deliver_time_3', models.TimeField(default='17:50:00', help_text='晚餐送餐时间', null=True, verbose_name='晚餐送餐时间')),
                ('deliver_time_4', models.TimeField(default='20:00:00', help_text='夜宵送餐时间', null=True, verbose_name='夜宵送餐时间')),
                ('is_confirmed', models.BooleanField(default=False, help_text='已审核', verbose_name='已审核')),
                ('is_active', models.BooleanField(default=False, help_text='有效', verbose_name='有效')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('confirmed_by', models.ForeignKey(blank=True, help_text='审核人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='company_confirmed_by', to=settings.AUTH_USER_MODEL, verbose_name='审核人员')),
                ('created_by', models.ForeignKey(blank=True, help_text='创建人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='company_created_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人员')),
                ('restaurant', models.ManyToManyField(blank=True, help_text='可见餐馆', related_name='company_related_restaurant', to='wx.Restaurant', verbose_name='可见餐馆')),
            ],
            options={
                'verbose_name': '企业',
                'verbose_name_plural': '企业',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='ChinaDistrict',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('city_code', models.CharField(blank=True, help_text='电话区号', max_length=100, null=True, verbose_name='电话区号')),
                ('ad_code', models.CharField(blank=True, help_text='辖区编号', max_length=100, null=True, verbose_name='辖区编号')),
                ('name', models.CharField(help_text='辖区名称', max_length=100, null=True, verbose_name='辖区名称')),
                ('center', models.CharField(blank=True, help_text='中心坐标', max_length=100, null=True, verbose_name='中心坐标')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('level', models.ForeignKey(blank=True, help_text='辖区等级', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.DistrictLevel', verbose_name='辖区等级')),
                ('parent_district', models.ForeignKey(blank=True, help_text='上级辖区', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.ChinaDistrict', verbose_name='上级辖区')),
            ],
            options={
                'verbose_name': '中国行政区',
                'verbose_name_plural': '中国行政区',
                'ordering': ['id'],
            },
        ),
        migrations.AddField(
            model_name='wxuser',
            name='china_district',
            field=models.ForeignKey(blank=True, help_text='所在辖区', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.ChinaDistrict', verbose_name='所在辖区'),
        ),
        migrations.AddField(
            model_name='wxuser',
            name='company',
            field=models.ForeignKey(blank=True, help_text='企业', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='wx_user', to='wx.Company', verbose_name='企业'),
        ),
        migrations.AddField(
            model_name='wxuser',
            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='wxuser',
            name='restaurant',
            field=models.ForeignKey(blank=True, help_text='餐馆', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.Restaurant', verbose_name='餐馆'),
        ),
        migrations.AddField(
            model_name='wxuser',
            name='user_level',
            field=models.ForeignKey(blank=True, help_text='用户等级', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.UserLevel', verbose_name='用户等级'),
        ),
        migrations.AddField(
            model_name='wxuser',
            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'),
        ),
        migrations.CreateModel(
            name='CompanyEmployee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('employee_name', models.CharField(help_text='姓名', max_length=200, null=True, verbose_name='姓名')),
                ('employee_code', models.CharField(help_text='编号', max_length=200, null=True, verbose_name='编号')),
                ('mobile_data', models.TextField(blank=True, max_length=2000, null=True, verbose_name='手机号-数据')),
                ('mobile_index', models.TextField(blank=True, max_length=2000, null=True, unique=True, verbose_name='手机号-索引')),
                ('is_confirmed', models.BooleanField(default=False, help_text='已审核', verbose_name='已审核')),
                ('is_active', models.BooleanField(default=False, help_text='有效', verbose_name='有效')),
                ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='记录时间')),
                ('datetime_updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('company', models.ForeignKey(help_text='企业', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wx.Company', verbose_name='企业')),
                ('confirmed_by', models.ForeignKey(blank=True, help_text='创建人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='company_employee_confirmed_by', to=settings.AUTH_USER_MODEL, verbose_name='审核人员')),
                ('created_by', models.ForeignKey(blank=True, help_text='创建人员', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='company_employee_created_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人员')),
                ('user', models.ForeignKey(blank=True, help_text='用户', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='company_employee_user', to=settings.AUTH_USER_MODEL, verbose_name='用户')),
            ],
            options={
                'verbose_name': '企业员工名单',
                'verbose_name_plural': '企业员工名单',
                'ordering': ['id'],
                'unique_together': {('company', 'employee_name', 'employee_code')},
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Estudiante',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('matricula', models.CharField(max_length=9, unique=True)),
                ('nombre', models.CharField(max_length=100)),
                ('apellido_paterno', models.CharField(max_length=100)),
                ('apellido_materno', models.CharField(max_length=100)),
                ('estado', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'Estudiante',
                'verbose_name_plural': 'Estudiantes',
            },
        ),
        migrations.CreateModel(
            name='Facilitador',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
                ('apellido_paterno', models.CharField(max_length=100)),
                ('apellido_materno', models.CharField(max_length=100)),
                ('estado', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'Facilitador',
                'verbose_name_plural': 'Facilitadores',
            },
        ),
        migrations.CreateModel(
            name='Nivel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('abreviatura', models.CharField(max_length=15, unique=True)),
                ('nivel_academico', models.CharField(max_length=15,
                                                     unique=True)),
            ],
            options={
                'verbose_name': 'Nivel',
                'verbose_name_plural': 'Niveles',
            },
        ),
        migrations.CreateModel(
            name='Proveedor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
                ('estado', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'Proveedor',
                'verbose_name_plural': 'Proveedores',
            },
        ),
        migrations.CreateModel(
            name='Usuario',
            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='',
                                  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='Platica',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=250)),
                ('fecha', models.DateField()),
                ('hora', models.TimeField()),
                ('lugar', models.CharField(max_length=300)),
                ('estado', models.BooleanField(default=True)),
                ('idFacilitador',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='Usuarios.Facilitador')),
                ('idProveedor',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='Usuarios.Proveedor')),
            ],
            options={
                'verbose_name': 'Platica',
                'verbose_name_plural': 'Platicas',
                'ordering': ['-fecha'],
            },
        ),
        migrations.AddField(
            model_name='facilitador',
            name='nivel_academico',
            field=models.ForeignKey(
                default=None,
                on_delete=django.db.models.deletion.CASCADE,
                to='Usuarios.Nivel'),
        ),
        migrations.CreateModel(
            name='Asistencia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('asistencia', models.BooleanField()),
                ('idEstudiante',
                 models.ManyToManyField(to='Usuarios.Estudiante')),
                ('idPlatica',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Usuarios.Platica')),
            ],
            options={
                'verbose_name': 'Asistencia',
                'verbose_name_plural': 'Asistencias',
            },
        ),
    ]
Beispiel #23
0
class Migration(migrations.Migration):

    initial = True

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

    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')),
                ('address', models.CharField(max_length=100)),
                ('language',
                 models.CharField(choices=[('JP', 'Japanese'),
                                           ('EN', 'English')],
                                  default='EN',
                                  max_length=2)),
                ('nationality', models.CharField(max_length=100)),
                ('bio', models.TextField(max_length=200)),
                ('profile_picture',
                 models.ImageField(blank=True, upload_to='users/')),
                ('phone_num', models.CharField(max_length=11)),
                ('is_tasker', models.BooleanField(default=False)),
                ('is_seeker', models.BooleanField(default=False)),
                ('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='Tasker',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='TaskSeeker',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='TaskCanDo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('category',
                 models.CharField(choices=[('MOV', 'Moving'),
                                           ('REP', 'Home Repairs'),
                                           ('PLM', 'Plumbing'),
                                           ('CLN', 'Cleaning'),
                                           ('DLV', 'Delivery')],
                                  default='CLN',
                                  max_length=3)),
                ('description', models.TextField(max_length=100)),
                ('price', models.IntegerField()),
                ('tasker',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='users.Tasker')),
            ],
        ),
        migrations.CreateModel(
            name='Schedule',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('day_of_week',
                 models.CharField(choices=[('MON', 'Monday'),
                                           ('TUE', 'Tuesday'),
                                           ('WED', 'Wednesday'),
                                           ('THU', 'Thursday'),
                                           ('FRI', 'Friday'),
                                           ('SAT', 'Saturday'),
                                           ('SUN', 'Sunday')],
                                  default='MON',
                                  max_length=3)),
                ('start_time', models.TimeField()),
                ('end_time', models.TimeField()),
                ('tasker',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='users.Tasker')),
            ],
        ),
    ]
Beispiel #24
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_parent', models.BooleanField(default=False)),
                ('is_child', models.BooleanField(default=False)),
                ('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='Child',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('last_name',
                 models.CharField(blank=True, default='', max_length=100)),
                ('first_name', models.CharField(default='', max_length=100)),
                ('birthdate', models.DateTimeField(null=True)),
                ('hobbies',
                 models.CharField(blank=True, max_length=300, null=True)),
                ('description',
                 models.TextField(blank=True, max_length=300, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(choices=[
                     ('Afghanistan', 'Afghanistan'), ('Albania', 'Albania'),
                     ('Algeria', 'Algeria'), ('Andorra', 'Andorra'),
                     ('Angola', 'Angola'),
                     ('Antigua and Barbuda', 'Antigua and Barbuda'),
                     ('Argentina', 'Argentina'), ('Armenia', 'Armenia'),
                     ('Australia', 'Australia'), ('Austria', 'Austria'),
                     ('Azerbaijan', 'Azerbaijan'),
                     ('The Bahamas', 'The Bahamas'), ('Bahrain', 'Bahrain'),
                     ('Bangladesh', 'Bangladesh'), ('Barbados', 'Barbados'),
                     ('Belarus', 'Belarus'), ('Belgium', 'Belgium'),
                     ('Belize', 'Belize'), ('Benin', 'Benin'),
                     ('Bhutan', 'Bhutan'), ('Bolivia', 'Bolivia'),
                     ('Bosnia and Herzegovina', 'Bosnia and Herzegovina'),
                     ('Botswana', 'Botswana'), ('Brazil', 'Brazil'),
                     ('Brunei', 'Brunei'), ('Bulgaria', 'Bulgaria'),
                     ('Burkina Faso', 'Burkina Faso'), ('Burundi', 'Burundi'),
                     ('Cambodia', 'Cambodia'), ('Cameroon', 'Cameroon'),
                     ('Canada', 'Canada'), ('Cape Verde', 'Cape Verde'),
                     ('Central African Republic', 'Central African Republic'),
                     ('Chad', 'Chad'), ('Chile', 'Chile'), ('China', 'China'),
                     ('Colombia', 'Colombia'), ('Comoros', 'Comoros'),
                     ('Congo', 'Congo'), ('Costa Rica', 'Costa Rica'),
                     ("Cote d'Ivoire", "Cote d'Ivoire"), ('Croatia',
                                                          'Croatia'),
                     ('Cuba', 'Cuba'), ('Cyprus', 'Cyprus'),
                     ('Czech Republic', 'Czech Republic'),
                     ('Denmark', 'Denmark'), ('Djibouti', 'Djibouti'),
                     ('Dominica', 'Dominica'),
                     ('Dominican Republic', 'Dominican Republic'),
                     ('East Timor ', 'East Timor '), ('Ecuador', 'Ecuador'),
                     ('Egypt', 'Egypt'), ('El Salvador', 'El Salvador'),
                     ('Equatorial Guinea', 'Equatorial Guinea'),
                     ('Eritrea', 'Eritrea'), ('Estonia', 'Estonia'),
                     ('Ethiopia', 'Ethiopia'), ('Fiji', 'Fiji'),
                     ('Finland', 'Finland'), ('France', 'France'),
                     ('Gabon', 'Gabon'), ('The Gambia', 'The Gambia'),
                     ('Georgia', 'Georgia'), ('Germany', 'Germany'),
                     ('Ghana', 'Ghana'), ('Greece', 'Greece'),
                     ('Grenada', 'Grenada'), ('Guatemala', 'Guatemala'),
                     ('Guinea', 'Guinea'), ('Guinea-Bissau', 'Guinea-Bissau'),
                     ('Guyana', 'Guyana'), ('Haiti', 'Haiti'),
                     ('Honduras', 'Honduras'), ('Hungary', 'Hungary'),
                     ('Iceland', 'Iceland'), ('India', 'India'),
                     ('Indonesia', 'Indonesia'), ('Iran', 'Iran'),
                     ('Iraq', 'Iraq'), ('Ireland', 'Ireland'),
                     ('Israel', 'Israel'), ('Italy', 'Italy'),
                     ('Jamaica', 'Jamaica'), ('Japan', 'Japan'),
                     ('Jordan', 'Jordan'), ('Kazakhstan', 'Kazakhstan'),
                     ('Kenya', 'Kenya'), ('Kiribati', 'Kiribati'),
                     ('Korea North', 'Korea North'),
                     ('Korea South', 'Korea South'), ('Kosovo', 'Kosovo'),
                     ('Kuwait', 'Kuwait'), ('Kyrgyzstan', 'Kyrgyzstan'),
                     ('Laos', 'Laos'), ('Latvia', 'Latvia'),
                     ('Lebanon', 'Lebanon'), ('Lesotho', 'Lesotho'),
                     ('Liberia', 'Liberia'), ('Libya', 'Libya'),
                     ('Liechtenstein', 'Liechtenstein'),
                     ('Lithuania', 'Lithuania'), ('Luxembourg', 'Luxembourg'),
                     ('Macedonia', 'Macedonia'), ('Madagascar', 'Madagascar'),
                     ('Malawi', 'Malawi'), ('Malaysia', 'Malaysia'),
                     ('Maldives', 'Maldives'), ('Mali', 'Mali'),
                     ('Malta', 'Malta'),
                     ('Marshall Islands', 'Marshall Islands'),
                     ('Mauritania', 'Mauritania'), ('Mauritius', 'Mauritius'),
                     ('Mexico', 'Mexico'), ('Micronesia', 'Micronesia'),
                     ('Moldova', 'Moldova'), ('Monaco', 'Monaco'),
                     ('Mongolia', 'Mongolia'), ('Montenegro', 'Montenegro'),
                     ('Morocco', 'Morocco'), ('Mozambique', 'Mozambique'),
                     ('Myanmar', 'Myanmar'), ('Namibia', 'Namibia'),
                     ('Nauru', 'Nauru'), ('Nepal', 'Nepal'),
                     ('Netherlands', 'Netherlands'),
                     ('New Zealand', 'New Zealand'),
                     ('Nicaragua', 'Nicaragua'), ('Niger', 'Niger'),
                     ('Nigeria', 'Nigeria'), ('Norway', 'Norway'),
                     ('Oman', 'Oman'), ('Pakistan', 'Pakistan'),
                     ('Palau', 'Palau'), ('Panama', 'Panama'),
                     ('Papua New Guinea', 'Papua New Guinea'),
                     ('Paraguay', 'Paraguay'), ('Peru', 'Peru'),
                     ('Philippines', 'Philippines'), ('Poland', 'Poland'),
                     ('Portugal', 'Portugal'), ('Qatar', 'Qatar'),
                     ('Romania', 'Romania'), ('Russia', 'Russia'),
                     ('Rwanda', 'Rwanda'),
                     ('Saint Kitts and Nevis', 'Saint Kitts and Nevis'),
                     ('Saint Lucia', 'Saint Lucia'),
                     ('Saint Vincent and the Grenadines',
                      'Saint Vincent and the Grenadines'), ('Samoa', 'Samoa'),
                     ('San Marino', 'San Marino'),
                     ('Sao Tome and Principe', 'Sao Tome and Principe'),
                     ('Saudi Arabia', 'Saudi Arabia'), ('Senegal', 'Senegal'),
                     ('Serbia', 'Serbia'), ('Seychelles', 'Seychelles'),
                     ('Sierra Leone', 'Sierra Leone'),
                     ('Singapore', 'Singapore'), ('Slovakia', 'Slovakia'),
                     ('Slovenia', 'Slovenia'),
                     ('Solomon Islands', 'Solomon Islands'),
                     ('Somalia', 'Somalia'), ('South Africa', 'South Africa'),
                     ('South Sudan', 'South Sudan'), ('Spain', 'Spain'),
                     ('Sri Lanka', 'Sri Lanka'), ('Sudan', 'Sudan'),
                     ('Suriname', 'Suriname'), ('Swaziland', 'Swaziland'),
                     ('Sweden', 'Sweden'), ('Switzerland', 'Switzerland'),
                     ('Syria', 'Syria'), ('Taiwan', 'Taiwan'),
                     ('Tajikistan', 'Tajikistan'), ('Tanzania', 'Tanzania'),
                     ('Thailand', 'Thailand'), ('Togo', 'Togo'),
                     ('Tonga', 'Tonga'),
                     ('Trinidad and Tobago', 'Trinidad and Tobago'),
                     ('Tunisia', 'Tunisia'), ('Turkey', 'Turkey'),
                     ('Turkmenistan', 'Turkmenistan'), ('Tuvalu', 'Tuvalu'),
                     ('Uganda', 'Uganda'), ('Ukraine', 'Ukraine'),
                     ('United Arab Emirates', 'United Arab Emirates'),
                     ('United Kingdom', 'United Kingdom'),
                     ('United States of America', 'United States of America'),
                     ('Uruguay', 'Uruguay'), ('Uzbekistan', 'Uzbekistan'),
                     ('Vanuatu', 'Vanuatu'), ('Vatican City', 'Vatican City'),
                     ('Venezuela', 'Venezuela'), ('Vietnam', 'Vietnam'),
                     ('Yemen', 'Yemen'), ('Zambia', 'Zambia'),
                     ('Zimbabwe', 'Zimbabwe')
                 ],
                                  max_length=100,
                                  unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(choices=[
                     ('Afrikaans', 'Afrikaans'), ('Albanian', 'Albanian'),
                     ('Amharic', 'Amharic'),
                     ('Arabic - Egyptian Spoken', 'Arabic - Egyptian Spoken'),
                     ('Arabic - Levantine', 'Arabic - Levantine'),
                     ('Arabic - Modern Standard', 'Arabic - Modern Standard'),
                     ('Arabic - Moroccan Spoken', 'Arabic - Moroccan Spoken'),
                     ('Arabic - Overview', 'Arabic - Overview'),
                     ('Aramaic', 'Aramaic'), ('Armenian', 'Armenian'),
                     ('Assamese', 'Assamese'), ('Aymara', 'Aymara'),
                     ('Azerbaijani', 'Azerbaijani'), ('Balochi', 'Balochi'),
                     ('Bamanankan', 'Bamanankan'),
                     ('Bashkort (Bashkir)', 'Bashkort (Bashkir)'),
                     ('Basque', 'Basque'), ('Belarusan', 'Belarusan'),
                     ('Bengali', 'Bengali'), ('Bhojpuri', 'Bhojpuri'),
                     ('Bislama', 'Bislama'), ('Bosnian', 'Bosnian'),
                     ('Brahui', 'Brahui'), ('Bulgarian', 'Bulgarian'),
                     ('Burmese', 'Burmese'), ('Cantonese', 'Cantonese'),
                     ('Catalan', 'Catalan'), ('Cebuano', 'Cebuano'),
                     ('Chechen', 'Chechen'), ('Cherokee', 'Cherokee'),
                     ('Croatian', 'Croatian'), ('Czech', 'Czech'),
                     ('Dakota', 'Dakota'), ('Danish', 'Danish'),
                     ('Dari', 'Dari'), ('Dholuo', 'Dholuo'),
                     ('Dutch', 'Dutch'), ('English', 'English'),
                     ('Esperanto', 'Esperanto'), ('Estonian', 'Estonian'),
                     ('Éwé', 'Éwé'), ('Finnish', 'Finnish'),
                     ('French', 'French'), ('Georgian', 'Georgian'),
                     ('German', 'German'), ('Gikuyu', 'Gikuyu'),
                     ('Greek', 'Greek'), ('Guarani', 'Guarani'),
                     ('Gujarati', 'Gujarati'),
                     ('Haitian Creole', 'Haitian Creole'), ('Hausa', 'Hausa'),
                     ('Hawaiian', 'Hawaiian'),
                     ('Hawaiian Creole', 'Hawaiian Creole'),
                     ('Hebrew', 'Hebrew'), ('Hiligaynon', 'Hiligaynon'),
                     ('Hindi', 'Hindi'), ('Hungarian', 'Hungarian'),
                     ('Icelandic', 'Icelandic'), ('Igbo', 'Igbo'),
                     ('Ilocano', 'Ilocano'), ('Indonesian ', 'Indonesian '),
                     ('Inuit/Inupiaq', 'Inuit/Inupiaq'),
                     ('Irish Gaelic', 'Irish Gaelic'), ('Italian', 'Italian'),
                     ('Japanese', 'Japanese'), ('Jarai', 'Jarai'),
                     ('Javanese', 'Javanese'), ('K’iche’', 'K’iche’'),
                     ('Kabyle', 'Kabyle'), ('Kannada', 'Kannada'),
                     ('Kashmiri', 'Kashmiri'), ('Kazakh', 'Kazakh'),
                     ('Khmer', 'Khmer'), ('Khoekhoe', 'Khoekhoe'),
                     ('Korean', 'Korean'), ('Kurdish', 'Kurdish'),
                     ('Kyrgyz', 'Kyrgyz'), ('Lao', 'Lao'), ('Latin', 'Latin'),
                     ('Latvian', 'Latvian'), ('Lingala', 'Lingala'),
                     ('Lithuanian', 'Lithuanian'), ('Macedonian',
                                                    'Macedonian'),
                     ('Maithili', 'Maithili'), ('Malagasy', 'Malagasy'),
                     ('Malay', 'Malay'), ('Malayalam', 'Malayalam'),
                     ('Mandarin ', 'Mandarin '), ('Marathi', 'Marathi'),
                     ('Mende', 'Mende'), ('Mongolian', 'Mongolian'),
                     ('Nahuatl', 'Nahuatl'), ('Navajo', 'Navajo'),
                     ('Nepali', 'Nepali'), ('Norwegian', 'Norwegian'),
                     ('Ojibwa', 'Ojibwa'), ('Oriya', 'Oriya'),
                     ('Oromo', 'Oromo'), ('Pashto', 'Pashto'),
                     ('Persian', 'Persian'), ('Polish', 'Polish'),
                     ('Portuguese', 'Portuguese'), ('Punjabi', 'Punjabi'),
                     ('Quechua', 'Quechua'), ('Romani', 'Romani'),
                     ('Romanian', 'Romanian'), ('Russian', 'Russian'),
                     ('Rwanda', 'Rwanda'), ('Samoan', 'Samoan'),
                     ('Sanskrit', 'Sanskrit'), ('Serbian', 'Serbian'),
                     ('Shona', 'Shona'), ('Sindhi', 'Sindhi'),
                     ('Sinhala', 'Sinhala'), ('Slovak', 'Slovak'),
                     ('Slovene', 'Slovene'), ('Somali', 'Somali'),
                     ('Spanish', 'Spanish'), ('Swahili', 'Swahili'),
                     ('Swedish', 'Swedish'), ('Tachelhit', 'Tachelhit'),
                     ('Tagalog', 'Tagalog'), ('Tajiki', 'Tajiki'),
                     ('Tamil', 'Tamil'), ('Tatar', 'Tatar'),
                     ('Telugu', 'Telugu'), ('Thai', 'Thai'),
                     ('Tibetic Languages', 'Tibetic Languages'),
                     ('Tigrigna', 'Tigrigna'), ('Tok Pisin', 'Tok Pisin'),
                     ('Turkish', 'Turkish'), ('Turkmen', 'Turkmen'),
                     ('Ukrainian', 'Ukrainian'), ('Urdu', 'Urdu'),
                     ('Uyghur', 'Uyghur'), ('Uzbek', 'Uzbek'),
                     ('Vietnamese', 'Vietnamese'), ('Warlpiri', 'Warlpiri'),
                     ('Welsh', 'Welsh'), ('Wolof', 'Wolof'),
                     ('Xhosa', 'Xhosa'), ('Yakut', 'Yakut'),
                     ('Yiddish', 'Yiddish'), ('Yoruba', 'Yoruba'),
                     ('Yucatec', 'Yucatec'), ('Zapotec', 'Zapotec'),
                     ('Zulu', 'Zulu')
                 ],
                                  max_length=100,
                                  unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Parent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email',
                 models.EmailField(max_length=254, null=True, unique=True)),
                ('street',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('zipcode', models.IntegerField(blank=True, null=True)),
                ('last_name', models.CharField(default='', max_length=100)),
                ('first_name', models.CharField(default='', max_length=100)),
                ('birthdate', models.DateTimeField(blank=True, null=True)),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('country',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='main.country')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('message_date',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date sent')),
                ('content', models.TextField(max_length=300)),
                ('child',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='main.child')),
                ('message_from',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='message_from',
                                   to='main.parent')),
                ('message_to',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='message_to',
                                   to='main.parent')),
            ],
        ),
        migrations.CreateModel(
            name='Languagetolearn',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('validation_status',
                 models.CharField(choices=[('Pending', 'Pending'),
                                           ('Confirmed', 'Confirmed'),
                                           ('Completed', 'Completed')],
                                  default='Pending',
                                  max_length=10)),
                ('link_video',
                 models.CharField(blank=True, default='', max_length=500)),
                ('meeting_id', models.IntegerField(default=0)),
                ('date_slot', models.DateField()),
                ('start_time_slot', models.TimeField()),
                ('end_time_slot', models.TimeField()),
                ('child',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='child_participant',
                                   to='main.child')),
                ('child_correspondent',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='child_correspondent',
                                   to='main.child')),
                ('correspondent_language',
                 models.ForeignKey(blank=True,
                                   default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='correspondent_language',
                                   to='main.language')),
                ('language',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='participant_language',
                                   to='main.language')),
            ],
        ),
        migrations.AddField(
            model_name='child',
            name='country',
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.CASCADE,
                to='main.country'),
        ),
        migrations.AddField(
            model_name='child',
            name='language',
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='wish_language',
                to='main.language'),
        ),
        migrations.AddField(
            model_name='child',
            name='native_language',
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='native_language',
                to='main.language'),
        ),
        migrations.AddField(
            model_name='child',
            name='parent',
            field=models.ForeignKey(
                blank=True,
                default=0,
                on_delete=django.db.models.deletion.CASCADE,
                to='main.parent'),
        ),
        migrations.AddField(
            model_name='child',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
Beispiel #25
0
class Migration(migrations.Migration):

    initial = True

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

    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')),
                ('PWZ', models.CharField(blank=True, max_length=10, unique=True)),
                ('department', models.CharField(choices=[('lekarz', 'lekarz'), ('pielegniarka', 'pielegniarka'), ('psycholog', 'psycholog'), ('farmaceuta', 'farmaceuta'), ('administracja', 'administracja')], max_length=20)),
                ('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='Choroba',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kod', models.CharField(max_length=6)),
                ('nazwa', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Pacjent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('slug', models.SlugField()),
                ('imie', models.CharField(max_length=50)),
                ('nazwisko', models.CharField(max_length=50)),
                ('nazwisko_rodowe', models.CharField(blank=True, max_length=50)),
                ('pesel', models.CharField(max_length=11, unique=True, validators=[app.validators.validate_pesel])),
                ('plec', models.CharField(choices=[('M', 'Mezczyzna'), ('K', 'Kobieta')], max_length=1)),
                ('miejsce_urodzenia', models.CharField(blank=True, max_length=50)),
                ('imiona_rodzicow', models.CharField(blank=True, max_length=100)),
                ('nr_dowodu', models.CharField(blank=True, max_length=10, validators=[app.validators.validate_IDnr])),
                ('nr_leg_zus', models.CharField(blank=True, max_length=24, validators=[app.validators.validate_nr_leg_zus])),
                ('data_wydania_zus', models.DateField(blank=True, null=True)),
                ('data_waznosci_zus', models.DateField(blank=True, null=True)),
                ('nr_ksiegi', models.CharField(blank=True, max_length=9)),
                ('osoba_kontaktu', models.TextField(blank=True)),
                ('wysokosc_swiadczenia', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('data_przyjecia', models.DateField()),
                ('tryb_przyjecia', models.CharField(blank=True, choices=[('PILNY', 'PILNY'), ('STABILNY', 'STABILNY')], max_length=8)),
                ('data_skierowania', models.DateField(blank=True, null=True)),
                ('pwz_zlecajacego', models.IntegerField(blank=True, null=True, validators=[app.validators.validate_PWZ])),
                ('wzrost', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('waga', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('barthel', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('epikryza', models.TextField(blank=True)),
                ('zalecenia', models.TextField(blank=True)),
                ('wyniki', models.TextField(blank=True)),
                ('pozostale_choroby', models.TextField(blank=True)),
                ('choroby', models.ManyToManyField(to='app.Choroba')),
            ],
            options={
                'verbose_name': 'Pacjent',
                'verbose_name_plural': 'Pacjenci',
                'ordering': ['nazwisko'],
            },
            managers=[
                ('wszyscy', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Zywienie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('data_od', models.DateTimeField(default=django.utils.timezone.now)),
                ('data_do', models.DateTimeField(blank=True, null=True)),
                ('dieta', models.CharField(choices=[('Nutrison', 'Nutrison'), ('Cubison', 'Cubison'), ('Diason', 'Diason'), ('Mix', 'Mix'), ('Naprzemienna', 'Naprzemienna')], max_length=10)),
                ('dieta_objetosc', models.CharField(max_length=4)),
                ('woda_objetosc', models.CharField(max_length=4)),
                ('glasgow', models.PositiveSmallIntegerField()),
                ('pacjent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Pacjent')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Zlecenia żywienia',
            },
        ),
        migrations.CreateModel(
            name='Wypis',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('data_od', models.DateTimeField(default=django.utils.timezone.now)),
                ('data_do', models.DateTimeField(blank=True, null=True)),
                ('miejsce_wypisu', models.CharField(blank=True, max_length=100)),
                ('przyczyna_wypisu', models.TextField(blank=True)),
                ('tryb', models.CharField(choices=[('Zakończenie procesu terapeutycznego lub diagnostycznego', 'Zakończenie procesu terapeutycznego lub diagnostycznego'), ('Skierowanie do dalszego leczenia w lecznictwie ambulatoryjnym', 'Skierowanie do dalszego leczenia w lecznictwie ambulatoryjnym'), ('Skierowanie do dalszego leczenia w innym szpitalu', 'Skierowanie do dalszego leczenia w innym szpitalu'), ('Wypisanie na własne żądanie', 'Wypisanie na własne żądanie'), ('Osoba leczona samowolnie opuściła ZOL', 'Osoba leczona samowolnie opuściła ZOL'), ('Wypisanie na podstawie art. 221 pkt 3 ustawy o ZOZ', 'Wypisanie na podstawie art. 221 pkt 3 ustawy o ZOZ'), ('Zgon pacjenta', 'Zgon pacjenta'), ('Osoba leczona, która samowolnie opuściła podmiot leczniczy', 'Osoba leczona, która samowolnie opuściła podmiot leczniczy')], max_length=100)),
                ('pacjent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Pacjent')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Wypisy',
            },
        ),
        migrations.CreateModel(
            name='Przepustka',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('data_od', models.DateTimeField(default=django.utils.timezone.now)),
                ('data_do', models.DateTimeField(blank=True, null=True)),
                ('tresc', models.TextField(blank=True)),
                ('pacjent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Pacjent')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Przepustki',
            },
        ),
        migrations.CreateModel(
            name='Dekursus_psych',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('data', models.DateField(default=django.utils.timezone.now)),
                ('tresc', models.TextField()),
                ('pacjent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Pacjent')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Dekursus psychologa',
                'verbose_name_plural': 'Dekursysy psychologa',
            },
        ),
        migrations.CreateModel(
            name='Dekursus_piel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('data', models.DateField(default=django.utils.timezone.now)),
                ('tresc', models.TextField()),
                ('pacjent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Pacjent')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Dekursus pielęgniarski',
                'verbose_name_plural': 'Dekursysy pielęgniarskie',
            },
        ),
        migrations.CreateModel(
            name='Dekursus_lek',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('data', models.DateField(default=django.utils.timezone.now)),
                ('tresc', models.TextField()),
                ('pacjent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Pacjent')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Dekursus lekarski',
                'verbose_name_plural': 'Dekursysy lekarskie',
            },
        ),
        migrations.CreateModel(
            name='Zgon',
            fields=[
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('data', models.DateField(default=django.utils.timezone.now)),
                ('pacjent', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='app.Pacjent')),
                ('godzina', models.TimeField()),
                ('bezposrednia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bezposrednia_przyczyna', to='app.Choroba')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
                ('wtorna', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wtorna_przyczyna', to='app.Choroba')),
                ('wyjsciowa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wyjsciowa_przyczyna', to='app.Choroba')),
            ],
            options={
                'verbose_name_plural': 'Zgony',
            },
        ),
    ]
Beispiel #26
0
class Migration(migrations.Migration):

    initial = True

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

    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')),
                ('documento', models.BigIntegerField(null=True, unique=True)),
                ('domicilio', models.CharField(max_length=100, null=True)),
                ('telefono', models.BigIntegerField(null=True)),
                ('nacimiento', models.DateField(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={
                'permissions': (('es_recepcionista', 'Usuario tiene rol de recepcionista'),),
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='DiaLaboral',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dia', models.PositiveSmallIntegerField(choices=[(0, 'Lunes'), (1, 'Martes'), (2, 'Miércoles'), (3, 'Jueves'), (4, 'Viernes'), (5, 'Sábado'), (6, 'Domingo')])),
            ],
        ),
        migrations.CreateModel(
            name='Especialidad',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='ObraSocial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Turno',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('estado', models.PositiveSmallIntegerField(choices=[(1, 'Disponible'), (2, 'Reservado'), (3, 'Confirmado'), (4, 'Atendido'), (5, 'Cancelado')])),
                ('fecha', models.DateTimeField()),
                ('es_sobreturno', models.BooleanField(default=False)),
                ('prioridad', models.PositiveSmallIntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Medico',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('cuil', models.BigIntegerField(unique=True)),
                ('especialidad', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='turnos_app.Especialidad')),
            ],
            options={
                'permissions': (('es_medico', 'Usuario tiene rol de medico'),),
            },
        ),
        migrations.CreateModel(
            name='Paciente',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('genero', models.PositiveSmallIntegerField(choices=[(1, 'Masculino'), (2, 'Femenino')])),
                ('penalizado', models.BooleanField(default=False)),
                ('fecha_despenalizacion', models.DateTimeField(blank=True, null=True, verbose_name='fecha de despenalización')),
                ('obra_social', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='turnos_app.ObraSocial')),
            ],
            options={
                'permissions': (('es_paciente', 'Usuario tiene rol de paciente'),),
            },
        ),
        migrations.CreateModel(
            name='TurnoAtendido',
            fields=[
                ('turno', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='turnos_app.Turno')),
                ('diagnostico', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='TurnoCancelado',
            fields=[
                ('turno', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='turnos_app.Turno')),
                ('fecha_cancelado', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='HorarioLaboral',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hora_inicio', models.TimeField()),
                ('hora_fin', models.TimeField()),
                ('sobreturnos', models.BooleanField(default=False)),
                ('dia_laboral', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='turnos_app.DiaLaboral')),
            ],
        ),
        migrations.AddField(
            model_name='turno',
            name='medico',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='turnos_app.Medico'),
        ),
        migrations.AddField(
            model_name='turno',
            name='paciente',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='turnos_app.Paciente'),
        ),
        migrations.AddField(
            model_name='dialaboral',
            name='medico',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='turnos_app.Medico'),
        ),
    ]
Beispiel #27
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AcademicYear',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start', models.DateField()),
                ('end', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('credits', models.PositiveSmallIntegerField()),
                ('code', models.CharField(max_length=6)),
            ],
        ),
        migrations.CreateModel(
            name='CourseCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='CourseEnrollment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Course')),
            ],
        ),
        migrations.CreateModel(
            name='DegreeLevel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Departments',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=512)),
            ],
        ),
        migrations.CreateModel(
            name='Semester',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('number', models.PositiveSmallIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Skill',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=512)),
            ],
        ),
        migrations.CreateModel(
            name='TimeTable',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('weekday',
                 models.CharField(choices=[('Su', 'Sunday'), ('Mo', 'Monday'),
                                           ('Tu', 'Tuesday'),
                                           ('We', 'Wednesday'),
                                           ('Th', 'Tursday'), ('Fr', 'Friday'),
                                           ('Sa', 'Saturday')],
                                  max_length=2)),
                ('start', models.TimeField()),
                ('end', models.TimeField()),
                ('course_enrollment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.CourseEnrollment')),
            ],
        ),
        migrations.CreateModel(
            name='Enrollment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('academic_year',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='core.AcademicYear')),
                ('semester',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='core.Semester')),
            ],
        ),
        migrations.AddField(
            model_name='courseenrollment',
            name='enrollment',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='core.Enrollment'),
        ),
        migrations.AddField(
            model_name='course',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='core.CourseCategory'),
        ),
        migrations.AddField(
            model_name='course',
            name='semester',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='core.Semester'),
        ),
        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=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()),
            ],
        ),
    ]
Beispiel #28
0
class Migration(migrations.Migration):

    initial = True

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

    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')),
                ('venmo_id', models.CharField(default='', max_length=200)),
                ('phone_number', phone_field.models.PhoneField(max_length=31)),
                ('photo',
                 models.ImageField(default='images/default.jpg',
                                   upload_to='images/')),
                ('avg_rating', models.FloatField(default=0.0)),
                ('count', models.IntegerField(default=0)),
                ('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='Rider',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pickupLoc',
                 models.CharField(max_length=200,
                                  verbose_name='Pick Up Location')),
                ('dropoffLoc',
                 models.CharField(max_length=200,
                                  verbose_name='Drop Off Location')),
                ('additionalNotes',
                 models.CharField(max_length=500,
                                  verbose_name='Additional Notes')),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Ride',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('postedTime',
                 models.DateTimeField(verbose_name='Posted Date')),
                ('rideDate', models.DateField(verbose_name='Ride Date')),
                ('rideTime',
                 models.TimeField(verbose_name='Ride Departure Time:')),
                ('rideStartLoc',
                 mapbox_location_field.models.LocationField(
                     map_attrs={
                         'center': [38.034887, -78.504832],
                         'marker_color': 'blue'
                     },
                     null=True,
                     verbose_name='Departure location')),
                ('startAddress', models.CharField(default='', max_length=500)),
                ('rideEndLoc',
                 mapbox_location_field.models.LocationField(
                     map_attrs={
                         'center': [38.034887, -78.504832],
                         'marker_color': 'blue'
                     },
                     null=True,
                     verbose_name='Destination')),
                ('endAddress', models.CharField(default='', max_length=500)),
                ('generalDest', models.CharField(default='', max_length=500)),
                ('spacesAvailable',
                 models.IntegerField(default=0,
                                     verbose_name='Spaces Available')),
                ('cost_currency',
                 djmoney.models.fields.CurrencyField(choices=[('USD',
                                                               'US Dollar')],
                                                     default='USD',
                                                     editable=False,
                                                     max_length=3)),
                ('cost',
                 djmoney.models.fields.MoneyField(decimal_places=2,
                                                  default=Decimal('0'),
                                                  default_currency='USD',
                                                  max_digits=5)),
                ('details',
                 models.TextField(
                     blank=True,
                     default='',
                     verbose_name='Additional details for riders (optional)')),
                ('driver',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('riderList',
                 models.ManyToManyField(related_name='_ride_riderList_+',
                                        to='rideapp.Rider')),
                ('riderRequests',
                 models.ManyToManyField(related_name='_ride_riderRequests_+',
                                        to='rideapp.Rider')),
            ],
        ),
        migrations.CreateModel(
            name='Feedback',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('rating', models.IntegerField(default=3)),
                ('feedback', models.TextField(default='')),
                ('driver',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('ride',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='rideapp.Ride')),
            ],
        ),
    ]
Beispiel #29
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')),
                ('is_student', models.BooleanField(default=True)),
                ('is_owner', models.BooleanField(default=False)),
                ('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='ammenities',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('quantity', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'verbose_name_plural': 'Ammenities',
            },
        ),
        migrations.CreateModel(
            name='bug_report',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('contact_no', models.IntegerField()),
                ('email', models.EmailField(max_length=254)),
                ('issue', models.TextField()),
                ('image', models.ImageField(upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='library',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('owner_fname', models.CharField(max_length=50)),
                ('owner_lname', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('mobile_no', models.IntegerField()),
                ('addr1', models.CharField(max_length=50)),
                ('addr2', models.CharField(max_length=50)),
                ('city', models.CharField(max_length=50)),
                ('pincode', models.IntegerField()),
                ('state', models.CharField(max_length=50)),
                ('longitude', models.FloatField()),
                ('latitude', models.FloatField()),
                ('landline', models.IntegerField()),
                ('library_description', models.TextField(max_length=500)),
                ('past_record_of_students', models.TextField(max_length=500)),
                ('fb_url', models.CharField(max_length=200)),
                ('insta', models.CharField(max_length=100)),
                ('google_map', models.CharField(max_length=100)),
                ('website', models.CharField(max_length=50)),
                ('main_image', models.ImageField(null=True, upload_to='')),
                ('no_of_seats', models.IntegerField()),
                ('opening_time', models.TimeField()),
                ('closing_time', models.TimeField()),
                ('non_refundable_charges', models.IntegerField()),
                ('min_monthly_charges', models.IntegerField()),
                ('min_price_range', models.IntegerField()),
                ('max_price_range', models.TextField()),
                ('verified', models.BooleanField(default=False)),
                ('visible', models.BooleanField(default=True)),
                ('views', models.IntegerField(default=0)),
                ('ammenities', models.ManyToManyField(to='core.ammenities')),
            ],
            options={
                'verbose_name_plural': 'Libraries',
            },
        ),
        migrations.CreateModel(
            name='newsletter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='payment_methods',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name_plural': 'Payment Methods',
            },
        ),
        migrations.CreateModel(
            name='testimonial',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='weekday',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('day', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='library_videos',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('video', models.FileField(upload_to='')),
                ('youtube_url', models.CharField(max_length=250)),
                ('library',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.library')),
            ],
            options={
                'verbose_name_plural': 'Library Videos',
            },
        ),
        migrations.CreateModel(
            name='library_images',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image', models.ImageField(upload_to='')),
                ('library',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.library')),
            ],
            options={
                'verbose_name_plural': 'Library Images',
            },
        ),
        migrations.AddField(
            model_name='library',
            name='opening_days',
            field=models.ManyToManyField(to='core.weekday'),
        ),
        migrations.AddField(
            model_name='library',
            name='owner',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='library',
            name='payment_methods',
            field=models.ManyToManyField(to='core.payment_methods'),
        ),
        migrations.CreateModel(
            name='enquiry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('contact_no', models.IntegerField()),
                ('preferred_joining_date', models.DateField()),
                ('preferred_time_slot', models.CharField(max_length=50)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Enquiries',
            },
        ),
        migrations.CreateModel(
            name='bookmark',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('libraries', models.ManyToManyField(to='core.library')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Bookmarks',
            },
        ),
    ]
Beispiel #30
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Usuario',
            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')),
                ('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')),
                ('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)),
                ('username', models.CharField(max_length=50, unique=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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Administrador',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user_id',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Calificacion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('valor', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Consulta',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('estado', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Detalle_Consulta',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('fecha_reser', models.DateField()),
                ('fecha_prog', models.DateField()),
                ('hora', models.TimeField()),
                ('precio', models.FloatField()),
                ('calificacion', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Detalles_Especialidad',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pagos_total', models.FloatField(default=0, null=True)),
                ('total_doctor', models.IntegerField(default=0, null=True)),
                ('citas_realizadas', models.IntegerField(default=0,
                                                         null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Detalles_Paquetes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pagos_total', models.FloatField(default=0, null=True)),
                ('total_pacientes', models.IntegerField(default=0, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Dias',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('identificador_medico', models.CharField(max_length=250)),
                ('documento',
                 models.FileField(null=True,
                                  upload_to=medicina.models.doc_up)),
                ('calificacion_total', models.FloatField(default=0,
                                                         null=True)),
                ('citas_realizadas', models.IntegerField(default=0,
                                                         null=True)),
                ('user_id',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Especialidad',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
                ('descripcion', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Examenes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
                ('descripcion', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Grupo_Familiar',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Historial_consulta',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('tipo_sangre', models.CharField(max_length=10)),
                ('peso', models.FloatField()),
                ('estatura', models.FloatField()),
                ('fecha', models.DateField()),
                ('documento', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Horario',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('hora_entrada', models.TimeField()),
                ('hora_salida', models.TimeField()),
                ('dias',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Dias')),
                ('doctor',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Doctor')),
            ],
        ),
        migrations.CreateModel(
            name='Llamada',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('tipo', models.TextField()),
                ('duracion', models.IntegerField()),
                ('calificacion', models.IntegerField()),
                ('consulta_id',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Consulta')),
            ],
        ),
        migrations.CreateModel(
            name='MatchEspecialidades',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('doctor',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Doctor')),
                ('especialidad',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Especialidad')),
            ],
        ),
        migrations.CreateModel(
            name='MatchPaquetes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Medicamento',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
                ('precio', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Paciente',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('citas_realizadas', models.IntegerField(default=0,
                                                         null=True)),
                ('user_id',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Pagos_Paciente',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pago_total', models.FloatField(default=0, null=True)),
                ('paciente',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Paciente')),
            ],
        ),
        migrations.CreateModel(
            name='Paquete',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
                ('descripcion', models.TextField()),
                ('precio', models.FloatField()),
                ('duracion', models.IntegerField()),
                ('especialidad',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Especialidad')),
                ('examen',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Examenes')),
            ],
        ),
        migrations.CreateModel(
            name='Persona',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=250)),
                ('apellido', models.CharField(max_length=250)),
                ('tipo_documento', models.CharField(max_length=250,
                                                    null=True)),
                ('numero_documento', models.CharField(max_length=250,
                                                      null=True)),
                ('fecha_nac', models.DateField(null=True)),
                ('edad', models.IntegerField(null=True)),
                ('sexo', models.CharField(max_length=250, null=True)),
                ('telefono', models.CharField(max_length=250, null=True)),
                ('pais', models.CharField(max_length=250, null=True)),
                ('ciudad', models.CharField(max_length=250, null=True)),
                ('direccion', models.CharField(max_length=250, null=True)),
                ('imagen',
                 models.ImageField(null=True,
                                   upload_to=medicina.models.imagen_up)),
            ],
        ),
        migrations.CreateModel(
            name='Publicidad',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('imagen',
                 models.ImageField(default='static/imagenes/no-img.jpg',
                                   upload_to='static/imagenes')),
                ('name', models.CharField(max_length=100)),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('dueno', models.CharField(max_length=100)),
                ('precio', models.FloatField()),
                ('telefono', models.CharField(max_length=250, null=True)),
                ('ciudad', models.CharField(max_length=250, null=True)),
                ('direccion', models.CharField(max_length=250, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Receta',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('descripcion', models.TextField()),
                ('consulta_id',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Consulta')),
            ],
        ),
        migrations.CreateModel(
            name='RecetarMedicamentos',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('medicamento',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Medicamento')),
                ('receta',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='medicina.Receta')),
            ],
        ),
        migrations.CreateModel(
            name='Tarifa',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=100)),
                ('descripcion', models.TextField()),
                ('precio', models.FloatField()),
            ],
        ),
        migrations.AddField(
            model_name='matchpaquetes',
            name='paciente',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Paciente'),
        ),
        migrations.AddField(
            model_name='matchpaquetes',
            name='paquete',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Paquete'),
        ),
        migrations.AddField(
            model_name='historial_consulta',
            name='paciente_id',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Paciente'),
        ),
        migrations.AddField(
            model_name='grupo_familiar',
            name='paciente',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Paciente'),
        ),
        migrations.AddField(
            model_name='grupo_familiar',
            name='usuario_titular',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='detalles_paquetes',
            name='paquetes',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Paquete'),
        ),
        migrations.AddField(
            model_name='detalles_especialidad',
            name='especialidad',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Especialidad'),
        ),
        migrations.AddField(
            model_name='detalle_consulta',
            name='especialidad',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Especialidad'),
        ),
        migrations.AddField(
            model_name='consulta',
            name='detalle',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Detalle_Consulta'),
        ),
        migrations.AddField(
            model_name='consulta',
            name='doctor_id',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Doctor'),
        ),
        migrations.AddField(
            model_name='consulta',
            name='paciente_id',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Paciente'),
        ),
        migrations.AddField(
            model_name='calificacion',
            name='doctor_id',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Doctor'),
        ),
        migrations.AddField(
            model_name='calificacion',
            name='paciente_id',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Paciente'),
        ),
        migrations.AddField(
            model_name='usuario',
            name='persona_id',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='medicina.Persona'),
        ),
        migrations.AddField(
            model_name='usuario',
            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'),
        ),
    ]