Exemple #1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('companies', '0001_initial'),
        ('products', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name', models.CharField(max_length=255)),
                ('last_name', models.CharField(max_length=255)),
                ('date_of_birth', models.DateField()),
                ('note', models.TextField(blank=True, max_length=500)),
                ('avatar',
                 models.ImageField(
                     default='default.png',
                     upload_to=customers.models.user_directory_path)),
                ('company',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='customers',
                                   to='companies.company')),
                ('preferred_products',
                 models.ManyToManyField(to='products.Product')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('schema_name',
                 models.CharField(db_index=True,
                                  max_length=63,
                                  unique=True,
                                  validators=[
                                      django_tenants.postgresql_backend.base.
                                      _check_schema_name
                                  ])),
                ('name', models.CharField(max_length=100)),
                ('paid_until',
                 models.DateField(
                     blank=True,
                     default=customers.models.one_month_from_today,
                     null=True)),
                ('on_trial', models.BooleanField(default=True)),
                ('created_on', models.DateField(auto_now_add=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Domain',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('domain',
                 models.CharField(db_index=True, max_length=253, unique=True)),
                ('is_primary', models.BooleanField(db_index=True,
                                                   default=True)),
                ('tenant',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='domains',
                                   to='customers.Client')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('userAuth', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('fullname', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator('^[ a-zA-Z]*$', 'Only alphabets are allowed.')])),
                ('photo', models.ImageField(blank=True, upload_to=customers.models.upload_path_handler)),
                ('phone', phonenumber_field.modelfields.PhoneNumberField(max_length=128, unique=True)),
                ('zipcode', models.CharField(default='', max_length=6, validators=[django.core.validators.RegexValidator('^[0-9]{6}$', 'Only 6-digit zipcodes supported.')])),
                ('street', models.CharField(default='', max_length=100)),
                ('area', models.CharField(default='', max_length=30, validators=[django.core.validators.RegexValidator('^[ a-zA-Z]*$', 'Only alphabets are allowed.')])),
            ],
        ),
    ]
