You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
8.4 KiB
149 lines
8.4 KiB
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.9.7 on 2016-07-21 15:08
|
|
from __future__ import unicode_literals
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import django.utils.timezone
|
|
import mptt.fields
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('auth', '0007_alter_validators_add_error_messages'),
|
|
('common', '0001_initial'),
|
|
('specializations', '0001_initial'),
|
|
]
|
|
|
|
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')),
|
|
('avatar', models.ImageField(blank=True, upload_to='users/avatars/')),
|
|
('contractor_status', models.CharField(choices=[('free', 'Свободен'), ('busy', 'Занят')], default='free', max_length=20)),
|
|
('created', models.DateTimeField(default=django.utils.timezone.now)),
|
|
('cro', models.BooleanField(default=False)),
|
|
('date_joined', models.DateTimeField(default=django.utils.timezone.now)),
|
|
('date_of_birth', models.DateTimeField(blank=True, null=True)),
|
|
('email', models.EmailField(db_index=True, max_length=255, unique=True)),
|
|
('first_name', models.CharField(blank=True, max_length=255)),
|
|
('gender', models.CharField(blank=True, choices=[('male', 'Мужской'), ('female', 'Женский')], max_length=30)),
|
|
('is_active', models.BooleanField(default=True)),
|
|
('last_name', models.CharField(blank=True, max_length=255)),
|
|
('last_time_visit', models.DateTimeField(default=django.utils.timezone.now)),
|
|
('patronym', models.CharField(blank=True, max_length=255)),
|
|
('phone', models.CharField(blank=True, max_length=30, null=True)),
|
|
('skype', models.CharField(blank=True, max_length=100)),
|
|
('username', models.CharField(max_length=50, unique=True)),
|
|
('website', models.CharField(blank=True, max_length=255)),
|
|
],
|
|
options={
|
|
'verbose_name': 'Пользователь',
|
|
'verbose_name_plural': 'Пользователи',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='ContractorFinancialInfo',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('credit_card_number', models.CharField(max_length=50)),
|
|
('date_of_birth', models.DateTimeField()),
|
|
('fio', models.CharField(max_length=255)),
|
|
('inn', models.CharField(max_length=100)),
|
|
('legal_status', models.CharField(choices=[('individual', 'Физическое лицо'), ('legal_entity', 'ИП и юридическое лицо')], max_length=30)),
|
|
('passport_issue_date', models.DateTimeField()),
|
|
('passport_issued_by', models.CharField(max_length=255)),
|
|
('passport_number', models.CharField(max_length=10)),
|
|
('passport_scan', models.ImageField(upload_to='users/contractors/')),
|
|
('passport_series', models.CharField(max_length=6)),
|
|
('phone', models.CharField(max_length=30)),
|
|
('residency', models.CharField(choices=[('russian_resident', 'Резидент РФ'), ('non_russian_resident', 'Нерезидент РФ'), ('refugee', 'Беженец'), ('russian_stay_permit', 'Вид на жительство')], max_length=50)),
|
|
('subdivision_code', models.CharField(max_length=10)),
|
|
('yandex_money', models.CharField(max_length=50)),
|
|
],
|
|
options={
|
|
'verbose_name': 'Финансовая информация',
|
|
'verbose_name_plural': 'Финансовая информация',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='ContractorResume',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('resume_file', models.FileField(upload_to='users/resume/files/')),
|
|
('text', models.TextField()),
|
|
],
|
|
options={
|
|
'verbose_name': 'Резюме',
|
|
'verbose_name_plural': 'Резюме',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='ContractorResumeFiles',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('description', models.TextField(blank=True)),
|
|
('img', models.ImageField(upload_to='users/resume/images/')),
|
|
('title', models.CharField(max_length=255)),
|
|
('type', models.CharField(choices=[('diplom', 'Дипломы/Сертификаты'), ('cro', 'Допуск CPO')], max_length=50)),
|
|
('resume', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resume_files', to='users.ContractorResume')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Файлы резюме',
|
|
'verbose_name_plural': 'Файлы резюме',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Team',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('created', models.DateTimeField(default=django.utils.timezone.now)),
|
|
('name', models.CharField(max_length=255)),
|
|
('owner', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='team', to=settings.AUTH_USER_MODEL)),
|
|
('specializations', mptt.fields.TreeManyToManyField(blank=True, related_name='teams', to='specializations.Specialization')),
|
|
('users', models.ManyToManyField(blank=True, related_name='teams', to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'verbose_name': 'Команда',
|
|
'verbose_name_plural': 'Команды',
|
|
},
|
|
),
|
|
migrations.AddField(
|
|
model_name='user',
|
|
name='contractor_financial_info',
|
|
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='contractor', to='users.ContractorFinancialInfo'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='user',
|
|
name='contractor_resume',
|
|
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='contractor', to='users.ContractorResume'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='user',
|
|
name='contractor_specializations',
|
|
field=mptt.fields.TreeManyToManyField(blank=True, related_name='contractors', to='specializations.Specialization'),
|
|
),
|
|
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='location',
|
|
field=mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='users', to='common.Location'),
|
|
),
|
|
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'),
|
|
),
|
|
]
|
|
|