class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name='ClickStatisticModel', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('time', models.DateTimeField(auto_now_add=True)), ('ip_address', models.GenericIPAddressField(editable=False)), ('http_referer', models.URLField(blank=True, editable=False, null=True)), ], options={ 'verbose_name': 'short url statistic', 'db_table': 'vilantis_short_url_click_statistics', }, ), migrations.CreateModel( name='ShortURLModel', fields=[ ('short_url_id', models.CharField(default=backend.models.ShortURLModel. generate_short_url_id, editable=False, max_length=8, primary_key=True, serialize=False)), ('expiration_datetime', models.DateTimeField(default=backend.models.ShortURLModel. generate_expiration_datetime)), ('long_url', models.URLField()), ('access_limit', models.PositiveSmallIntegerField(default=100)), ('access_counter', models.PositiveSmallIntegerField(default=0, editable=False)), ('is_active', models.BooleanField(default=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ], options={ 'verbose_name': 'short url', 'db_table': 'vilantis_short_urls', }, ), migrations.AddIndex( model_name='shorturlmodel', index=models.Index(fields=['short_url_id'], name='vilantis_sh_short_u_7e003a_idx'), ), migrations.AddField( model_name='clickstatisticmodel', name='short_url', field=models.ForeignKey( editable=False, on_delete=django.db.models.deletion.CASCADE, to='backend.shorturlmodel'), ), migrations.AddIndex( model_name='clickstatisticmodel', index=models.Index(fields=['short_url'], name='vilantis_sh_short_u_86a83a_idx'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), ], options={ 'verbose_name': 'user', 'verbose_name_plural': 'users', 'abstract': False, }, managers=[ ('objects', django.contrib.auth.models.UserManager()), ], ), migrations.CreateModel( name='Automobile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('auto_type', models.CharField(choices=[('S', 'SEDAN'), ('T', 'TRUCK'), ('M', 'MOTORCYCLE'), ('U', 'UNKNOWN')], default='U', max_length=2)), ], ), migrations.CreateModel( name='Customer', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('city', models.CharField(blank=True, max_length=1023, null=True, verbose_name='City')), ('country', django_countries.fields.CountryField(blank=True, max_length=2, null=True)), ('email', models.EmailField(max_length=254, unique=True)), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Lead', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('author', models.CharField(max_length=100)), ('message', models.CharField(max_length=300)), ('created_at', models.DateTimeField(auto_now_add=True)), ], ), migrations.CreateModel( name='ServiceProvider', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('payment', models.CharField(max_length=100)), ('city', models.CharField(blank=True, max_length=1023, null=True, verbose_name='City')), ('country', django_countries.fields.CountryField(blank=True, max_length=2, null=True)), ('email', models.EmailField(max_length=254, unique=True)), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Shop', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('shop_name', models.CharField(max_length=50, unique=True)), ('membership', models.CharField(choices=[('P', 'Premium'), ('B', 'Basic'), ('F', 'Free')], default='F', max_length=2)), ('longitude', models.DecimalField(decimal_places=6, default=-76.585664, max_digits=9)), ('latitude', models.DecimalField(decimal_places=6, default=2.449903, max_digits=9)), ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='my_shops', to='backend.serviceprovider')), ], ), migrations.CreateModel( name='ShopService', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('price', models.DecimalField(decimal_places=0, max_digits=10, verbose_name='Service Price')), ('services', multiselectfield.db.fields.MultiSelectField(choices=[('OC', 'OIL CHANGE'), ('OFC', 'FILTER CHANGE'), ('AIF', 'AIR_FILTER_CHANGE'), ('WB', 'WIPER BLADE REPLACEMENT'), ('TR', 'TIRE FIXING'), ('PW', 'PAINT WORK'), ('TA', 'PROFESSIONAL TECHNICAL ASSISTANCE'), ('MA', 'SCHEDULED MAINTENANCE'), ('CW', 'CAR WASHING'), ('BW', 'BRAKE WORK'), ('ETU', 'ENGINE TUNE UP'), ('WW', 'WHEELS ALIGNED/BALANCED'), ('NN', 'NO SERVICE LISTED')], default='NN', max_length=41)), ('description', models.CharField(default='', max_length=250)), ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shop_services', to='backend.shop')), ('target_automobile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='related_services', to='backend.automobile')), ], ), migrations.CreateModel( name='ServiceCoverage', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('coverage', models.CharField(choices=[('OC', 'OIL CHANGE'), ('OFC', 'FILTER CHANGE'), ('AIF', 'AIR_FILTER_CHANGE'), ('WB', 'WIPER BLADE REPLACEMENT'), ('TR', 'TIRE FIXING'), ('PW', 'PAINT WORK'), ('TA', 'PROFESSIONAL TECHNICAL ASSISTANCE'), ('MA', 'SCHEDULED MAINTENANCE'), ('CW', 'CAR WASHING'), ('BW', 'BRAKE WORK'), ('ETU', 'ENGINE TUNE UP'), ('WW', 'WHEELS ALIGNED/BALANCED'), ('NN', 'NO SERVICE LISTED')], default='NN', max_length=3)), ('shop_offer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='available_services', to='backend.shopservice')), ], ), migrations.CreateModel( name='CustomerPublication', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('description', models.CharField(max_length=100)), ('longitude', models.DecimalField(decimal_places=6, default=-76.606422, max_digits=9)), ('latitude', models.DecimalField(decimal_places=6, default=2.44165, max_digits=9)), ('photo', models.ImageField(default=backend.models.get_random_name, upload_to='images/publication_images', verbose_name='Optional Image')), ('publisher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='service_inquiry', to='backend.customer')), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Author', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100, verbose_name='Name')), ('email', models.EmailField(max_length=50, null=True, verbose_name='Email')), ], options={ 'ordering': ['name'], }, ), migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100, verbose_name='Book Name')), ('slug', models.SlugField(blank=True, unique=True)), ('description', models.TextField(blank=True)), ('image', models.ImageField( blank=True, null=True, upload_to=backend.models.upload_image_path)), ('page', models.IntegerField(null=True, verbose_name='Page')), ('publish_date', models.DateField(verbose_name='Published Date')), ('price', models.DecimalField(decimal_places=2, max_digits=10)), ('stock', models.PositiveIntegerField()), ('available', models.BooleanField(default=True)), ], options={ 'ordering': ['title'], }, ), migrations.CreateModel( name='BookLinkAuthor', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Author')), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Book')), ], ), migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(default='', max_length=100, verbose_name='title')), ('description', models.TextField()), ('is_active', models.BooleanField(default=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('slug', models.SlugField(blank=True, null=True, unique=True)), ], options={ 'verbose_name_plural': 'Categories', 'ordering': ['title'], }, ), migrations.CreateModel( name='Customer', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('contact', models.CharField(blank=True, max_length=14, null=True)), ('location', models.TextField(blank=True, null=True)), ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='customer_profile', to=settings.AUTH_USER_MODEL)), ], ), migrations.AddField( model_name='book', name='category', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to='backend.Category', verbose_name='Category;'), ), ]
class Migration(migrations.Migration): replaces = [('backend', '0035_auto_20201212_1810'), ('backend', '0036_auto_20201212_1826'), ('backend', '0037_auto_20201212_1831'), ('backend', '0038_auto_20201212_1831'), ('backend', '0039_auto_20201212_1831'), ('backend', '0040_auto_20201212_1840'), ('backend', '0041_userinformation_avatar'), ('backend', '0042_auto_20201212_1847'), ('backend', '0043_auto_20201212_2057'), ('backend', '0044_verifiedemail_user'), ('backend', '0045_remove_userinformation_emails'), ('backend', '0046_auto_20201212_2126'), ('backend', '0047_auto_20201212_2127'), ('backend', '0048_auto_20201212_2151'), ('backend', '0049_populate_emails'), ('backend', '0050_auto_20201212_2211'), ('backend', '0051_auto_20201212_2258'), ('backend', '0052_auto_20201212_2327'), ('backend', '0053_auto_20201212_2341'), ('backend', '0054_auto_20201212_2343'), ('backend', '0055_auto_20201213_0022'), ('backend', '0056_auto_20201213_0041'), ('backend', '0057_auto_20201213_0125'), ('backend', '0058_auto_20201213_0126'), ('backend', '0059_verifiableemail_domain')] dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('backend', '0034_auto_20201203_1151'), ] operations = [ migrations.RemoveField( model_name='userpreferences', name='description', ), migrations.CreateModel( name='Expertise', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(help_text='Expertise description', max_length=100)), ], options={ 'ordering': ['name'], }, ), migrations.CreateModel( name='ExpertiseKeyword', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(help_text='Expertise keyword description', max_length=100)), ], options={ 'ordering': ['name'], }, ), migrations.CreateModel( name='UserInformation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.TextField(blank=True, help_text='Your position', null=True)), ('bio', models.TextField( blank=True, help_text='Self-description (degree, biography, ...)', null=True)), ('comment_anonymously', models.BooleanField( default=False, help_text='Comment anonymously by-default')), ('show_online_presence', models.BooleanField( default=False, help_text='Show my online presence on Tournesol')), ('birth_year', models.IntegerField( blank=True, help_text='Year of birth', null=True, validators=[ django.core.validators.MinValueValidator(1900), django.core.validators.MaxValueValidator(2100) ])), ('gender', models.CharField(blank=True, help_text='Your gender', max_length=50, null=True)), ('nationality', models.CharField(blank=True, help_text='Your nationality', max_length=50, null=True)), ('race', models.CharField(blank=True, help_text='Your race', max_length=50, null=True)), ('political_affiliation', models.CharField(blank=True, help_text='Your political affiliation', max_length=50, null=True)), ('religion', models.CharField(blank=True, help_text='Your religion', max_length=50, null=True)), ('degree_of_political_engagement', models.CharField( blank=True, help_text='Your degree of political engagement', max_length=50, null=True)), ('user', models.OneToOneField( help_text='DjangoUser that the info belong to', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ('expertises', models.ManyToManyField(blank=True, help_text='Your expertise.', related_name='expertises', to='backend.Expertise')), ('expertise_keywords', models.ManyToManyField(blank=True, help_text='Your expertise keywords.', related_name='expertise_keywords', to='backend.ExpertiseKeyword')), ('first_name', models.CharField(blank=True, help_text='First name', max_length=100, null=True)), ('google_scholar', models.URLField(blank=True, help_text='Your Google Scholar URL', max_length=500, null=True)), ('last_name', models.CharField(blank=True, help_text='Last name', max_length=100, null=True)), ('linkedin', models.URLField(blank=True, help_text='Your LinkedIn URL', max_length=500, null=True)), ('orcid', models.URLField(blank=True, help_text='Your ORCID', max_length=500, null=True)), ('twitter', models.URLField(blank=True, help_text='Your Twitter handle', max_length=500, null=True)), ('website', models.URLField(blank=True, help_text='Your website URL', max_length=500, null=True)), ('youtube', models.URLField(blank=True, help_text='Your Youtube channel URL', max_length=500, null=True)), ('avatar', models.ImageField( blank=True, help_text='Your profile picture.', upload_to='profiles', validators=[ backend.models.UserInformation.validate_avatar ])), ], ), migrations.CreateModel( name='Degree', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('level', models.CharField(help_text='Degree level', max_length=100)), ('domain', models.CharField(help_text='Degree domain', max_length=100)), ('institution', models.CharField(help_text='Degree institution', max_length=100)), ('user', models.ForeignKey( help_text='User that the degree belongs to.', null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.UserInformation')), ], options={ 'ordering': ['level', 'domain', 'institution'], }, ), migrations.CreateModel( name='VerifiableEmail', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('email', models.EmailField(help_text='E-mail address', max_length=100, unique=True)), ('is_verified', models.BooleanField( default=False, help_text='If true, this e-mail is verified')), ('token', models.CharField( blank=True, help_text= 'The token that needs to be supplied to verify this e-mail address', max_length=1000, null=True)), ('user', models.ForeignKey( help_text='User that this e-mail belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.UserInformation')), ], ), migrations.AlterField( model_name='verifiableemail', name='user', field=models.ForeignKey( default=None, help_text='User that this e-mail belongs to', on_delete=django.db.models.deletion.CASCADE, to='backend.UserInformation'), preserve_default=False, ), migrations.AlterField( model_name='degree', name='user', field=models.ForeignKey( help_text='User that the degree belongs to.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='degrees', to='backend.UserInformation'), ), migrations.AlterField( model_name='verifiableemail', name='user', field=models.ForeignKey( help_text='User that this e-mail belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='emails', to='backend.UserInformation'), ), migrations.AlterField( model_name='expertise', name='name', field=models.CharField(help_text='Expertise description', max_length=100, unique=True), ), migrations.AlterField( model_name='expertisekeyword', name='name', field=models.CharField(help_text='Expertise keyword description', max_length=100, unique=True), ), migrations.AlterField( model_name='userinformation', name='avatar', field=models.ImageField( blank=True, help_text='Your profile picture.', null=True, upload_to='profiles', validators=[backend.models.UserInformation.validate_avatar]), ), migrations.AlterUniqueTogether( name='degree', unique_together={('level', 'domain', 'institution', 'user')}, ), migrations.RemoveField( model_name='userinformation', name='expertise_keywords', ), migrations.RemoveField( model_name='userinformation', name='expertises', ), migrations.AddField( model_name='expertise', name='user', field=models.ForeignKey( help_text='User for the expertise', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='expertises', to='backend.UserInformation'), ), migrations.AddField( model_name='expertisekeyword', name='user', field=models.ForeignKey( help_text='User for the expertise keywords', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='expertise_keywords', to='backend.UserInformation'), ), migrations.AlterField( model_name='expertise', name='name', field=models.CharField(help_text='Expertise description', max_length=100), ), migrations.AlterField( model_name='expertisekeyword', name='name', field=models.CharField(help_text='Expertise keyword description', max_length=100), ), migrations.AlterUniqueTogether( name='expertise', unique_together={('name', 'user')}, ), migrations.AlterUniqueTogether( name='expertisekeyword', unique_together={('name', 'user')}, ), migrations.AlterModelOptions( name='degree', options={'ordering': ['rank', 'level', 'domain', 'institution']}, ), migrations.AlterModelOptions( name='expertise', options={'ordering': ['rank', 'name']}, ), migrations.AlterModelOptions( name='expertisekeyword', options={'ordering': ['rank', 'name']}, ), migrations.AlterModelOptions( name='verifiableemail', options={'ordering': ['rank']}, ), migrations.AddField( model_name='degree', name='rank', field=models.IntegerField(default=0, help_text='Ordering field'), ), migrations.AddField( model_name='expertise', name='rank', field=models.IntegerField(default=0, help_text='Ordering field'), ), migrations.AddField( model_name='expertisekeyword', name='rank', field=models.IntegerField(default=0, help_text='Ordering field'), ), migrations.AddField( model_name='verifiableemail', name='rank', field=models.IntegerField(default=0, help_text='Ordering field'), ), migrations.AlterField( model_name='verifiableemail', name='email', field=models.EmailField(help_text='E-mail address', max_length=100), ), migrations.AlterUniqueTogether( name='verifiableemail', unique_together={('email', 'user')}, ), migrations.AlterField( model_name='verifiableemail', name='user', field=models.ForeignKey( help_text='User that this e-mail belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='emails', to='backend.UserInformation'), ), migrations.AddField( model_name='verifiableemail', name='domain', field=computed_property.fields.ComputedCharField( compute_from='email_domain', default=uuid.uuid1, editable=False, help_text='Email domain with @', max_length=50), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Administrator', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('username', models.CharField(default='', max_length=12, verbose_name='登录账号')), ('password', models.CharField(default='', max_length=50, verbose_name='密码')), ('grade', models.CharField(default='', max_length=50, verbose_name='管理年级')), ], ), migrations.CreateModel( name='Student', fields=[ ('id', models.CharField(max_length=12, primary_key=True, serialize=False, verbose_name='学号')), ('password', models.CharField(default='', max_length=50, verbose_name='密码')), ('name', models.CharField(default='', max_length=50, verbose_name='学生姓名')), ('gender', models.IntegerField(choices=[(0, '男'), (1, '女')], default=0, verbose_name='性别')), ('Avatar', models.ImageField(upload_to=backend.models.get_path, verbose_name='学生头像')), ('grade', models.CharField(default='', max_length=4, verbose_name='年级')), ('college', models.CharField(default='', max_length=50, verbose_name='学院名称')), ('subject', models.CharField(default='', max_length=50, verbose_name='专业名称')), ('class_name', models.CharField(default='', max_length=50, verbose_name='班级名称')), ('profile', models.TextField(default='', verbose_name='个人简介')), ('award', models.TextField(default='', verbose_name='获奖情况')), ('agree_distribution', models.BooleanField(default=False, verbose_name='接受分配')), ], ), migrations.CreateModel( name='Teacher', fields=[ ('id', models.CharField(max_length=12, primary_key=True, serialize=False, verbose_name='工号')), ('password', models.CharField(default='', max_length=50, verbose_name='密码')), ('name', models.CharField(default='', max_length=50, verbose_name='教师姓名')), ('gender', models.IntegerField(choices=[(0, '男'), (1, '女')], default=0, verbose_name='性别')), ('Avatar', models.ImageField(upload_to=backend.models.get_path, verbose_name='教师头像')), ('college', models.CharField(default='', max_length=50, verbose_name='学院名称')), ('subject', models.CharField(default='', max_length=50, verbose_name='导师方向')), ('profile', models.TextField(default='', verbose_name='个人简介')), ('award', models.TextField(default='', verbose_name='获奖情况')), ], ), migrations.CreateModel( name='Selection', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('is_first', models.BooleanField(default=True, verbose_name='是否为第一志愿导师')), ('pass_status', models.IntegerField(choices=[(0, '待通过'), (1, '通过'), (2, '未通过')], verbose_name='通过情况')), ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Student', verbose_name='学生')), ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Teacher', verbose_name='导师')), ], ), migrations.CreateModel( name='Publicity', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('grade', models.CharField(default='', max_length=4, verbose_name='年级')), ('content', models.TextField(verbose_name='公示内容')), ('start_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='开始公示时间')), ('end_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='公示结束时间')), ('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Administrator', verbose_name='发布者')), ], ), migrations.CreateModel( name='OpeningTime', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('grade', models.CharField(default='', max_length=4, verbose_name='年级')), ('start_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='开始开放时间')), ('end_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='公示开放时间')), ('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Administrator', verbose_name='开放者')), ], ), migrations.CreateModel( name='File', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('file', models.FileField(upload_to='file')), ('publicity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Publicity', verbose_name='公示')), ], ), ]
class Migration(migrations.Migration): dependencies = [ ('backend', '0003_user_banned'), ] operations = [ migrations.CreateModel( name='Image', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('image', backend.fields.WrappedImageField( storage=backend.storage.WrappedBCDNStorage( local_options={ 'base_url': backend.models.get_poster_media_url, 'location': backend.models.get_poster_base_location }), upload_to=backend.models.get_image_location)), ('created_at', models.DateTimeField(default=django.utils.timezone.now)), ], ), migrations.RemoveField( model_name='video', name='is_local', ), migrations.RemoveField( model_name='video', name='thumbnail', ), migrations.RemoveField( model_name='video', name='video_status', ), migrations.AddField( model_name='video', name='playlist_file', field=backend.fields.WrappedFileField( default='', storage=backend.storage.WrappedBCDNStorage( local_options={ 'base_url': backend.models.get_video_media_url, 'location': backend.models.get_video_base_location }), upload_to=backend.models.get_video_location), preserve_default=False, ), migrations.AddField( model_name='video', name='published', field=models.BooleanField(default=False), ), migrations.AddField( model_name='video', name='transcode_status', field=models.CharField(choices=[('queued', 'Queued'), ('started', 'Processing'), ('finished', 'Done'), ('failed', 'Error')], db_column='video_status', default='queued', max_length=255), ), migrations.AlterField( model_name='video', name='uploaded_file', field=backend.fields.WrappedFileField( blank=True, default='', storage=backend.storage.WrappedBCDNStorage( local_options={ 'base_url': backend.models.get_video_media_url, 'location': backend.models.get_video_base_location }), upload_to=backend.models.get_video_location), preserve_default=False, ), migrations.AlterField( model_name='video', name='visibility', field=models.CharField(choices=[('PRIVATE', 'Private'), ('PUBLIC', 'Public'), ('UNLISTED', 'Unlisted'), ('draft', 'Draft')], default='PRIVATE', max_length=8), ), migrations.CreateModel( name='ImageSet', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_at', models.DateTimeField(default=django.utils.timezone.now)), ('primary_image', models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='backend.Image')), ], ), migrations.AddField( model_name='image', name='image_set', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='images', to='backend.ImageSet'), ), migrations.AddField( model_name='image', name='video', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='images', to='backend.Video'), ), migrations.AddField( model_name='video', name='image_set', field=models.OneToOneField( null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.ImageSet'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] 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=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')), ('created_date', models.DateTimeField(auto_now_add=True)), ('modified_date', models.DateTimeField(auto_now=True)), ('last_seen', models.DateTimeField(blank=True, null=True)), ('app_installed', models.BooleanField(default=False)), ], options={ 'verbose_name': 'Perfil de Usuario', 'verbose_name_plural': 'Perfiles de usuario', }, managers=[ ('objects', django.contrib.auth.models.UserManager()), ], ), migrations.CreateModel( name='Account', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_date', models.DateTimeField(auto_now_add=True)), ('modified_date', models.DateTimeField(auto_now=True)), ('token', models.CharField(max_length=16)), ('status', models.IntegerField(choices=[(0, 'Creada'), (1, 'Activada'), (2, 'Bloqueada')], default=0)), ], options={ 'verbose_name': 'Cuenta', 'verbose_name_plural': 'Cuentas', }, ), migrations.CreateModel( name='Card', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_date', models.DateTimeField(auto_now_add=True)), ('modified_date', models.DateTimeField(auto_now=True)), ('type', models.IntegerField(choices=[(0, 'MasterCard'), (1, 'Visa')], default=0)), ('alias', models.CharField(max_length=40, verbose_name='Alias')), ('number', models.CharField(max_length=16, verbose_name='Nº tarjeta')), ('cvv', models.CharField(max_length=4, verbose_name='Código de Verificación')), ], options={ 'verbose_name': 'Tarjeta', 'verbose_name_plural': 'Tarjetas', }, ), migrations.CreateModel( name='Company', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_date', models.DateTimeField(auto_now_add=True)), ('modified_date', models.DateTimeField(auto_now=True)), ('name', models.CharField(max_length=40, verbose_name='Nombre')), ('identifier', models.CharField(max_length=16, verbose_name='Identificador')), ('icon', models.ImageField( blank=True, null=True, upload_to=backend.models.get_image_path_company, verbose_name='Imagen/Logo')), ], options={ 'verbose_name': 'Comercio', 'verbose_name_plural': 'Comercios', }, ), migrations.CreateModel( name='Device', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_date', models.DateTimeField(auto_now_add=True)), ('modified_date', models.DateTimeField(auto_now=True)), ('name', models.CharField(max_length=40, verbose_name='Nombre')), ('identifier', models.CharField(max_length=16, verbose_name='Identificador')), ], options={ 'verbose_name': 'Dispositivo', 'verbose_name_plural': 'Dispositivos', }, ), migrations.CreateModel( name='Emisor', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_date', models.DateTimeField(auto_now_add=True)), ('modified_date', models.DateTimeField(auto_now=True)), ('name', models.CharField(max_length=40, verbose_name='nombre')), ('identifier', models.CharField(max_length=16, verbose_name='Identificador')), ], options={ 'verbose_name': 'Emisor', 'verbose_name_plural': 'Emisores', }, ), migrations.CreateModel( name='ExpirationDateCard', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('month', models.IntegerField(choices=[(0, '2018'), (1, '2019'), (2, '2020'), (3, '2021'), (4, '2022'), (5, '2023'), (6, '2024')], default=0)), ('year', models.IntegerField(choices=[(1, '01'), (2, '02'), (3, '03'), (4, '04'), (5, '05'), (6, '06'), (7, '07'), (8, '08'), (9, '09'), (10, '10'), (11, '11'), (12, '12')], default=0)), ], ), migrations.AddField( model_name='card', name='emisor', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='card_emisor', to='backend.Emisor'), ), migrations.AddField( model_name='card', name='expiration_date', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='expiration_date_card', to='backend.ExpirationDateCard'), ), migrations.AddField( model_name='userprofile', name='account', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='user_account', to='backend.Account'), ), migrations.AddField( model_name='userprofile', 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='userprofile', 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'), ), ]
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')), ('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')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')), ('company', models.CharField(blank=True, max_length=40, verbose_name='Компания')), ('position', models.CharField(blank=True, max_length=40, verbose_name='Должность')), ('is_active', models.BooleanField( default=False, help_text= 'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('type', models.CharField(choices=[('shop', 'Магазин'), ('buyer', 'Покупатель')], default='buyer', max_length=5, 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': 'Список пользователей', 'ordering': ('email', ), }, managers=[ ('objects', backend.models.UserManager()), ], ), migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=40, verbose_name='Название')), ], options={ 'verbose_name': 'Категория', 'verbose_name_plural': 'Список категорий', 'ordering': ('-name', ), }, ), migrations.CreateModel( name='Contact', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('city', models.CharField(max_length=50, verbose_name='Город')), ('street', models.CharField(max_length=100, verbose_name='Улица')), ('house', models.CharField(blank=True, max_length=15, verbose_name='Дом')), ('structure', models.CharField(blank=True, max_length=15, verbose_name='Корпус')), ('building', models.CharField(blank=True, max_length=15, verbose_name='Строение')), ('apartment', models.CharField(blank=True, max_length=15, verbose_name='Квартира')), ('phone', models.CharField(max_length=20, verbose_name='Телефон')), ('user', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='contacts', to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')), ], options={ 'verbose_name': 'Контакты пользователя', 'verbose_name_plural': 'Список контактов пользователя', }, ), migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('status', models.CharField(choices=[('cart', 'В корзине'), ('new', 'Новый'), ('confirmed', 'Подтвержден'), ('assembled', 'Собран'), ('sent', 'Отправлен'), ('delivered', 'Доставлен'), ('canceled', 'Отменен')], default='cart', max_length=15, verbose_name='Статус')), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ('contact', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Contact', verbose_name='Контакт')), ('user', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='orders', to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')), ], options={ 'verbose_name': 'Заказ', 'verbose_name_plural': 'Список заказов', 'ordering': ('-created', ), }, ), migrations.CreateModel( name='Parameter', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=40, verbose_name='Название')), ], options={ 'verbose_name': 'Имя параметра', 'verbose_name_plural': 'Список имен параметров', 'ordering': ('-name', ), }, ), migrations.CreateModel( name='Product', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=80, verbose_name='Название')), ('model', models.CharField(blank=True, max_length=80, verbose_name='Модель')), ('external_id', models.PositiveIntegerField(verbose_name='Внешний ИД')), ('quantity', models.PositiveIntegerField(verbose_name='Количество')), ('price', models.PositiveIntegerField(verbose_name='Цена')), ('price_rrc', models.PositiveIntegerField( verbose_name='Рекомендуемая розничная цена')), ('category', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='products', to='backend.Category', verbose_name='Категория')), ], options={ 'verbose_name': 'Продукт', 'verbose_name_plural': 'Список продуктов', 'ordering': ('category', '-name'), }, ), migrations.CreateModel( name='Shop', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название')), ('url', models.URLField(blank=True, null=True, verbose_name='Ссылка на файл прайса')), ('state', models.BooleanField(default=True, verbose_name='Cтатус получения заказов')), ('user', models.OneToOneField( blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')), ], options={ 'verbose_name': 'Магазин', 'verbose_name_plural': 'Список магазинов', 'ordering': ('-name', ), }, ), migrations.CreateModel( name='ProductParameter', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('value', models.CharField(max_length=100, verbose_name='Значение')), ('parameter', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='parameter', to='backend.Parameter', verbose_name='Параметр')), ('product', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_parameters', to='backend.Product', verbose_name='Информация о продукте')), ], options={ 'verbose_name': 'Параметр', 'verbose_name_plural': 'Список параметров', }, ), migrations.AddField( model_name='product', name='shop', field=models.ForeignKey( blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='products_info', to='backend.Shop', verbose_name='Магазин'), ), migrations.CreateModel( name='OrderItem', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('product_name', models.CharField(max_length=80, verbose_name='Название товара')), ('external_id', models.PositiveIntegerField(verbose_name='Внешний ИД')), ('quantity', models.PositiveIntegerField(default=1, verbose_name='Количество')), ('price', models.PositiveIntegerField(default=0, verbose_name='Цена')), ('total_amount', models.PositiveIntegerField(default=0, verbose_name='Общая стоимость')), ('category', models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='backend.Category', verbose_name='Категория товара')), ('order', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='ordered_items', to='backend.Order', verbose_name='Заказ')), ('shop', models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='backend.Shop', verbose_name='магазин')), ], options={ 'verbose_name': 'Заказанная позиция', 'verbose_name_plural': 'Список заказанных позиций', }, ), migrations.CreateModel( name='ConfirmEmailToken', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_at', models.DateTimeField( auto_now_add=True, verbose_name='When was this token generated')), ('key', models.CharField(db_index=True, max_length=64, unique=True, verbose_name='Key')), ('user', models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='confirm_email_tokens', to=settings.AUTH_USER_MODEL, verbose_name= 'The User which is associated to this password reset token' )), ], options={ 'verbose_name': 'Токен подтверждения Email', 'verbose_name_plural': 'Токены подтверждения Email', }, ), migrations.AddField( model_name='category', name='shops', field=models.ManyToManyField(blank=True, related_name='categories', to='backend.Shop', verbose_name='Магазины'), ), migrations.AddConstraint( model_name='productparameter', constraint=models.UniqueConstraint( fields=('product', 'parameter'), name='unique_product_parameter'), ), migrations.AddConstraint( model_name='product', constraint=models.UniqueConstraint(fields=('shop', 'category', 'external_id'), name='unique_product_info'), ), migrations.AddConstraint( model_name='orderitem', constraint=models.UniqueConstraint(fields=('order_id', 'product_name'), name='unique_order_item'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserCustom', 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')), ('perm', models.CharField(choices=[ ('A', 'Бухгалтер'), ('GA', 'Главный бухгалтер'), ('D', 'Default'), ('SM', 'Управляющий складом'), ('GSM', 'Главный Управляющий складами'), ('FM', 'Управляющий фабрикой'), ('GFM', 'Главный управляющий фабриками'), ('OM', 'Управляющий офисом'), ('GOM', 'Главный управляющий офисами'), ('FO', 'Основатель'), ('CFO', 'Компания основателей'), ('SM', 'Менеджер по безопасности'), ('GSM', 'Главный мнеджер по безопасности'), ('H', 'Помощник - контролер'), ('S', 'Поставщик'), ('F', 'Фирма'), ('PM', 'Отдел кадров'), ('GPM', 'Начальник отдела кадров'), ('DIR', 'Директор'), ('AAA', 'ADMIN') ], max_length=10, verbose_name='Должность')), ('email', models.EmailField(max_length=254, unique=True, verbose_name='Почта')), ('name', models.CharField(max_length=100, verbose_name='Логин')), ('is_staff', models.BooleanField(default=False, verbose_name='staff status')), ('groups', models.ManyToManyField( blank=True, help_text= 'The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), ('user_permissions', models.ManyToManyField( blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='Address', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('country', models.CharField(max_length=100, verbose_name='Страна')), ('city', models.CharField(max_length=100, verbose_name='Город')), ('street', models.CharField(max_length=100, verbose_name='Улица')), ('bilding', models.CharField(max_length=100, verbose_name='Здание')), ('flat', models.CharField(max_length=100, verbose_name='Квартира или офис')), ('type_org', models.CharField(choices=[('O', 'Офис'), ('F', 'Фабрика'), ('S', 'Склад'), ('PH', 'Жилой дом'), ('FH', 'Многоквартирный дом'), ('EP', 'Рабочее место'), ('LP', 'Жилое мест')], max_length=10, verbose_name='Тип организации')), ], options={ 'verbose_name': 'Адрес', 'verbose_name_plural': 'Адрес', 'ordering': ['-country'], }, ), migrations.CreateModel( name='DeliveryTransport', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('model_name', models.CharField(max_length=50, verbose_name='Модель')), ('type_of_transport', models.CharField(choices=[('S', 'Самолет'), ('V', 'Вертолет'), ('P', 'Поезд'), ('A', 'Автобус'), ('MA', 'Микроавтобус'), ('K', 'Корабль')], max_length=3, verbose_name='Тип транспорта')), ('year_constructed', models.CharField(max_length=12, verbose_name='Год создания')), ('order_coast', models.CharField(max_length=50, verbose_name='Стоимость перевозки')), ('ready', models.BooleanField(db_index=True, verbose_name='Готовность')), ('time_delivery', models.CharField(max_length=50, verbose_name='Время Доставки')), ('done_order', models.CharField(max_length=50, verbose_name='Рейсов выполненно')), ], options={ 'verbose_name': 'Доставляющий транспорт', 'verbose_name_plural': 'Доставляющий транспорт', 'ordering': ['-type_of_transport'], }, ), migrations.CreateModel( name='Employee', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('first_name', models.CharField(max_length=100, verbose_name='Имя')), ('second_name', models.CharField(max_length=100, unique=True, verbose_name='Фамилия')), ('photo', models.ImageField(blank=True, upload_to='', verbose_name='Фото')), ('mobile', models.CharField(max_length=100, verbose_name='Телефон')), ('mail', models.EmailField(max_length=254, unique=True, verbose_name='Почта')), ('info', models.TextField(verbose_name='Информация')), ('he', models.BooleanField(verbose_name='Высшее образование')), ('salary', models.CharField(max_length=30, verbose_name='Зарплата')), ('create_date', models.DateTimeField(db_index=True, verbose_name='Дата создания')), ('experience', models.CharField(max_length=100, verbose_name='Опыт')), ('address', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='Адрес_работы', to='backend.Address')), ], options={ 'verbose_name': 'Работник', 'verbose_name_plural': 'Работник', 'ordering': ['second_name'], }, bases=(backend.models.Ret, models.Model), ), migrations.CreateModel( name='Factories', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('holding', models.CharField(max_length=50, verbose_name='Холдинг')), ], options={ 'verbose_name': 'Фабрики', 'verbose_name_plural': 'Фабрики', 'ordering': ['-holding'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='Firm', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100, verbose_name='Название')), ('mobile', models.CharField(max_length=10, verbose_name='Телефон')), ('director', models.CharField(max_length=100, verbose_name='Директор')), ('mail', models.EmailField(max_length=254, verbose_name='Почта')), ('connect_date_firm', models.DateTimeField( db_index=True, verbose_name='Дата начало сотрудничества')), ('create_date_firm', models.DateTimeField(db_index=True, verbose_name='Дата создания')), ('firm_is_supplier', models.BooleanField(verbose_name='Фирма это доставщик')), ('info', models.TextField(blank=True, null=True, verbose_name='Описание')), ], options={ 'verbose_name': 'Фирма', 'verbose_name_plural': 'Фирма', 'ordering': ['name'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='Founder', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('first_name', models.CharField(max_length=100, verbose_name='Имя')), ('second_name', models.CharField(max_length=100, verbose_name='Фамилия')), ('age', models.IntegerField(verbose_name='Возраст')), ('namber', models.CharField(max_length=10, verbose_name='Телефон')), ('mail', models.CharField(max_length=100, verbose_name='Почта')), ('info', models.TextField(verbose_name='Информация')), ], options={ 'verbose_name': 'Основатель', 'verbose_name_plural': 'Основатель', 'ordering': ['second_name'], }, ), migrations.CreateModel( name='Founders', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('founders', models.CharField(max_length=50, verbose_name='Компания')), ('founder', models.ManyToManyField(related_name='Основатель', to='backend.Founder')), ], options={ 'verbose_name': 'Основатели', 'verbose_name_plural': 'Основатели', 'ordering': ['-founders'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='FoundersCompanyOrganization', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('companyname', models.CharField(max_length=50, verbose_name='Имя компании')), ('factories', models.ManyToManyField(blank=True, related_name='Фабрики_компании', to='backend.Factories', verbose_name='Фабрики')), ('founders', models.ManyToManyField(related_name='Основатели', to='backend.Founders', verbose_name='Основатели')), ], options={ 'verbose_name': 'Таблица компаний', 'verbose_name_plural': 'Таблица компаний', 'ordering': ['-companyname'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='Item', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100, verbose_name='Название')), ('create_date', models.DateTimeField(db_index=True, verbose_name='Дата создания')), ('firm', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='backend.Firm', verbose_name='Фирма')), ], options={ 'verbose_name': 'Вещь', 'verbose_name_plural': 'Вещь', 'ordering': ['name'], }, ), migrations.CreateModel( name='Items', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name_group', models.CharField(max_length=50, verbose_name='Название группы')), ('count', models.IntegerField(verbose_name='Количество')), ('item', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='backend.Item', verbose_name='Предмет')), ], options={ 'verbose_name': 'Вещи', 'verbose_name_plural': 'Вещи', 'ordering': ['name_group'], }, ), migrations.CreateModel( name='ItemsSupplier', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name_group', models.CharField(max_length=50, verbose_name='Название группы')), ('items', models.ManyToManyField( related_name='Вещи_доступные_поставщику', to='backend.Items', verbose_name='Вещи, доступные поставщику')), ], options={ 'verbose_name': 'Вещи, которые доступны от поставщика', 'verbose_name_plural': 'Вещи, которые доступны от поставщика', 'ordering': ['name_group'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='Mesh', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('mesh', models.CharField(max_length=100, verbose_name='Материал')), ('info_mesh', models.TextField(verbose_name='Информация о материале')), ('additional_mesh', models.CharField(max_length=100, verbose_name='Название доп. материала')), ('info_additional_mesh', models.TextField(verbose_name='Информация о доп. материале')), ], options={ 'verbose_name': 'Материал', 'verbose_name_plural': 'Материал', 'ordering': ['mesh'], }, ), migrations.CreateModel( name='Office', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название')), ('mobile', models.CharField(max_length=20, verbose_name='Телефон')), ('mail', models.CharField(max_length=50, verbose_name='Почта')), ('info', models.TextField(verbose_name='Информация о офисе')), ('this_company_office', models.BooleanField( db_index=True, verbose_name='Принадлежит этой компании')), ('state_or_private', models.BooleanField(db_index=True, verbose_name='Госсударственная?')), ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='backend.Address', verbose_name='Адрес')), ], options={ 'verbose_name': 'Офис', 'verbose_name_plural': 'Офис', 'ordering': ['-name'], }, ), migrations.CreateModel( name='Offices', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('holding', models.CharField(max_length=50, verbose_name='Холдинг')), ('office', models.ManyToManyField(related_name='Офисы', to='backend.Office', verbose_name='Офисы')), ], options={ 'verbose_name': 'Офисы', 'verbose_name_plural': 'Офисы', 'ordering': ['-holding'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='Price', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('price', models.CharField(max_length=100, verbose_name='Цена')), ('sale_price', models.CharField(max_length=100, verbose_name='Цена со скидкой')), ], options={ 'verbose_name': 'Цена', 'verbose_name_plural': 'Цена', 'ordering': ['price'], }, ), migrations.CreateModel( name='RoleNow', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100, verbose_name='Название')), ('countpeople', models.IntegerField( verbose_name='Количество людей в подчинении')), ('needHE', models.BooleanField( verbose_name='Необходимость высшего образования')), ], options={ 'verbose_name': 'Должность', 'verbose_name_plural': 'Должность', 'ordering': ['name'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='Storage', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название')), ('mobile', models.CharField(max_length=20, verbose_name='Телефон')), ('mail', models.CharField(max_length=50, verbose_name='Почта')), ('info', models.TextField(verbose_name='Информация о складе')), ('full_content', models.CharField(max_length=50, verbose_name='Полная вместимость')), ('content', models.IntegerField(verbose_name='Заполненность в %')), ('this_company_storage', models.BooleanField( db_index=True, verbose_name='Принадлежит этой компании')), ('state_or_private', models.BooleanField(db_index=True, verbose_name='Госсударственная?')), ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='backend.Address', verbose_name='Адрес')), ], options={ 'verbose_name': 'Склад', 'verbose_name_plural': 'Склад', 'ordering': ['-name'], }, ), migrations.CreateModel( name='Storages', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('holding', models.CharField(max_length=50, verbose_name='Холдинг')), ('storage', models.ManyToManyField(related_name='Склады', to='backend.Storage', verbose_name='Склады')), ], options={ 'verbose_name': 'Склады', 'verbose_name_plural': 'Склады', 'ordering': ['-holding'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='TotalRole', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100, verbose_name='Название')), ('role_now', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Должность', to='backend.RoleNow', verbose_name='Занимаемая должность')), ], options={ 'verbose_name': 'Должность', 'verbose_name_plural': 'Должность', 'ordering': [], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='SupplierInfo', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('count_storages', models.IntegerField(verbose_name='Количество складов')), ('average_time_delivery', models.TextField(verbose_name='Среднее время доставки')), ('text', models.TextField(verbose_name='Доп. информация')), ('delivery_transport', models.ManyToManyField( related_name='Доставляющий_транспорт', to='backend.DeliveryTransport', verbose_name='Доставляющий транспорт')), ('factories', models.ManyToManyField(related_name='Фабрики_поставщика', to='backend.Factories', verbose_name='Фабрики поставщика')), ('offices', models.ManyToManyField(related_name='Офисы_поставщика', to='backend.Offices', verbose_name='Офисы поставщика')), ('storages', models.ManyToManyField(related_name='Склады_поставщика', to='backend.Storages', verbose_name='Склады поставщика')), ], options={ 'verbose_name': 'Информация о поставщике', 'verbose_name_plural': 'Информация о поставщике', 'ordering': ['count_storages'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='Supplier', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название')), ('mobile', models.CharField(max_length=50, verbose_name='Телефон')), ('director', models.TextField(verbose_name='Директор')), ('mail', models.EmailField(max_length=254, verbose_name='Почта')), ('create_date', models.DateTimeField(db_index=True, verbose_name='Дата создания')), ('connect_date', models.DateTimeField( db_index=True, verbose_name='Дата начала сотрудничества')), ('founderscompanyorganization', models.ManyToManyField( related_name='Компании_организаторы', to='backend.FoundersCompanyOrganization', verbose_name='Компании-организаторы')), ('items_supplier', models.ManyToManyField(related_name='Постовляемые_вещи', to='backend.ItemsSupplier', verbose_name='Поставляемые вещи')), ('supplier_info', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Информация_о_поставщике', to='backend.SupplierInfo', verbose_name='Информация о поставщике')), ], options={ 'verbose_name': 'Поставщик', 'verbose_name_plural': 'Поставщик', 'ordering': ['name'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='Ready', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('order_status', models.CharField(choices=[('R', 'Ready'), ('W', 'Wait'), ('R-P', 'Ready-part')], max_length=4, verbose_name='Статус')), ('total_price', models.CharField(max_length=100, verbose_name='Полная стоимость')), ('address', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Адрес_доставки_товаров', related_query_name='Адрес_доставки_товаров', to='backend.Address', verbose_name='Адрес доставки товаров')), ('employee', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Заказавший_работник', related_query_name='Работник', to='backend.Employee', verbose_name='Заказавший работник')), ('items', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Вещи_на_доставку', related_query_name='Вещи_на_доставку', to='backend.Items', verbose_name='Вещи на доставку')), ], options={ 'verbose_name': 'Статус заказа', 'verbose_name_plural': 'Статус заказа', 'ordering': ['order_status'], }, ), migrations.CreateModel( name='Param', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('height', models.CharField(max_length=20, verbose_name='Высота')), ('width', models.CharField(max_length=20, verbose_name='Ширина')), ('thickness', models.CharField(max_length=20, verbose_name='Толщина')), ('weight', models.CharField(max_length=20, verbose_name='Вес')), ('diagonal', models.CharField(max_length=20, verbose_name='Диагональ')), ('mesh', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='backend.Mesh', verbose_name='Материал')), ], options={ 'verbose_name': 'Параметры', 'verbose_name_plural': 'Параметры', 'ordering': ['-weight'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='OrderTable', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название заказа')), ('wornot', models.BooleanField(verbose_name='Доставлен')), ('create_date', models.DateTimeField(db_index=True, verbose_name='Дата создания')), ('get_date', models.DateTimeField(db_index=True, verbose_name='Дата получения')), ('address', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Адрес', to='backend.Address')), ('items', models.ManyToManyField(related_name='Вещи', to='backend.Items')), ], options={ 'verbose_name': 'Таблица заказа', 'verbose_name_plural': 'Таблица заказа', 'ordering': ['address'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='Orderes', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('total_price', models.CharField(max_length=50, verbose_name='Полная стоимость')), ('send', models.BooleanField(verbose_name='Отправлено')), ('received', models.CharField(choices=[('Y', 'Да'), ('N', 'Нет'), ('N\\A', 'Не определено')], max_length=3, verbose_name='Получено?')), ('pos_one_get', models.CharField(choices=[('Y', 'Да'), ('N', 'Нет'), ('N\\A', 'Не определено')], max_length=3, verbose_name='Возможность одной доставки')), ('date_send', models.DateTimeField(db_index=True, verbose_name='Дата отправки')), ('date_get', models.DateTimeField(db_index=True, verbose_name='Дата получения')), ('orderes', models.ManyToManyField(related_name='Заказы', related_query_name='Заказы', to='backend.Ready', verbose_name='Заказы')), ('storage', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Склад_получатель', related_query_name='Склад_получатель', to='backend.Storage', verbose_name='Склад-получатель')), ('supplier', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Поставщик_товара', related_query_name='Поставщик_товара', to='backend.Supplier', verbose_name='Поставщик')), ], options={ 'verbose_name': 'Заказы', 'verbose_name_plural': 'Заказы', 'ordering': ['total_price'], }, bases=(models.Model, backend.models.Ret), ), migrations.CreateModel( name='ItemsInStorage', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('items', models.ManyToManyField( related_name='Предметы', to='backend.Items', verbose_name='Группы вещей на складе')), ('storage', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='backend.Storage', verbose_name='Склад')), ], options={ 'verbose_name': 'Вещи на складе', 'verbose_name_plural': 'Вещи на складе', 'ordering': ['storage'], }, bases=(models.Model, backend.models.Ret), ), migrations.AddField( model_name='item', name='param', field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.PROTECT, to='backend.Param', verbose_name='Параметры'), ), migrations.AddField( model_name='item', name='price', field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.PROTECT, to='backend.Price', verbose_name='Цена'), ), migrations.AddField( model_name='founderscompanyorganization', name='offices', field=models.ManyToManyField(blank=True, related_name='Офисы_компании', to='backend.Offices', verbose_name='Офисы'), ), migrations.AddField( model_name='founderscompanyorganization', name='storages', field=models.ManyToManyField(blank=True, related_name='Склады_компании', to='backend.Storages', verbose_name='Склады'), ), migrations.AddField( model_name='firm', name='founderscompanyorganization', field=models.ManyToManyField( related_name='Организаторы', to='backend.FoundersCompanyOrganization', verbose_name='Основатели'), ), migrations.CreateModel( name='Factory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название')), ('mobile', models.CharField(max_length=20, verbose_name='Телефон')), ('mail', models.CharField(max_length=50, verbose_name='Почта')), ('info', models.TextField(verbose_name='Информация о фабрике')), ('count_empl', models.IntegerField(verbose_name='Колличество сотрудников')), ('this_company_factory', models.BooleanField( db_index=True, verbose_name='Принадлежит этой компании')), ('state_or_private', models.BooleanField(db_index=True, verbose_name='Госсударственная?')), ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='backend.Address', verbose_name='Адрес')), ], options={ 'verbose_name': 'Фабрикa', 'verbose_name_plural': 'Фабрикa', 'ordering': ['-name'], }, ), migrations.AddField( model_name='factories', name='factory', field=models.ManyToManyField(related_name='Фабрики', to='backend.Factory', verbose_name='Фабрики'), ), migrations.AddField( model_name='employee', name='orderes', field=models.ManyToManyField(blank=True, related_name='Заказы_работника', to='backend.OrderTable'), ), migrations.AddField( model_name='employee', name='trole', field=models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Права', to='backend.TotalRole'), ), migrations.AddField( model_name='employee', name='user', field=models.ForeignKey( on_delete=django.db.models.deletion.PROTECT, related_name='Логин', to=settings.AUTH_USER_MODEL), ), migrations.CreateModel( name='DeliveryInAWay', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('items', models.ManyToManyField(related_name='Вещи_в_пути', to='backend.Items', verbose_name='Вещи в пути')), ('transport', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Транспорт_доставки', to='backend.DeliveryTransport', verbose_name='Транспорт доставки')), ], options={ 'verbose_name': 'Транспорт с грузом', 'verbose_name_plural': 'Транспорт с грузом', 'ordering': ['transport'], }, bases=(models.Model, backend.models.Ret), ), ]
class Migration(migrations.Migration): dependencies = [ ('backend', '0001_initial'), ] operations = [ migrations.CreateModel( name='Follow', fields=[ ('id', models.CharField(default=backend.models.generate_uuid, editable=False, max_length=100, primary_key=True, serialize=False, unique=True)), ('friends', models.BooleanField(default=False)), ('followee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='followee', to='backend.author')), ('follower', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='follower', to='backend.author')), ], ), migrations.RemoveField( model_name='comment', name='post_author_id', ), migrations.RemoveField( model_name='post', name='count', ), migrations.AddField( model_name='comment', name='image_conetnt', field=models.ImageField(null=True, upload_to=''), ), migrations.AddField( model_name='comment', name='post_author', field=models.ForeignKey( default=None, on_delete=django.db.models.deletion.CASCADE, related_name='post_author', to='backend.author'), preserve_default=False, ), migrations.AddField( model_name='post', name='image_content', field=models.ImageField(null=True, upload_to=''), ), migrations.AlterField( model_name='comment', name='author', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='author', to='backend.author'), ), migrations.CreateModel( name='Inbox', fields=[ ('id', models.CharField(default=backend.models.generate_uuid, editable=False, max_length=100, primary_key=True, serialize=False, unique=True)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.author')), ('follow', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='follow', to='backend.follow')), ('like', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='like', to='backend.like')), ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='post', to='backend.post')), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Author', fields=[ ('id', models.CharField(default=backend.models.generate_uuid, editable=False, max_length=100, primary_key=True, serialize=False, unique=True)), ('token', models.CharField(default='1234', max_length=100)), ('displayName', models.CharField(max_length=100, unique=True)), ('github', models.URLField()), ('host', models.URLField()), ('url', models.URLField()), ('user', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Comment', fields=[ ('id', models.CharField(default=backend.models.generate_uuid, editable=False, max_length=100, primary_key=True, serialize=False, unique=True)), ('comment', models.CharField(max_length=500, null=True)), ('published', models.DateTimeField(auto_now_add=True)), ('contentType', models.CharField(max_length=50)), ('host', models.CharField(max_length=50)), ('post_author_id', models.CharField(max_length=100)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.author')), ], ), migrations.CreateModel( name='Post', fields=[ ('id', models.CharField(default=backend.models.generate_uuid, max_length=100, primary_key=True, serialize=False, unique=True)), ('title', models.CharField(max_length=100)), ('source', models.URLField()), ('origin', models.URLField()), ('description', models.CharField(max_length=100)), ('content_type', models.CharField(max_length=50)), ('content', models.CharField(max_length=500, null=True)), ('categories', models.JSONField()), ('count', models.PositiveIntegerField()), ('published', models.DateTimeField(auto_now_add=True)), ('visibility', models.CharField(max_length=20)), ('unlisted', models.BooleanField(default=False)), ('host', models.CharField(max_length=50)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.author')), ], ), migrations.CreateModel( name='Like', fields=[ ('id', models.CharField(default=backend.models.generate_uuid, editable=False, max_length=100, primary_key=True, serialize=False, unique=True)), ('summary', models.CharField(default='Someone Likes your post', max_length=100)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.author')), ('comment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.comment')), ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.post')), ], ), migrations.AddField( model_name='comment', name='post', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='backend.post'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название')), ], options={ 'verbose_name': 'Категория', 'verbose_name_plural': 'Категории', }, ), migrations.CreateModel( name='Contact', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('city', models.CharField(max_length=50, verbose_name='Город')), ('street', models.CharField(max_length=100, verbose_name='Улица')), ('house', models.CharField(blank=True, max_length=15, verbose_name='Дом')), ('structure', models.CharField(blank=True, max_length=15, verbose_name='Корпус')), ('building', models.CharField(blank=True, max_length=15, verbose_name='Строение')), ('apartment', models.CharField(blank=True, max_length=15, verbose_name='Квартира')), ('phone', models.CharField(max_length=20, verbose_name='Телефон')), ], options={ 'verbose_name': 'Контакты пользователя', 'verbose_name_plural': 'Список контактов пользователя', }, ), migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('datetime', models.DateTimeField(auto_now_add=True)), ('status', models.CharField(choices=[('basket', 'Статус корзины'), ('new', 'Новый'), ('confirmed', 'Подтвержден'), ('assembled', 'Собран'), ('sent', 'Отправлен'), ('delivered', 'Доставлен'), ('canceled', 'Отменен')], max_length=15, verbose_name='Статус')), ], options={ 'verbose_name': 'Заказ', 'verbose_name_plural': 'Заказы', }, ), migrations.CreateModel( name='Parameter', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название')), ], options={ 'verbose_name': 'Параметр', 'verbose_name_plural': 'Параметры', }, ), migrations.CreateModel( name='Product', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('category', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='products', to='backend.category', verbose_name='Категория')), ], options={ 'verbose_name': 'Продукт', 'verbose_name_plural': 'Продукты', }, ), migrations.CreateModel( name='ProductInfo', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название')), ('quantity', models.PositiveIntegerField(verbose_name='Количество')), ('price', models.PositiveIntegerField(verbose_name='Цена')), ('price_rrc', models.PositiveIntegerField( verbose_name='Рекомендуемая цена')), ('product', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_infos', to='backend.product', verbose_name='Продукт')), ], options={ 'verbose_name': 'Информация о продукте', 'verbose_name_plural': 'Информация о продуктах', }, ), migrations.CreateModel( name='Shop', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='Название')), ('url', models.URLField(blank=True, null=True, verbose_name='Ссылка')), ('filename', models.CharField(max_length=100)), ], options={ 'verbose_name': 'Магазин', 'verbose_name_plural': 'Магазины', 'ordering': ('-name', ), }, ), migrations.CreateModel( name='ProductParameter', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('value', models.BooleanField(default=False)), ('parameter', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_parameters', to='backend.parameter', verbose_name='Параметр')), ('product_info', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_parameters', to='backend.productinfo', verbose_name='Продукт')), ], options={ 'verbose_name': 'Параметр продукта', 'verbose_name_plural': 'Информация о параметрах продуктов', }, ), migrations.AddField( model_name='productinfo', name='shop', field=models.ForeignKey( blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_infos', to='backend.shop', verbose_name=''), ), migrations.CreateModel( name='OrderItem', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('quantity', models.PositiveIntegerField(verbose_name='Количество')), ('order', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='ordered_items', to='backend.order', verbose_name='Заказ')), ('product', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='ordered_items', to='backend.product', verbose_name='Продукт')), ('shop', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='ordered_items', to='backend.shop', verbose_name='Магазин')), ], options={ 'verbose_name': 'Продукт в заказе', 'verbose_name_plural': 'Список продуктов заказа', }, ), migrations.AddField( model_name='category', name='shop', field=models.ManyToManyField(blank=True, related_name='categories', to='backend.Shop', verbose_name='Магазины'), ), 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')), ('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')), ('is_staff', models.BooleanField( default=False, help_text= 'Designates whether the user can log into this admin site.', verbose_name='staff status')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('email', models.EmailField(max_length=254, unique=True, verbose_name='Имэил')), ('company', models.CharField(blank=True, max_length=100, verbose_name='Компания')), ('position', models.CharField(blank=True, max_length=40, verbose_name='Должность')), ('username', models.CharField( default='Default_username', error_messages={'unique': 'Username aleready exists'}, help_text= 'Username required. Username must be 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[ django.contrib.auth.validators. UnicodeUsernameValidator() ], verbose_name='имя пользователя')), ('is_active', models.BooleanField( default=False, help_text= 'Отметьте, если пользователь должен считаться активным. Уберите эту отметку вместо удаления учётной записи.', verbose_name='активный')), ('type', models.CharField(choices=[('shop', 'Магазин'), ('buyer', 'Покупатель')], default='buyer', max_length=5, 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': 'Пользователи', 'ordering': ('email', ), }, managers=[ ('objects', backend.models.UserManager()), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name='Item', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('name', models.CharField(max_length=64)), ('description', models.CharField(blank=True, max_length=256, null=True)), ('price', models.DecimalField(decimal_places=2, max_digits=6)), ('available', models.BooleanField(default=True)), ('image', models.ImageField( blank=True, null=True, upload_to=backend.models.get_upload_name_item)), ], ), migrations.CreateModel( name='ItemOrder', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('quantity', models.IntegerField()), ('completed', models.BooleanField(default=False)), ('notes', models.CharField(blank=True, max_length=256, null=True)), ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Item')), ], ), migrations.CreateModel( name='Table', fields=[ ('table_number', models.IntegerField(primary_key=True, serialize=False)), ], ), migrations.CreateModel( name='Tag', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('name', models.CharField(max_length=32)), ('icon', models.ImageField( blank=True, null=True, upload_to=backend.models.get_upload_name_tag)), ], ), migrations.CreateModel( name='Session', fields=[ ('sessId', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('start_time', models.DateTimeField(default=django.utils.timezone.now)), ('end_time', models.DateTimeField(blank=True, null=True)), ('table', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Table')), ], ), migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('submitted', models.DateTimeField(default=django.utils.timezone.now)), ('items', models.ManyToManyField(through='backend.ItemOrder', to='backend.Item')), ('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Session')), ], ), migrations.CreateModel( name='Menu', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('name', models.CharField(max_length=64)), ('description', models.CharField(blank=True, max_length=256, null=True)), ('available', models.BooleanField(default=True)), ('url_name', models.SlugField(editable=False, max_length=64)), ('image', models.ImageField( blank=True, null=True, upload_to=backend.models.get_upload_name_menu)), ('start_time', models.TimeField(blank=True, null=True)), ('end_time', models.TimeField(blank=True, null=True)), ('start_day', models.IntegerField(blank=True, choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')], null=True)), ('end_day', models.IntegerField(blank=True, choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')], null=True)), ('items', models.ManyToManyField(blank=True, to='backend.Item')), ('super_menu', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Menu')), ], ), migrations.AddField( model_name='itemorder', name='order', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to='backend.Order'), ), migrations.AddField( model_name='item', name='tags', field=models.ManyToManyField(blank=True, to='backend.Tag'), ), ]