Exemple #4
0
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')),
                ('full_name', models.CharField(max_length=100)),
                ('username', models.CharField(max_length=100)),
                ('password', models.CharField(max_length=100)),
                ('phone_number',
                 models.CharField(
                     max_length=12,
                     unique=True,
                     validators=[customers.models.validate_phone_number])),
                ('longitude', models.FloatField(default=0.0)),
                ('latitude', models.FloatField(default=0.0)),
                ('address_text', models.CharField(max_length=250)),
                ('rate', models.FloatField(default=0.0)),
                ('craft',
                 models.IntegerField(choices=[(1, 'Carpentry'),
                                              (2, 'Electrical'),
                                              (3, 'Plumbing')],
                                     default=0)),
                ('available_today', models.BooleanField(default=True)),
                ('available_now', models.BooleanField(default=True)),
                ('user_type', models.BooleanField(default=True)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('customers', '0007_auto_20190923_0219'),
    ]

    operations = [
        migrations.AddField(
            model_name='subscription',
            name='plan',
            field=models.CharField(
                choices=[(customers.models.SubscPlanEnum('ONE'), 'ONE'),
                         (customers.models.SubscPlanEnum('THREE'), 'THREE'),
                         (customers.models.SubscPlanEnum('SIX'), 'SIX')],
                default=customers.models.SubscPlanEnum('ONE'),
                max_length=20),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('customers', '0009_auto_20191015_0938'),
    ]

    operations = [
        migrations.AlterField(
            model_name='customer',
            name='profile_pic',
            field=models.ImageField(
                blank=True,
                null=True,
                storage=django.core.files.storage.FileSystemStorage(
                    location=
                    '/media/alcatraz627/Delta/Code/Projects/PlayHopp/backend/media'
                ),
                upload_to=customers.models.nameCustomerDP),
        ),
        migrations.AlterField(
            model_name='hopplist',
            name='customer',
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.PROTECT,
                to=settings.AUTH_USER_MODEL),
            preserve_default=False,
        ),
        migrations.CreateModel(
            name='ForgotPass',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('verif_code', models.CharField(max_length=20)),
                ('customer',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemple #7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('logo',
                 models.ImageField(
                     default='default.jpg',
                     upload_to=customers.models.customer_image_file_path)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='NewEntry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Entry_No',
                 models.IntegerField(default=customers.models.NewEntry.number,
                                     unique=True)),
                ('bill_date', models.DateField()),
                ('Name_of_Visitor', models.CharField(max_length=50)),
                ('No_of_visitors', models.CharField(max_length=50)),
                ('Age', models.CharField(max_length=50)),
                ('Citizenship',
                 django_countries.fields.CountryField(max_length=2)),
                ('Address', models.TextField()),
                ('Arrived_from', models.CharField(max_length=50)),
                ('Departure_to', models.CharField(max_length=50)),
                ('Identity_Proof',
                 models.CharField(choices=[('aadhar card', 'aadhar card'),
                                           ('pan card', 'pan card'),
                                           ('driving license',
                                            'driving license'),
                                           ('passbook', 'passbook'),
                                           ('insurance', 'insurance')],
                                  max_length=50)),
                ('Identity_Proof_No', models.CharField(max_length=50)),
                ('Purpose_of_Visit', models.CharField(max_length=50)),
                ('Occupation', models.CharField(max_length=50)),
                ('check_in',
                 models.DateTimeField(default=datetime.datetime.now)),
                ('Room_No',
                 models.CharField(choices=[('11', '11'), ('12', '12'),
                                           ('13', '13'), ('14', '14'),
                                           ('15', '15'), ('21', '21'),
                                           ('22', '22'), ('23', '23'),
                                           ('24', '24'), ('25', '25'),
                                           ('26', '26'), ('27', '27'),
                                           ('28', '28'), ('29', '29')],
                                  default='',
                                  max_length=264)),
                ('Total_Amount', models.CharField(max_length=50)),
                ('Advance', models.CharField(max_length=50)),
                ('Remark', models.CharField(blank=True, max_length=50)),
                ('Date_of_bill', models.DateTimeField(auto_now=True)),
                ('Payment_Status',
                 models.CharField(choices=[('PAID', 'PAID'),
                                           ('UNPAID', 'UNPAID')],
                                  default='',
                                  max_length=264)),
                ('images', models.FileField(blank=True, upload_to='')),
                ('check_out',
                 models.DateTimeField(default=datetime.datetime.now)),
            ],
            options={
                'verbose_name': 'Customers',
                'verbose_name_plural': 'Fill Form For New Entry',
            },
        ),
        migrations.CreateModel(
            name='passengers',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=344)),
                ('Address', models.CharField(default='', max_length=50)),
                ('Gender', models.CharField(default='', max_length=50)),
                ('Age', models.CharField(default='', max_length=50)),
                ('Identity_Proof', models.CharField(default='',
                                                    max_length=50)),
                ('Identity_Proof_No',
                 models.CharField(default='', max_length=50)),
                ('mobile', models.CharField(default='', max_length=264)),
            ],
            options={
                'verbose_name_plural': 'Customer List for Police Record',
            },
        ),
        migrations.AddField(
            model_name='newentry',
            name='Details_of_Other_Visitors',
            field=models.ManyToManyField(to='customers.passengers'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ("customers", "0011_add_intended_use_to_boat"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="boat",
            name="boat_is_inspected",
        ),
        migrations.RemoveField(
            model_name="boat",
            name="boat_is_insured",
        ),
        migrations.CreateModel(
            name="BoatCertificate",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "file",
                    models.FileField(
                        blank=True,
                        null=True,
                        storage=django.core.files.storage.FileSystemStorage(),
                        upload_to=customers.models.get_boat_media_folder,
                        verbose_name="certificate file",
                    ),
                ),
                (
                    "certificate_type",
                    models.CharField(
                        choices=[
                            ("inspection", "Inspection"),
                            ("insurance", "Insurance"),
                        ],
                        max_length=16,
                        verbose_name="certificate type",
                    ),
                ),
                (
                    "valid_until",
                    models.DateField(blank=True,
                                     null=True,
                                     verbose_name="valid until"),
                ),
                (
                    "checked_at",
                    models.DateField(default=django.utils.timezone.now,
                                     verbose_name="checked at"),
                ),
                (
                    "checked_by",
                    models.CharField(blank=True,
                                     max_length=100,
                                     null=True,
                                     verbose_name="checked by"),
                ),
                (
                    "boat",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="certificates",
                        to="customers.Boat",
                        verbose_name="boat",
                    ),
                ),
            ],
        ),
        migrations.AddConstraint(
            model_name="boatcertificate",
            constraint=models.UniqueConstraint(fields=("boat_id",
                                                       "certificate_type"),
                                               name="unique_boat_certificate"),
        ),
    ]
