class Migration(migrations.Migration): initial = True dependencies = [ ] 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')), ('username', models.TextField(unique=True)), ('email', models.TextField(null=True)), ('create_time', models.DateTimeField(auto_now_add=True, null=True)), ('admin_type', models.TextField(default='Regular User')), ('problem_permission', models.TextField(default='None')), ('reset_password_token', models.TextField(null=True)), ('reset_password_token_expire_time', models.DateTimeField(null=True)), ('auth_token', models.TextField(null=True)), ('two_factor_auth', models.BooleanField(default=False)), ('tfa_token', models.TextField(null=True)), ('session_keys', django.contrib.postgres.fields.jsonb.JSONField(default=list)), ('open_api', models.BooleanField(default=False)), ('open_api_appkey', models.TextField(null=True)), ('is_disabled', models.BooleanField(default=False)), ], options={ 'db_table': 'user', }, managers=[ ('objects', account.models.UserManager()), ], ), migrations.CreateModel( name='UserProfile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('acm_problems_status', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('oi_problems_status', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('real_name', models.TextField(null=True)), ('avatar', models.TextField(default='/public/avatar/default.png')), ('blog', models.URLField(null=True)), ('mood', models.TextField(null=True)), ('github', models.TextField(null=True)), ('school', models.TextField(null=True)), ('major', models.TextField(null=True)), ('language', models.TextField(null=True)), ('accepted_number', models.IntegerField(default=0)), ('total_score', models.BigIntegerField(default=0)), ('submission_number', models.IntegerField(default=0)), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], options={ 'db_table': 'user_profile', }, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('account', '0001_initial'), ('post', '0001_initial'), ] operations = [ migrations.CreateModel( name='Photo', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id_photo', models.IntegerField(null=True, unique=True)), ('photo', models.ImageField(blank=True, default='defult-photo.png', null=True, upload_to=account.models.user_directory_path)), ('like_put', models.BooleanField(default=False, null=True)), ('account', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='images', to='account.Account')), ('post', models.ManyToManyField(blank=True, related_name='images', to='post.Post')), ], options={ 'ordering': ['-id'], }, ), ]
class Migration(migrations.Migration): dependencies = [ ('account', '0003_auto_20200211_2206'), ] operations = [ migrations.AddField( model_name='customuser', name='address', field=models.CharField(blank=True, max_length=64, verbose_name='Address'), ), migrations.AddField( model_name='customuser', name='avatar', field=models.ImageField(default='../static/images/avatar/women.jpg', upload_to='users/', verbose_name='Photo'), ), migrations.AddField( model_name='customuser', name='birth_to_day', field=models.DateField(blank=True, null=True, verbose_name='User BirthDay'), ), migrations.AddField( model_name='customuser', name='phone', field=models.CharField(default=1, max_length=12, unique=True, validators=[account.models.validate_phone], verbose_name='Phone Number'), preserve_default=False, ), migrations.AddField( model_name='customuser', name='position', field=models.IntegerField(choices=[(1, 'administrator'), (2, 'master'), (3, 'manager')], default=2, verbose_name='Position in company'), ), ]
class ShoppingCartItems(models.Model): product = models.ForeignKey('Product', null=True) user = models.ForeignKey('account.FomoUser', null=True) quantity = models.IntegerField(default=0, null=True) extended_amount = models.DecimalField(max_digits=6, decimal_places=2, null=True)
class SaleItems(models.Model): product = models.ForeignKey('Product', null=True) sale = models.ForeignKey('Sales', null=True) quantity_purchased = models.IntegerField(null=True, blank=False) sale_price = models.DecimalField(max_digits=6, decimal_places=2) tax = models.DecimalField(max_digits=6, decimal_places=2) shipping_cost = models.DecimalField(max_digits=6, decimal_places=2) @staticmethod def calc_subtotal(): cartItems = ShoppingCartItems.objects.all() subtotal = 0 for s in cartItems: subtotal += s.extended_amount return subtotal @staticmethod def calc_tax(): tax = round(SaleItems.calc_subtotal() * Decimal(0.0725), 2) return tax @staticmethod def calc_total(): total = (SaleItems.calc_subtotal() + SaleItems.calc_tax() + 10) return total @staticmethod def clear_cart(user): product = ShoppingCartItems.objects.filter(user=user) for p in product: p.delete()
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('quiz', '0001_initial'), ] operations = [ migrations.CreateModel( name='UserChoice', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('choice_text', models.CharField(max_length=300)), ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='quiz.Question')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='UserProfile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('mark', models.IntegerField(default=0)), ('test_date', models.DateTimeField(auto_now_add=True)), ('current_question', models.IntegerField( default=account.models.get_first_question)), ('user', models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alter_user_username_max_length'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), ('username', models.CharField(max_length=64, unique=True, verbose_name='\u8d26\u6237')), ('nickname', models.CharField(blank=True, max_length=64, null=True, verbose_name='\u6635\u79f0')), ('name', models.CharField(blank=True, max_length=64, null=True, verbose_name='\u59d3\u540d')), ('gender', models.CharField(choices=[(b'1', '\u7537'), (b'2', '\u5973')], default=b'0', max_length=1, verbose_name='\u6027\u522b')), ('birth', models.DateField(blank=True, null=True, verbose_name='\u751f\u65e5')), ('avatar', models.ImageField(blank=True, null=True, upload_to=account.models.scramble_avatar_filename, verbose_name='\u5934\u50cf')), ('brief', models.CharField(blank=True, max_length=256, null=True, verbose_name='\u7b80\u4ecb')), ('email', models.EmailField(blank=True, max_length=254)), ('type', models.CharField(choices=[(b'1', '\u5b66\u751f'), (b'2', '\u8001\u5e08')], default=b'0', max_length=1, verbose_name='\u7528\u6237\u7c7b\u578b')), ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='\u521b\u5efa\u65f6\u95f4')), ('update_time', models.DateTimeField(auto_now=True, verbose_name='\u4fee\u6539\u65f6\u95f4')), ('del_flag', models.IntegerField(choices=[(1, '\u662f'), (0, '\u5426')], default=0, verbose_name='\u662f\u5426\u5220\u9664')), ('is_staff', models.BooleanField(default=True, verbose_name='\u662f\u5426\u662f\u5458\u5de5')), ('is_active', models.BooleanField(default=True, verbose_name='\u662f\u5426\u6fc0\u6d3b')), ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), ], options={ 'db_table': 'auth_user', 'verbose_name': '\u7528\u6237\u8868', 'verbose_name_plural': '\u7528\u6237\u8868', }, ), migrations.CreateModel( name='EmailVerifyRecord', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.CharField(max_length=20, verbose_name='\u9a8c\u8bc1\u7801')), ('email', models.EmailField(max_length=254, verbose_name='\u90ae\u7bb1')), ('type', models.CharField(choices=[(1, '\u6ce8\u518c'), (2, '\u627e\u56de\u5bc6\u7801')], max_length=1, verbose_name='\u9a8c\u8bc1\u7801\u7c7b\u578b')), ('send_time', models.DateTimeField(auto_now=True, verbose_name='\u53d1\u9001\u65f6\u95f4')), ], options={ 'db_table': 't_email_verify', 'verbose_name': '\u90ae\u7bb1\u9a8c\u8bc1\u7801', 'verbose_name_plural': '\u90ae\u7bb1\u9a8c\u8bc1\u7801', }, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('profile_name', models.CharField(max_length=200)), ('profile_email', models.CharField(max_length=200)), ('profile_amount', models.IntegerField()), ('date', models.DateTimeField(blank=True, default=datetime.datetime.now)), ], ), migrations.CreateModel( name='Profile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('username', models.CharField(max_length=200)), ('email', models.EmailField(max_length=254)), ('password', models.CharField(max_length=100)), ('note', models.TextField(blank=True, help_text='Want to say something to customer', max_length=500)), ('is_allowed', models.BooleanField(default=False)), ('amount', models.IntegerField(default=5, help_text='Enter amount in dollars')), ('drive_url', models.CharField(blank=True, max_length=200)), ('stripe_id', models.CharField(blank=True, max_length=120, null=True)), ('image1', models.ImageField(blank=True, null=True, upload_to=account.models.upload_location)), ('image2', models.ImageField(blank=True, null=True, upload_to=account.models.upload_location)), ('image3', models.ImageField(blank=True, null=True, upload_to=account.models.upload_location)), ('image4', models.ImageField(blank=True, null=True, upload_to=account.models.upload_location)), ('user', models.OneToOneField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): dependencies = [ ('account', '0001_initial'), ] operations = [ migrations.AlterModelManagers( name='user', managers=[ ('objects', account.models.UserManager()), ], ), migrations.AddField( model_name='user', name='etnia', field=models.IntegerField(choices=[(0, 'Negra'), (1, 'Indígena'), (2, 'Asiática'), (3, 'Caucasiana'), (4, 'Mestiça'), (5, 'Outra')], null=True), ), migrations.AddField( model_name='user', name='gender', field=models.IntegerField(choices=[(0, 'Masculino'), (1, 'Feminino'), (2, 'Prefiro não declarar')], null=True), ), migrations.AddField( model_name='user', name='ident_genero', field=models.IntegerField(choices=[(0, 'Cisgênero'), (1, 'Transgênero'), (2, 'Neutro ou Não-binario'), (3, 'Prefiro não declarar')], null=True), ), migrations.AddField( model_name='user', name='orient_sex', field=models.IntegerField(choices=[(0, 'Heterossexual'), (1, 'Homossexual'), (2, 'Bissexual'), (3, 'Pansexual'), (4, 'Assexual'), (5, 'Fluido'), (6, 'Prefiro não declarar')], null=True), ), migrations.AlterField( model_name='user', name='last_name', field=models.CharField(blank=True, max_length=150, verbose_name='last name'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Account', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('about', models.TextField(blank=True)), ('updated_on', models.DateTimeField(auto_now=True)), ('user_pic', models.ImageField(blank=True, default='user_pic_male.png', upload_to=account.models.user_directory_path)), ('phone', models.CharField(blank=True, max_length=15)), ('status', models.IntegerField(choices=[(0, 'Blocked'), (1, 'Active'), (2, 'Limited')], default=1)), ('gender', models.IntegerField(choices=[(1, 'Male'), (2, 'Female')], default=1, verbose_name='Gender')), ('role', models.CharField(choices=[('admin', 'Admin'), ('user', 'User')], default='user', max_length=10, verbose_name='Role')), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='SIG', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(choices=[('Crypt', 'CRYPT'), ('Charge', 'CHARGE'), ('Credit', 'CREDIT'), ('Chronicle', 'CHRONICLE'), ('Clutch', 'CLUTCH'), ('Concrete', 'CONCRETE'), ('Create', 'CREATE'), ('Catalyst', 'CATALYST')], max_length=9)), ('description', models.TextField(default='', max_length=10000)), ], ), migrations.CreateModel( name='User', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('phone_number', models.CharField(blank=True, max_length=17, validators=[django.core.validators.RegexValidator(message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex='^\\+?1?\\d{9,15}$')])), ('avatar', models.ImageField(blank=True, upload_to=account.models.user_avatar_path)), ('batch_of', models.IntegerField(default=2020)), ('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')), ('sigs', models.ManyToManyField(to='account.SIG')), ('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()), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='Degree', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=20)), ], ), migrations.CreateModel( name='Profile', fields=[ ('user', annoying.fields.AutoOneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)), ('email_confirmed', models.BooleanField(default=False)), ('full_name', models.CharField(max_length=100, null=True)), ('program', models.CharField(max_length=100, null=True)), ('grad_year', models.IntegerField(null=True)), ('resume', models.FileField(blank=True, null=True, upload_to=account.models.user_directory_path)), ('viewable', models.BooleanField(default=False)), ('degrees', models.ManyToManyField(to='account.Degree')), ], options={ 'ordering': ('user',), }, ), migrations.CreateModel( name='School', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ('abbrev', models.CharField(max_length=20)), ], ), migrations.AddField( model_name='profile', name='schools', field=models.ManyToManyField(to='account.School'), ), ]
class Migration(migrations.Migration): dependencies = [ ('account', '0006_workers_salary'), ] operations = [ migrations.AddField( model_name='workers', name='publish_date', field=models.DateTimeField(default=django.utils.timezone.now), ), migrations.AlterField( model_name='workers', name='salary', field=models.IntegerField(default=account.models.generate_salary), ), ]
class Migration(migrations.Migration): dependencies = [ ('account', '0037_remove_request_seen'), ] operations = [ migrations.AlterField( model_name='userprofile', name='id_number', field=models.IntegerField(blank=True, null=True), ), migrations.AlterField( model_name='userprofile', name='teaching_certificate', field=models.FileField(blank=True, null=True, upload_to=account.models.certificate_file_path), ), ]
class Migration(migrations.Migration): dependencies = [ ('account', '0027_auto_20200821_1739'), ] operations = [ migrations.AlterField( model_name='profile', name='civil_status', field=models.CharField(choices=[('M', 'Married'), ('S', 'Single'), ('D', 'Divorced'), ('W', 'Widowed')], max_length=100, null=True, verbose_name='Civil Status'), ), migrations.AlterField( model_name='profile', name='gender', field=models.CharField(choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Other')], default='M', max_length=1), ), migrations.AlterField( model_name='profile', name='pylp_year', field=models.IntegerField( choices=[ (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020) ], null=True, validators=[ django.core.validators.MinValueValidator(1984), account.models.max_value_current_year ], verbose_name='PYLP Year'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('user_id', models.CharField(max_length=15, unique=True)), ('name', models.CharField(max_length=150)), ('age', models.IntegerField()), ('rating', models.FloatField()), ('profile_image', models.ImageField(blank=True, null=True, upload_to=account.models.User.upload_dir_profile_image)), ('resume', models.FileField(blank=True, null=True, upload_to=account.models.User.upload_dir_resume)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ] 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')), ('phone', models.IntegerField(unique=True, validators=[account.models.validate_num])), ], options={ 'abstract': False, }, ), ]
class Migration(migrations.Migration): dependencies = [ ('account', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='user', name='id', ), migrations.AlterField( model_name='user', name='phone', field=models.IntegerField(primary_key=True, serialize=False, unique=True, validators=[account.models.validate_num ]), ), ]
class Migration(migrations.Migration): initial = True dependencies = [] 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')), ('email', models.EmailField(max_length=255, unique=True, verbose_name='email address')), ('active', models.BooleanField(default=True)), ('staff', models.BooleanField(default=False)), ('admin', models.BooleanField(default=False)), ('birthday', models.DateField(null=True, verbose_name='birthday')), ('number', models.IntegerField(default=account.models.get_random_number, verbose_name='number')), ], options={ 'abstract': False, }, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Profile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('token', models.CharField(editable=False, max_length=64)), ('profile_image', models.ImageField(blank=True, default='profiles/default.jpg', upload_to=account.models._user_profile_path)), ('phone', models.CharField(blank=True, max_length=10, null=True)), ('status', models.IntegerField(choices=[(1, 'pending'), (2, 'approved'), (3, 'rejected'), (4, 'inactive'), (5, 'banned')], default=2)), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Notification', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('text', models.TextField(verbose_name='Notifictation text')), ('seen', models.BooleanField(verbose_name='Seen')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='StudentField', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=255)), ], ), migrations.CreateModel( name='UserProfile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('student_id', models.IntegerField()), ('avatar', models.ImageField(default='/avatars/default.jpg', upload_to=account.models.handle_avatar_upload_path)), ('field', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.StudentField')), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alter_user_username_max_length'), ] operations = [ migrations.CreateModel( name='LoginUser', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField( default=False, help_text= 'Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), ('username', models.CharField( error_messages={ 'unique': 'A user with that username already exists.' }, help_text= 'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[ django.contrib.auth.validators. UnicodeUsernameValidator() ], verbose_name='username')), ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')), ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), ('is_staff', models.BooleanField( default=False, help_text= 'Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField( default=True, help_text= 'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('nickname', models.CharField(default='用户423848', max_length=20, verbose_name='nickname')), ('headimg', models.ImageField(default='moren.jpeg', upload_to=account.models.get_upload_to, verbose_name='headimg')), ('signature', models.CharField(default='这个人很懒,啥也没有留下!', max_length=32, verbose_name='signature')), ('first_time', models.DateTimeField(auto_now_add=True, verbose_name='first_time')), ('last_time', models.DateTimeField(auto_now=True, verbose_name='last_time')), ('sex', models.IntegerField(choices=[('1', '男'), ('2', '女')], default=1)), ('real_name', models.CharField(default='WHUer', max_length=16, verbose_name='real_name')), ('school_id', models.IntegerField(verbose_name='school_id')), ('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_plural': 'user', 'ordering': ['-date_joined'], 'db_table': 'Loginuser', }, managers=[ ('objects', django.contrib.auth.models.UserManager()), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Reason', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('name', models.CharField(default='', max_length=200)), ], ), migrations.CreateModel( name='ref_barangay', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('brgyCode', models.CharField(max_length=50, unique=True)), ('name', models.TextField()), ], options={ 'verbose_name': 'Barangay', 'verbose_name_plural': 'Barangays', }, ), migrations.CreateModel( name='ref_region', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('psgcCode', models.CharField(max_length=50, unique=True)), ('name', models.TextField()), ('regCode', models.CharField(max_length=50, unique=True)), ], options={ 'verbose_name': 'Region', 'verbose_name_plural': 'Regions', }, ), migrations.CreateModel( name='Relationship', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('name', models.CharField(default='', max_length=50)), ('is_owner', models.BooleanField(default=False)), ], ), migrations.CreateModel( name='ref_purok', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('name', models.CharField(default='', max_length=50)), ('president', models.CharField(blank=True, default='', max_length=50, null=True)), ('barangay', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ref_barangay_id', to='account.ref_barangay')), ], ), migrations.CreateModel( name='ref_province', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('psgcCode', models.CharField(max_length=50, unique=True)), ('name', models.TextField()), ('provCode', models.CharField(max_length=50, unique=True)), ('f_region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.ref_region', to_field='regCode')), ('region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ref_region_id', to='account.ref_region')), ], options={ 'verbose_name': 'Province', 'verbose_name_plural': 'Provinces', }, ), migrations.CreateModel( name='ref_citymun', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('psgcCode', models.CharField(max_length=50, unique=True)), ('name', models.TextField()), ('citymunCode', models.CharField(max_length=50, unique=True)), ('f_province', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.ref_province', to_field='provCode')), ('province', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ref_province_id', to='account.ref_province')), ], options={ 'verbose_name': 'City/Municipality', 'verbose_name_plural': 'Cities and Municipalities', }, ), migrations.AddField( model_name='ref_barangay', name='citymun', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ref_citymun_id', to='account.ref_citymun'), ), migrations.AddField( model_name='ref_barangay', name='f_citymun', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.ref_citymun', to_field='citymunCode'), ), migrations.CreateModel( name='household_profile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('phone_number', models.CharField(max_length=10, unique=True)), ('date_of_birth', models.DateField()), ('gender', models.BooleanField(choices=[(0, 'Male'), (1, 'Female')], default=0)), ('street', models.CharField(max_length=150)), ('verification_file', models.FileField(help_text='Select File', null=True, upload_to=account.models.filename_generator)), ('profile', models.FileField(help_text='Select File', null=True, upload_to=account.models.filename_generator)), ('account_is_verified', models.IntegerField(choices=[(0, 'Pending'), (1, 'Verified')], default=0)), ('date_created', models.DateField(default=datetime.date.today)), ('purok', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.ref_purok')), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='family_members', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('first_name', models.CharField(max_length=150)), ('last_name', models.CharField(max_length=150)), ('date_of_birth', models.DateField()), ('verification_file', models.FileField(help_text='Select documents', upload_to=account.models.filename_generator)), ('profile', models.FileField(help_text='Select File', null=True, upload_to=account.models.filename_generator)), ('gender', models.BooleanField(choices=[(0, 'Male'), (1, 'Female')], default=0)), ('is_confirm', models.IntegerField(choices=[(0, 'Pending'), (1, 'Approved'), (2, 'decline')], default=0)), ('date_added', models.DateField(default=datetime.date.today)), ('household_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.household_profile')), ('relationship', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.Relationship')), ], ), migrations.CreateModel( name='building_owner', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('establishment_name', models.TextField()), ('street', models.CharField(max_length=150)), ('verification_file', models.FileField(help_text='Select File', upload_to=account.models.filename_generator)), ('profile', models.FileField(help_text='Select File', null=True, upload_to=account.models.filename_generator)), ('account_is_verified', models.IntegerField(choices=[(0, 'Pending'), (1, 'Verified')], default=0)), ('date_created', models.DateField(default=datetime.date.today)), ('is_confirm', models.IntegerField(choices=[(0, 'Pending'), (1, 'Approved'), (2, 'decline')], default=0)), ('purok', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.ref_purok')), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='ThirdLoginInfo', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('third_type', models.CharField(choices=[('wechat', '微信'), ('microblog', '微博'), ('qq', 'QQ'), ('others', '其他')], default='others', max_length=50)), ('openid', models.CharField(max_length=200, unique=True)), ('nickname', models.CharField(max_length=50)), ('logout', models.BooleanField(default=True)), ('image_height', models.IntegerField(blank=True, null=True)), ('image_width', models.IntegerField(blank=True, null=True)), ('third_user_pic', models.ImageField( blank=True, height_field='image_height', null=True, upload_to=account.models.third_user_pic_upload, width_field='image_width')), ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='third_set', to=settings.AUTH_USER_MODEL)), ], options={ 'verbose_name': 'ThirdLoginInfo', 'verbose_name_plural': 'ThirdLoginInfos', }, ), migrations.CreateModel( name='Profile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('image_height', models.IntegerField(blank=True, null=True)), ('image_width', models.IntegerField(blank=True, null=True)), ('user_pic', models.ImageField(blank=True, height_field='image_height', null=True, upload_to=account.models.user_pic_upload, width_field='image_width')), ('mobile_phone', models.CharField( blank=True, max_length=50, null=True, validators=[account.validators.validate_mobile_phone])), ('cteate_time', models.DateTimeField(auto_now_add=True)), ('update_time', models.DateTimeField(auto_now=True)), ('gender', models.CharField(choices=[('male ', '男'), ('female', '女'), ('secret', '保密')], default='secret', max_length=50)), ('age', models.IntegerField(blank=True, null=True)), ('emotion', models.CharField(choices=[ ('single ', '单身'), ('in_love', '热恋'), ('married', '已婚'), ('secret', '保密') ], default='secret', max_length=50)), ('career', models.CharField(choices=[('teacher ', '教师'), ('it', 'IT'), ('public_servant', '公务员'), ('secret', '保密')], default='secret', max_length=50)), ('birthday', models.DateField(blank=True, null=True)), ('hometown', models.CharField(blank=True, max_length=50, null=True)), ('logout', models.BooleanField(default=False)), ('owner', models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)), ], options={ 'verbose_name': 'Profile', 'verbose_name_plural': 'Profiles', }, ), ]
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')), ('is_active', models.BooleanField( default=True, help_text= 'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('username', models.CharField(blank=True, max_length=150, verbose_name='username')), ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')), ('lastname', models.CharField(max_length=10)), ('firstname', models.CharField(max_length=10)), ('gender', models.IntegerField(choices=[(1, 'Man'), (2, 'Woman'), (3, 'Other')])), ('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', account.models.UserManager()), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alter_user_username_max_length'), ] operations = [ migrations.CreateModel( name='RxdUser', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField( default=False, help_text= 'Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), ('username', models.CharField( error_messages={ 'unique': 'A user with that username already exists.' }, help_text= 'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[ django.contrib.auth.validators. UnicodeUsernameValidator() ], verbose_name='username')), ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')), ('is_staff', models.BooleanField( default=False, help_text= 'Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField( default=True, help_text= 'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')), ('user_type', models.PositiveSmallIntegerField(choices=[ (4, 'Government'), (5, 'Community & Educations'), (2, 'Company'), (3, 'Media'), (1, 'Personal User') ], verbose_name='user type')), ('phone', models.IntegerField(verbose_name='mobile phone')), ('groups', models.ManyToManyField( blank=True, help_text= 'The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), ('user_permissions', models.ManyToManyField( blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), ], options={ 'verbose_name': 'user', 'verbose_name_plural': 'users', }, managers=[ ('objects', account.models.RxdUserManager()), ], ), migrations.CreateModel( name='Profile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('gender', models.PositiveSmallIntegerField(choices=[(1, 'Male'), (2, 'Female')], verbose_name='gender')), ('avatar', easy_thumbnails.fields.ThumbnailerImageField( upload_to='', verbose_name='avatar')), ('birth_date', models.DateTimeField(verbose_name='birth date')), ('background', models.ImageField(blank=True, null=True, upload_to=utils.upload, verbose_name='background')), ('college', models.CharField(blank=True, max_length=23, null=True, verbose_name='college')), ('city', models.CharField(blank=True, max_length=23, null=True, verbose_name='city')), ('job', models.CharField(blank=True, max_length=23, null=True, verbose_name='job')), ('descriptione', models.CharField(blank=True, max_length=666, null=True, verbose_name='descriptione')), ('user', models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='name')), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='Offices', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(help_text='Set office name', max_length=32, verbose_name='Office Name')), ('short_code', models.CharField(help_text='Set Short code for current office', max_length=5, verbose_name='Short Code')), ('address', models.TextField(blank=True, verbose_name='Place Affress Ofice')), ('twoGisCode', models.TextField(blank=True, help_text='Set 2gis code for curent place', verbose_name='2gis site code')), ('phone', models.CharField(blank=True, max_length=12, unique=True, validators=[account.models.validate_phone], verbose_name='Phone Number')), ('work_time_start', models.TimeField(default=django.utils.timezone.now, verbose_name='Work Time Start')), ('work_time_end', models.TimeField(default=django.utils.timezone.now, verbose_name='Work Time End')), ('return_time_start', models.TimeField(blank=True, default=django.utils.timezone.now, verbose_name='Start Time Return')), ('view_on_front', models.BooleanField(default=False, verbose_name='view on frontend')), ], options={ 'verbose_name': 'Ofice', 'verbose_name_plural': 'Ofices', }, ), migrations.CreateModel( name='CustomUser', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')), ('middle_name', models.CharField(blank=True, max_length=32, verbose_name='Middle name')), ('phone', models.CharField(max_length=12, unique=True, validators=[account.models.validate_phone], verbose_name='Phone Number')), ('address', models.CharField(blank=True, max_length=64, verbose_name='Address')), ('position', models.IntegerField(choices=[(1, 'administrator'), (2, 'master'), (3, 'manager')], default=2, verbose_name='Position in company')), ('birth_to_day', models.DateField(blank=True, null=True, verbose_name='User BirthDay')), ('avatar', models.ImageField(default='../static/images/avatar/women.jpg', upload_to='users/', verbose_name='Photo')), ('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', 'ordering': ('last_name',), }, ), migrations.CreateModel( name='WorkStation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('host', models.CharField(max_length=64, verbose_name='host name')), ('ip_address', models.CharField(max_length=16, verbose_name='ip_address')), ('office', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.Offices')), ], options={ 'verbose_name': 'Work Station', 'verbose_name_plural': 'Work Stations', 'unique_together': {('host', 'ip_address')}, }, ), ]
class ProductComment(models.Model): product_id = models.IntegerField(default=0, blank=True, null=True) comment = models.TextField(blank=True, null=True) user_id = models.IntegerField(default=0, blank=True, null=True) date = models.DateTimeField(auto_now=True, null=True)
class RentalProduct(Product): #id serial_number = models.TextField(blank=True, null=True) quantity = models.IntegerField(default=1)
class BulkProduct(Product): #id quantity = models.IntegerField(default=0) reorder_trigger = models.IntegerField(default=0) reorder_qty = models.IntegerField(default=0)