Exemple #10
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address', models.TextField(default=b'NA')),
                ('latitude', models.CharField(default=b'28.6', max_length=30)),
                ('longitude', models.CharField(default=b'77.2',
                                               max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Degree',
            fields=[
                ('name',
                 models.CharField(choices=[(b'1', b'MBBS'), (b'2', b'MS'),
                                           (b'3', b'MD'), (b'4', b'DM')],
                                  max_length=2,
                                  primary_key=True,
                                  serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Disease',
            fields=[
                ('name',
                 models.CharField(choices=[(b'1', b'Multiple Sclerosis'),
                                           (b'2', b'Cancer'), (b'3', b'TB'),
                                           (b'4', b'Mental illness'),
                                           (b'5', b'Type 1 Diabetes')],
                                  max_length=2,
                                  primary_key=True,
                                  serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('experience', models.TextField(default=b'none')),
            ],
        ),
        migrations.CreateModel(
            name='FCMDevice',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('registration_id', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='FitnessEnthusiast',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Interests',
            fields=[
                ('name',
                 models.CharField(choices=[(b'1', b'Body building'),
                                           (b'2', b'Dieting'), (b'3', b'Gym'),
                                           (b'4', b'Meditation'),
                                           (b'5', b'Nutrition'),
                                           (b'6', b'Physical exercise'),
                                           (b'7', b'Yoga'), (b'8', b'Running'),
                                           (b'9', b'Weight lifting'),
                                           (b'10', b'Physical fitness'),
                                           (b'11', b'Zumba'),
                                           (b'12', b'Swimming'),
                                           (b'13', b'Other')],
                                  max_length=2,
                                  primary_key=True,
                                  serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('diseases',
                 models.ManyToManyField(blank=True, to='customers.Disease')),
            ],
        ),
        migrations.CreateModel(
            name='Phone',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('phone', models.CharField(default=b'NA', max_length=13)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(default=b'Vesta user',
                                          max_length=60)),
                ('dp',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=customers.models.dp_upload)),
                ('thumbnail',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=customers.models.thumbnail_upload)),
                ('cover',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=customers.models.cover_upload)),
                ('age', models.CharField(default=b'0', max_length=3)),
                ('gender', models.CharField(default=b'male', max_length=20)),
                ('vip', models.BooleanField(default=False)),
                ('address',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='customers.Address')),
                ('phone',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='customers.Phone')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Setting',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('default_page',
                 models.CharField(choices=[(b'mySpace', b'mySpace'),
                                           (b'differential', b'differential'),
                                           (b'insights', b'insights')],
                                  default=b'mySpace',
                                  max_length=12)),
                ('profile',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='customers.Profile')),
            ],
        ),
        migrations.CreateModel(
            name='Speciality',
            fields=[
                ('name',
                 models.CharField(choices=[(b'1', b'Anesthesiologist'),
                                           (b'2', b'Cardiologist'),
                                           (b'3', b'Dermatologist'),
                                           (b'4', b'Endocrinologist'),
                                           (b'5', b'Gastroenterologist'),
                                           (b'6', b'Gynecologist'),
                                           (b'7', b'Neurologist'),
                                           (b'8', b'Obstetrician'),
                                           (b'9', b'Oncologist'),
                                           (b'10', b'Pathologist'),
                                           (b'11', b'Surgeon'),
                                           (b'12', b'Urologist')],
                                  max_length=2,
                                  primary_key=True,
                                  serialize=False)),
            ],
            options={
                'verbose_name_plural': 'Specialities',
            },
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('university', models.CharField(default=b'none',
                                                max_length=120)),
                ('profile',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='customers.Profile')),
                ('qualification',
                 models.ManyToManyField(blank=True, to='customers.Degree')),
            ],
        ),
        migrations.CreateModel(
            name='Subtag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.AddField(
            model_name='subtag',
            name='tag',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='customers.Tag'),
        ),
        migrations.AddField(
            model_name='patient',
            name='profile',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to='customers.Profile'),
        ),
        migrations.AddField(
            model_name='fitnessenthusiast',
            name='interests',
            field=models.ManyToManyField(blank=True, to='customers.Interests'),
        ),
        migrations.AddField(
            model_name='fitnessenthusiast',
            name='profile',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to='customers.Profile'),
        ),
        migrations.AddField(
            model_name='fcmdevice',
            name='profile',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='customers.Profile'),
        ),
        migrations.AddField(
            model_name='doctor',
            name='profile',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to='customers.Profile'),
        ),
        migrations.AddField(
            model_name='doctor',
            name='qualification',
            field=models.ManyToManyField(blank=True, to='customers.Degree'),
        ),
        migrations.AddField(
            model_name='doctor',
            name='speciality',
            field=models.ManyToManyField(blank=True,
                                         to='customers.Speciality'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('first_name',
                 models.CharField(max_length=50, verbose_name='Name')),
                ('last_name',
                 models.CharField(max_length=100, verbose_name='Surname')),
                ('photo',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=customers.models.get_customer_photo_upload_to,
                     verbose_name='Photo')),
                ('phone',
                 models.CharField(default='',
                                  max_length=15,
                                  verbose_name='Phone')),
                ('email',
                 models.EmailField(default='',
                                   max_length=150,
                                   verbose_name='Email')),
                ('country',
                 models.CharField(default='',
                                  max_length=50,
                                  verbose_name='Country')),
                ('postal_code',
                 models.CharField(default='',
                                  max_length=15,
                                  verbose_name='Postal Code')),
                ('region',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='Region')),
                ('locality',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='Locality')),
                ('address',
                 models.CharField(default='',
                                  max_length=200,
                                  verbose_name='Address')),
                ('created_by',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='creator',
                                   to=settings.AUTH_USER_MODEL)),
                ('updated_by',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='CustomerLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('fields_changed', jsonfield.fields.JSONField(null=True)),
                ('log_type',
                 models.CharField(choices=[('creation', 'Creation'),
                                           ('edition', 'Edition'),
                                           ('deletion', 'Deletion')],
                                  max_length=50)),
                ('customer',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='customers.Customer')),
                ('user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]