Esempio n. 1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='VideoSubmission',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('project_name', models.TextField()),
                ('status', models.CharField(default='in_queue',
                                            max_length=10)),
                ('video',
                 models.FileField(upload_to=core.models.get_video_path,
                                  validators=[core.models.validate_video])),
                ('subtitle',
                 models.FileField(upload_to=core.models.get_subtitle_path,
                                  validators=[core.models.validate_subtitle])),
                ('total_chunks', models.SmallIntegerField(default=0)),
                ('processed_video', models.FileField(upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='VideoChunk',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('chunk_no', models.SmallIntegerField()),
                ('video_chunk', models.FileField(upload_to='')),
                ('audio_chunk',
                 models.FileField(storage=core.storage.OverwriteStorage(),
                                  upload_to=core.models.get_audio_chunk_path,
                                  validators=[core.models.validate_audio])),
                ('start_time', models.TimeField()),
                ('end_time', models.TimeField()),
                ('subtitle', models.TextField()),
                ('VideoSubmission',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.VideoSubmission')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0002_event_organization'),
    ]

    operations = [
        migrations.AddField(
            model_name='event',
            name='end',
            field=models.TimeField(default=core.models.round_two_hours),
        ),
        migrations.AddField(
            model_name='event',
            name='start',
            field=models.TimeField(default=core.models.round_hours),
        ),
    ]
Esempio n. 3
0
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)),
                ('birthday', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Book name')),
                ('author_email',
                 models.EmailField(blank=True,
                                   max_length=75,
                                   verbose_name='Author email')),
                ('imported', models.BooleanField(default=False)),
                ('published',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Published')),
                ('published_time',
                 models.TimeField(blank=True,
                                  null=True,
                                  verbose_name='Time published')),
                ('price',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     max_digits=10,
                                     null=True)),
                ('author',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Author')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Census',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('state_code', models.IntegerField(blank=True, null=True)),
                ('state', models.CharField(blank=True,
                                           max_length=30,
                                           null=True)),
                ('dist_code', models.IntegerField(blank=True, null=True)),
                ('dist_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('sub_dist_name', models.IntegerField(blank=True, null=True)),
                ('sub_dist_code',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('vil_code', models.IntegerField(blank=True, null=True)),
                ('vil_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('cdb_code', models.IntegerField(blank=True, null=True)),
                ('cdb_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('gram_pan_code', models.IntegerField(blank=True, null=True)),
                ('gram_pan_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ref_year', models.IntegerField(blank=True, null=True)),
                ('sub_dist_hquarter_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('sub_dist_hquarter_distance',
                 models.IntegerField(blank=True, null=True)),
                ('dist_hquarter_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('dist_hquarter_dist',
                 models.IntegerField(blank=True, null=True)),
                ('nearest_stat_town_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('nearest_stat_town_dist',
                 models.IntegerField(blank=True, null=True)),
                ('within_state_ut_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('within_state_ut_dist',
                 models.IntegerField(blank=True, null=True)),
                ('outside_state_ut_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('outside_state_ut_dist',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('tot_geograph_area', models.IntegerField(blank=True,
                                                          null=True)),
                ('tot_households', models.IntegerField(blank=True, null=True)),
                ('tot_population', models.IntegerField(blank=True, null=True)),
                ('tot_male_population',
                 models.IntegerField(blank=True, null=True)),
                ('tot_female_population',
                 models.IntegerField(blank=True, null=True)),
                ('tot_sc_population', models.IntegerField(blank=True,
                                                          null=True)),
                ('tot_scm_population',
                 models.IntegerField(blank=True, null=True)),
                ('tot_scf_population',
                 models.IntegerField(blank=True, null=True)),
                ('tot_st_population', models.IntegerField(blank=True,
                                                          null=True)),
                ('tot_stm_population',
                 models.IntegerField(blank=True, null=True)),
                ('tot_stf_population',
                 models.IntegerField(blank=True, null=True)),
                ('gov_preprim_sch_status',
                 models.IntegerField(blank=True, null=True)),
                ('gov_preprim_sch_nos',
                 models.IntegerField(blank=True, null=True)),
                ('pvt_preprim_sch_status',
                 models.IntegerField(blank=True, null=True)),
                ('pvt_preprim_sch_nos',
                 models.IntegerField(blank=True, null=True)),
                ('nfaci_status_preprim',
                 models.IntegerField(blank=True, null=True)),
                ('nfaci_village_town_preprim',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_preprim',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_prim_sch_status',
                 models.IntegerField(blank=True, null=True)),
                ('gov_prim_sch_nos', models.IntegerField(blank=True,
                                                         null=True)),
                ('pvt_prim_sch_status',
                 models.IntegerField(blank=True, null=True)),
                ('pvt_prim_sch_nos', models.IntegerField(blank=True,
                                                         null=True)),
                ('nfaci_status_prim', models.IntegerField(blank=True,
                                                          null=True)),
                ('nfaci_village_town_prim',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_prim',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_mid_sch_status', models.NullBooleanField()),
                ('gov_mid_sch_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('pvt_mid_sch_status', models.NullBooleanField()),
                ('pvt_mid_sch_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('nfaci_status_mid', models.NullBooleanField()),
                ('nfaci_village_town_mid',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_mid',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_sec_sch_status', models.NullBooleanField()),
                ('gov_sec_sch_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('pvt_sec_sch_status', models.NullBooleanField()),
                ('pvt_sec_sch_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('nfaci_status_sec', models.NullBooleanField()),
                ('nfaci_village_town_sec',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_sec',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_sen_sec_sch_status', models.NullBooleanField()),
                ('gov_sen_sec_sch_nos',
                 models.IntegerField(blank=True, null=True)),
                ('pvt_sen_sec_sch_status', models.NullBooleanField()),
                ('pvt_sen_sec_sch_nos',
                 models.IntegerField(blank=True, null=True)),
                ('nfaci_status_sen_sec', models.NullBooleanField()),
                ('nfaci_village_town_sen_sec',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_sen_sec',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_deg_col_status', models.NullBooleanField()),
                ('gov_deg_col_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('pvt_deg_col_status', models.NullBooleanField()),
                ('pvt_deg_col_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('nfaci_status_deg_col', models.NullBooleanField()),
                ('nfaci_village_town_deg_col',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_deg_col',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_eng_col_status', models.NullBooleanField()),
                ('gov_eng_col_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('pvt_eng_col_status', models.NullBooleanField()),
                ('pvt_eng_col_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('nfaci_status_eng_col', models.NullBooleanField()),
                ('nfaci_village_town_eng_col',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_eng_col',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_med_col_status', models.NullBooleanField()),
                ('gov_med_col_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('pvt_med_col_status', models.NullBooleanField()),
                ('pvt_med_col_nos', models.IntegerField(blank=True,
                                                        null=True)),
                ('nfaci_status_med_col', models.NullBooleanField()),
                ('nfaci_village_town_med_col',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_med_col',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_mgmt_inst_status', models.NullBooleanField()),
                ('gov_mgmt_inst_nos', models.IntegerField(blank=True,
                                                          null=True)),
                ('pvt_mgmt_inst_status', models.NullBooleanField()),
                ('pvt_mgmt_inst_nos', models.IntegerField(blank=True,
                                                          null=True)),
                ('nfaci_status_mgmt_inst', models.NullBooleanField()),
                ('nfaci_village_town_mgmt_inst',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_mgmt_inst',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_polytech_status', models.NullBooleanField()),
                ('gov_polytech_nos', models.IntegerField(blank=True,
                                                         null=True)),
                ('pvt_polytech_status', models.NullBooleanField()),
                ('pvt_polytech_nos', models.IntegerField(blank=True,
                                                         null=True)),
                ('nfaci_status_polytech', models.NullBooleanField()),
                ('nfaci_village_town_polytech',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_polytech',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_voc_training_status', models.NullBooleanField()),
                ('gov_voc_training_nos',
                 models.IntegerField(blank=True, null=True)),
                ('pvt_voc_training_status',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('pvt_voc_training_nos',
                 models.IntegerField(blank=True, null=True)),
                ('nfaci_status_voc_training', models.NullBooleanField()),
                ('nfaci_village_town_voc_training',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_voc_training',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_nonformal_training_status', models.NullBooleanField()),
                ('gov_nonformal_training_nos',
                 models.IntegerField(blank=True, null=True)),
                ('pvt_nonformal_training_status', models.NullBooleanField()),
                ('pvt_nonformal_training_nos',
                 models.IntegerField(blank=True, null=True)),
                ('nfaci_status_nonformal_training', models.NullBooleanField()),
                ('nfaci_village_town_nonformal_training',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_nonformal_training',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_sch_for_dasabled_status', models.NullBooleanField()),
                ('gov_sch_for_dasabled_nos',
                 models.IntegerField(blank=True, null=True)),
                ('pvt_sch_for_dasabled_status', models.NullBooleanField()),
                ('pvt_sch_for_dasabled_nos',
                 models.IntegerField(blank=True, null=True)),
                ('nfaci_status_sch_for_dasabled', models.NullBooleanField()),
                ('nfaci_village_town_sch_for_dasabled',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_sch_for_dasabled',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gov_others_status', models.NullBooleanField()),
                ('gov_others_nos', models.IntegerField(blank=True, null=True)),
                ('pri_others_status', models.NullBooleanField()),
                ('pri_others_nos', models.IntegerField(blank=True, null=True)),
                ('nfaci_status_others', models.NullBooleanField()),
                ('nfaci_village_town_others',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('ina_distcode_others',
                 models.CharField(blank=True, max_length=2, null=True)),
            ],
            options={
                'db_table': 'census',
            },
        ),
        migrations.CreateModel(
            name='CensusRest',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('vil_code', models.IntegerField(blank=True, null=True)),
                ('com_health_centre_nos',
                 models.IntegerField(blank=True, null=True)),
                ('com_health_centre_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('com_health_centre_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('com_health_centre_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('com_health_centre_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_com_health_centre',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('prim_health_centre_nos',
                 models.IntegerField(blank=True, null=True)),
                ('prim_health_centre_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('prim_health_centre_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('prim_health_centre_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('prim_health_centre_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_prim_health_centre',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('prim_health_subcent_nos',
                 models.IntegerField(blank=True, null=True)),
                ('prim_health_subcent_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('prim_health_subcent_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('prim_health_subcent_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('prim_health_subcent_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_prim_health_subcent',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('mat_child_wel_centre_nos',
                 models.IntegerField(blank=True, null=True)),
                ('mat_child_wel_centre_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('mat_child_wel_centre_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('mat_child_wel_centre_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('mat_child_wel_centre_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_mat_child_wel_centre',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('tb_clinic_nos', models.IntegerField(blank=True, null=True)),
                ('tb_clinic_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('tb_clinic_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('tb_clinic_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('tb_clinic_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_tb_clinic',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('hosp_allopath_nos', models.IntegerField(blank=True,
                                                          null=True)),
                ('hosp_allopath_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('hosp_allopath_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('hosp_allopath_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('hosp_allopath_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_hosp_allopath',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('hosp_alt_medicine_nos',
                 models.IntegerField(blank=True, null=True)),
                ('hosp_alt_medicine_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('hosp_alt_medicine_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('hosp_alt_medicine_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('hosp_alt_medicine_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_hosp_alt_medicine',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('dispensary_nos', models.IntegerField(blank=True, null=True)),
                ('dispensary_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('dispensary_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('dispensary_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('dispensary_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_dispensary',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('vet_hospital_nos', models.IntegerField(blank=True,
                                                         null=True)),
                ('vet_hospital_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('vet_hospital_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('vet_hospital_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('vet_hospital_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_vet_hospital',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('mob_health_clinic_nos',
                 models.IntegerField(blank=True, null=True)),
                ('mob_health_clinic_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('mob_health_clinic_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('mob_health_clinic_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('mob_health_clinic_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_mob_health_clinic',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('fam_welfare_centre_nos',
                 models.IntegerField(blank=True, null=True)),
                ('fam_welfare_centre_doct_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('fam_welfare_centre_doct_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('fam_welfare_centre_staff_tot_nos',
                 models.IntegerField(blank=True, null=True)),
                ('fam_welfare_centre_staff_inpos_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ina_distcode_mob_fam_welfare_centre',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('ngvt_med_fac_out_pat_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ngvt_med_fac_in_out_pat_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ngvt_med_fac_charitable_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ngvt_med_fac_med_practitioner_mbbs_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ngvt_med_fac_med_practitioner_otherdeg_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ngvt_med_fac_med_practitioner_nodeg_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ngvt_med_fac_med_practitioner_faithhealer_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ngvt_med_fac_medicine_shop_nos',
                 models.IntegerField(blank=True, null=True)),
                ('ngvt_med_fac_others_nos',
                 models.IntegerField(blank=True, null=True)),
                ('tap_water_treated_status', models.NullBooleanField()),
                ('tap_water_treated_fn_round_year', models.NullBooleanField()),
                ('tap_water_treated_fn_summer_months',
                 models.NullBooleanField()),
                ('tap_water_untreated_status', models.NullBooleanField()),
                ('tap_water_untreated_fn_round_year',
                 models.NullBooleanField()),
                ('tap_water_untreated_fn_summer_months',
                 models.NullBooleanField()),
                ('cov_well_status', models.NullBooleanField()),
                ('cov_well_fn_round_year', models.NullBooleanField()),
                ('cov_well_fn_summer_months', models.NullBooleanField()),
                ('uncov_well_status', models.NullBooleanField()),
                ('uncov_well_fn_round_year', models.NullBooleanField()),
                ('uncov_well_fn_summer_months', models.NullBooleanField()),
                ('han_pump_status', models.NullBooleanField()),
                ('han_pump_fn_round_year', models.NullBooleanField()),
                ('han_pump_fn_summer_months', models.NullBooleanField()),
                ('tub_wells_borehole_status', models.NullBooleanField()),
                ('tub_wells_fn_round_year', models.NullBooleanField()),
                ('tub_wells_fn_summer_months', models.NullBooleanField()),
                ('spring_status', models.NullBooleanField()),
                ('spring_fn_round_year', models.NullBooleanField()),
                ('spring_fn_summer_months', models.NullBooleanField()),
                ('river_canal_status', models.NullBooleanField()),
                ('river_canal_fn_round_year', models.NullBooleanField()),
                ('river_canal_fn_summer_months', models.NullBooleanField()),
                ('tank_pond_lake_status', models.NullBooleanField()),
                ('tank_pond_lake_fn_round_year', models.NullBooleanField()),
                ('tank_pond_lake_fn_summer_months', models.NullBooleanField()),
                ('others_status', models.NullBooleanField()),
                ('others_fn_round_year', models.NullBooleanField()),
                ('others_fn_summer_months', models.NullBooleanField()),
                ('closed_drainage_status', models.NullBooleanField()),
                ('open_drainage_status', models.NullBooleanField()),
                ('no_drainage_status',
                 models.NullBooleanField(db_column='no _drainage_status')),
                ('op_pucca_drainage_cov_w_tiles_slabs_status',
                 models.NullBooleanField()),
                ('op_pucca_drainage_uncovered_status',
                 models.NullBooleanField()),
                ('op_kuccha_drainage_status', models.NullBooleanField()),
                ('drainage_discharge_status', models.NullBooleanField()),
                ('area_covered_tot_sanitation_campaign_status',
                 models.NullBooleanField()),
                ('com_toilet_complex_w_bath_gen_public',
                 models.NullBooleanField()),
                ('com_toilet_complex_no_bath_gen_public',
                 models.NullBooleanField()),
                ('rural_prod_cent_sanitary_hw_outlet_availability',
                 models.NullBooleanField()),
                ('rural_prod_mart_sanitary_hw_outlet_availability',
                 models.NullBooleanField()),
                ('com_waste_disposal_system', models.NullBooleanField()),
                ('com_biogas_recycle_of_waste', models.NullBooleanField()),
                ('no_system_garbage_onroads', models.NullBooleanField()),
                ('post_office_status', models.NullBooleanField()),
                ('ina_dist_post_office',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('sub_post_office_status', models.NullBooleanField()),
                ('ina_dist_sub_post_office',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('post_telegraph_office_status', models.NullBooleanField()),
                ('ina_dist_post_telegraph_office',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('vil_pin_code_status', models.NullBooleanField()),
                ('ina_dist_vil_pin_code',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('pin_code', models.IntegerField(blank=True, null=True)),
                ('tel_landlines_status', models.NullBooleanField()),
                ('ina_dist_tel_landlines',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('pco_status', models.NullBooleanField()),
                ('ina_dist_pco',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('mob_phone_coverage_status', models.NullBooleanField()),
                ('ina_dist_mob_phone_coverage',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('internet_cafe_status', models.NullBooleanField()),
                ('ina_dist_internet_cafe',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('pri_courier_facility_status', models.NullBooleanField()),
                ('ina_dist_pri_courier_facility',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('pub_bus_service_status', models.NullBooleanField()),
                ('ina_dist_pub_bus_service',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('pri_bus_service_status', models.NullBooleanField()),
                ('ina_dist_pri_bus_service',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('railway_station_status', models.NullBooleanField()),
                ('ina_dist_railway_station',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('auto_modified_autos_status', models.NullBooleanField()),
                ('ina_dist_auto_modified_autos',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('taxi_status', models.NullBooleanField()),
                ('ina_dist_taxi',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('van_status', models.NullBooleanField()),
                ('ina_dist_van',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('tractor_status', models.NullBooleanField()),
                ('ina_dist_tractor',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('cycle_pulled_rickshaws_manual_status',
                 models.NullBooleanField()),
                ('ina_dist_cycle_pulled_rickshaws_manual',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('cycle_pulled_rickshaws_machine_status',
                 models.NullBooleanField()),
                ('ina_dist_cycle_pulled_rickshaws_machine',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('carts_by_animals_status', models.NullBooleanField()),
                ('ina_dist_carts_by_animals',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('sea_river_ferry_service_status', models.NullBooleanField()),
                ('ina_dist_sea_river_ferry_service',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('nat_highway_status', models.NullBooleanField()),
                ('ina_dist_nat_highway',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('state_highway_status', models.NullBooleanField()),
                ('ina_dist_state_highway',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('major_district_road_status', models.NullBooleanField()),
                ('ina_dist_major_district_road',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('oth_district_road_status', models.NullBooleanField()),
                ('ina_dist_oth_district_road',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('black_topped_pucca_road_staus', models.NullBooleanField()),
                ('ina_dist_black_topped_pucca_road',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('gravel_kuchha_roads_status', models.NullBooleanField()),
                ('ina_dist_gravel_kuchha_roads',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('water_bounded_macadam_status', models.NullBooleanField()),
                ('ina_dist_wat_bounded_macadam',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('all_weather_road_status', models.NullBooleanField()),
                ('ina_dist_all_weather_road',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('navigable_waterways_river_canal_status',
                 models.NullBooleanField()),
                ('ina_dist_navigable_waterways_river_canal',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('footpath_status', models.NullBooleanField()),
                ('ina_dist_footpath',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('atm_status', models.NullBooleanField()),
                ('ina_dist_atm',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('commercial_bank_status', models.NullBooleanField()),
                ('ina_dist_commercial_bank',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('cooperative_bank_status', models.NullBooleanField()),
                ('ina_dist_cooperative_bank',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('agri_credit_societies_status', models.NullBooleanField()),
                ('ina_dist_agri_credit_societies',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('selfhelp_group_status', models.NullBooleanField()),
                ('ina_dist_selfhelp_group',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('public_distribution_system_status',
                 models.NullBooleanField()),
                ('ina_dist_public_distribution_system',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('mandis_regular_market_status', models.NullBooleanField()),
                ('ina_dist_mandis_regular_market',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('weekly_haat_status', models.NullBooleanField()),
                ('ina_dist_weekly_haat',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('agri_marketing_society_status', models.NullBooleanField()),
                ('ina_dist_agri_marketing_society',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('nutritional_centres_icds_status', models.NullBooleanField()),
                ('ina_dist_nutritional_centres_icds',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('nutritional_centres_anganwadi_status',
                 models.NullBooleanField()),
                ('ina_dist_nutritional_centres_anganwadi',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('nutritional_centres_others_status',
                 models.NullBooleanField()),
                ('ina_dist_nutritional_centres_others',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('asha_status', models.NullBooleanField()),
                ('ina_dist_asha',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('community_centre_with_tv', models.NullBooleanField()),
                ('ina_dist_community_centre_with_tv',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('sports_field_status', models.NullBooleanField()),
                ('ina_dist_sports_field',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('sports_club_status', models.NullBooleanField()),
                ('ina_dist_sports_club',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('cinema_video_hall_status', models.NullBooleanField()),
                ('ina_dist_cinema_video_hall',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('public_library_status', models.NullBooleanField()),
                ('ina_dist_public_library',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('pub_reading_room_status', models.NullBooleanField()),
                ('ina_dist_pub_reading_room',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('daily_newspaper_supply_status', models.NullBooleanField()),
                ('ina_dist_daily_newspaper_supply',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('assembly_polling_station_status', models.NullBooleanField()),
                ('ina_dist_assembly_polling_station',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('birth_death_registration_office', models.NullBooleanField()),
                ('ina_dist_birth_death_registration_office',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('power_supply_dom_use', models.NullBooleanField()),
                ('power_supply_dom_use_summer_hrspd',
                 models.IntegerField(blank=True, null=True)),
                ('power_supply_dom_use_winter_hrspd',
                 models.IntegerField(blank=True, null=True)),
                ('power_supply_agri_use', models.NullBooleanField()),
                ('power_supply_agri_use_summer_hrspd',
                 models.IntegerField(blank=True, null=True)),
                ('power_supply_agri_use_winter_hrspd',
                 models.IntegerField(blank=True, null=True)),
                ('power_supply_comm_use', models.NullBooleanField()),
                ('power_supply_comm_use_summer_hrspd',
                 models.IntegerField(blank=True, null=True)),
                ('power_supply_comm_use_winter_hrspd',
                 models.IntegerField(blank=True, null=True)),
                ('power_supply_for_all_users', models.NullBooleanField()),
                ('power_supply_for_all_users_summer_hrspd',
                 models.IntegerField(blank=True, null=True)),
                ('power_supply_for_all_users_winter_hrspd',
                 models.IntegerField(blank=True, null=True)),
                ('agri_commodities_first',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('manufacturers_commodities_first',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('handicrafts_commodities_first',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('agri_commodities_second',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('manufacturers_commodities_second',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('handicrafts_commodities_second',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('agri_commodities_third',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('manufacturers_commodities_third',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('handicrafts_commodities_third',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('forest_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('non_agri_use_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('barren_uncoltivable_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('permanent_pastures_other_grazing_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('land_misc_tree_crops_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('culturable_wasteland_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('fallows_land_otherthan_current_fallows_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('current_fallows_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('net_area_sown',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('tot_unirrigatedland_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('area_irrigated_by_source',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('canals_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('wells_tube_wells_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('tanks_lakes_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('waterfall_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('other_source_area',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('nearest_town_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('dist_nearest_town', models.IntegerField(blank=True,
                                                          null=True)),
            ],
            options={
                'db_table': 'census_rest',
            },
        ),
        migrations.CreateModel(
            name='Child',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Entry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Parent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_private', models.BooleanField(default=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='WithDefault',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(blank=True,
                                  default='foo_bar',
                                  max_length=75,
                                  verbose_name='Default')),
            ],
        ),
        migrations.CreateModel(
            name='WithDynamicDefault',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default=core.models.random_name,
                                  max_length=100,
                                  verbose_name='Dyn Default')),
            ],
        ),
        migrations.CreateModel(
            name='WithFloatField',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('f', models.FloatField(blank=True, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='child',
            name='parent',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='core.Parent'),
        ),
        migrations.AddField(
            model_name='book',
            name='categories',
            field=models.ManyToManyField(blank=True, to='core.Category'),
        ),
    ]
Esempio n. 4
0
class WorkShift(models.AbstractBaseModel):
    usual_day_start_morning = models.TimeField()
    usual_day_end_morning = models.TimeField()
    usual_day_start_afternoon = models.TimeField()
    usual_day_end_afternoon = models.TimeField()
Esempio n. 5
0
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0002_user_is_staff'),
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('insertupdate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.InsertUpdate')),
                ('address1', models.CharField(max_length=100)),
                ('location', models.CharField(max_length=200)),
                ('Address_Type',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='Address_Type',
                     to='core.AddressType')),
            ],
            bases=('core.insertupdate', models.Model),
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('insertupdate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.InsertUpdate')),
                ('Total', models.DecimalField(decimal_places=2, max_digits=8)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_order',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            bases=('core.insertupdate', models.Model),
        ),
        migrations.CreateModel(
            name='OrderShop',
            fields=[
                ('insertupdate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.InsertUpdate')),
                ('Items_Total',
                 models.DecimalField(decimal_places=2, max_digits=8)),
                ('DeliveryCharges', models.IntegerField()),
                ('Note', models.TextField(max_length=100)),
                ('Order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Order',
                                   to='core.Order')),
            ],
            bases=('core.insertupdate', models.Model),
        ),
        migrations.CreateModel(
            name='OrderStatus',
            fields=[
                ('setuptable_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.SetupTable')),
            ],
            options={
                'verbose_name_plural': 'Order Statuses',
            },
            bases=('core.setuptable', ),
        ),
        migrations.CreateModel(
            name='PaymentStatus',
            fields=[
                ('setuptable_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.SetupTable')),
            ],
            options={
                'verbose_name_plural': 'Payment Statuses',
            },
            bases=('core.setuptable', ),
        ),
        migrations.CreateModel(
            name='PaymentType',
            fields=[
                ('setuptable_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.SetupTable')),
            ],
            bases=('core.setuptable', ),
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('insertupdate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.InsertUpdate')),
                ('name', models.CharField(max_length=100)),
                ('description',
                 models.TextField(blank=True, max_length=500, null=True)),
                ('barcode', models.IntegerField(blank=True, null=True)),
                ('sku', models.CharField(blank=True, max_length=100,
                                         null=True)),
                ('image',
                 models.ImageField(
                     default='pics_default/default_product.png',
                     upload_to=core.models.product_image_file_path)),
                ('slug',
                 models.SlugField(blank=True,
                                  default='',
                                  max_length=255,
                                  null=True)),
            ],
            bases=('core.insertupdate', models.Model),
        ),
        migrations.CreateModel(
            name='ProductCategory',
            fields=[
                ('setuptable_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.SetupTable')),
            ],
            bases=('core.setuptable', ),
        ),
        migrations.CreateModel(
            name='ProductUnitType',
            fields=[
                ('setuptable_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.SetupTable')),
            ],
            bases=('core.setuptable', ),
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('insertupdate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.InsertUpdate')),
                ('OpeningTime', models.TimeField()),
                ('ClosingTime', models.TimeField()),
                ('MinimumOrder', models.IntegerField()),
                ('DeliveryCharges', models.IntegerField()),
                ('Address',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Shop_Address',
                                   to='core.Address')),
            ],
            bases=('core.insertupdate', models.Model),
        ),
        migrations.CreateModel(
            name='ShopCategory',
            fields=[
                ('setuptable_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.SetupTable')),
            ],
            bases=('core.setuptable', ),
        ),
        migrations.CreateModel(
            name='ShopStatus',
            fields=[
                ('setuptable_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.SetupTable')),
            ],
            options={
                'verbose_name_plural': 'Shop Statuses',
            },
            bases=('core.setuptable', ),
        ),
        migrations.RemoveField(
            model_name='profile',
            name='Address_Types',
        ),
        migrations.CreateModel(
            name='ShopProductCategory',
            fields=[
                ('insertupdate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.InsertUpdate')),
                ('Product_Category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Product_Category',
                                   to='core.ProductCategory')),
                ('Shop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Shop_product',
                                   to='core.Shop')),
            ],
            bases=('core.insertupdate', models.Model),
        ),
        migrations.CreateModel(
            name='ShopProduct',
            fields=[
                ('insertupdate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.InsertUpdate')),
                ('Price', models.DecimalField(decimal_places=2, max_digits=8)),
                ('Available', models.BooleanField(default=False)),
                ('Product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Product',
                                   to='core.Product')),
                ('Shop_Product_Category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Shop_Product_Category',
                                   to='core.ShopProductCategory')),
            ],
            bases=('core.insertupdate', models.Model),
        ),
        migrations.AddField(
            model_name='shop',
            name='Shop_Category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Shop_Category',
                to='core.ShopCategory'),
        ),
        migrations.AddField(
            model_name='shop',
            name='Shop_Status',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Shop_Status',
                to='core.ShopStatus'),
        ),
        migrations.AddField(
            model_name='shop',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='ProductSubcategory',
            fields=[
                ('setuptable_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.SetupTable')),
                ('Product_Category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='ProductCategory',
                                   to='core.ProductCategory')),
            ],
            options={
                'verbose_name_plural': 'Product Categories',
            },
            bases=('core.setuptable', ),
        ),
        migrations.CreateModel(
            name='ProductBrand',
            fields=[
                ('setuptable_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.SetupTable')),
                ('Product_Category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='BrandProductCategory',
                                   to='core.ProductCategory')),
            ],
            bases=('core.setuptable', ),
        ),
        migrations.AddField(
            model_name='product',
            name='Product_Brand',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Product_Brand',
                to='core.ProductBrand'),
        ),
        migrations.AddField(
            model_name='product',
            name='Product_Subcategory',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Product_Subcategory',
                to='core.ProductSubcategory'),
        ),
        migrations.AddField(
            model_name='product',
            name='Product_Unit_Type',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Product_Unit_Type',
                to='core.ProductUnitType'),
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('insertupdate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.InsertUpdate')),
                ('arrears', models.DecimalField(decimal_places=2,
                                                max_digits=8)),
                ('amount', models.DecimalField(decimal_places=2,
                                               max_digits=8)),
                ('paid', models.DecimalField(decimal_places=2, max_digits=8)),
                ('remaining',
                 models.DecimalField(decimal_places=2, max_digits=8)),
                ('create_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('due_date', models.DateField()),
                ('paid_date', models.DateField()),
                ('Payment_Type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Payment_Type',
                                   to='core.PaymentType')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_payment',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            bases=('core.insertupdate', models.Model),
        ),
        migrations.CreateModel(
            name='OrderShopProduct',
            fields=[
                ('insertupdate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.InsertUpdate')),
                ('Quantity', models.IntegerField()),
                ('Weight', models.IntegerField()),
                ('Note', models.TextField(max_length=100)),
                ('Order_Shop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Order_Shop',
                                   to='core.OrderShop')),
                ('Shop_Product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Shop_Products',
                                   to='core.ShopProduct')),
            ],
            bases=('core.insertupdate', models.Model),
        ),
        migrations.AddField(
            model_name='ordershop',
            name='Order_Status',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Order_Status',
                to='core.OrderStatus'),
        ),
        migrations.AddField(
            model_name='ordershop',
            name='Payment',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Payment',
                to='core.Payment'),
        ),
        migrations.AddField(
            model_name='ordershop',
            name='Payment_Status',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Payment_Status',
                to='core.PaymentStatus'),
        ),
        migrations.AddField(
            model_name='ordershop',
            name='Shop',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Order_Shop',
                to='core.Shop'),
        ),
        migrations.AddField(
            model_name='address',
            name='Profile',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name='profile_address',
                to='core.Profile'),
        ),
        migrations.AddField(
            model_name='address',
            name='city',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='core.City'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='RCUser',
            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')),
                ('is_staff', models.BooleanField(default=False)),
                ('first_name', models.CharField(blank=True, max_length=30)),
                ('last_name', models.CharField(blank=True, max_length=150)),
                ('telegram_uid', models.TextField(unique=True)),
                ('telegram_username', models.TextField(null=True)),
                ('role', models.CharField(default='common', max_length=100)),
                ('tags',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(max_length=100),
                     default=list,
                     size=None)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', core.models.RCUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Gang',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('token', models.CharField(max_length=10)),
                ('default_times',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.TimeField(), default=list, size=None)),
            ],
        ),
        migrations.CreateModel(
            name='TelegramChat',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('chat_id', models.BigIntegerField(unique=True)),
                ('type', models.CharField(default='private', max_length=20)),
                ('name', models.CharField(max_length=256)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('title',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('username',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('first_name',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('state', models.TextField(default='init')),
                ('state_updated', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TelegramMessage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('message_id', models.BigIntegerField()),
                ('date', models.DateTimeField()),
                ('edit_date', models.DateTimeField(blank=True, null=True)),
                ('text', models.TextField(blank=True, null=True)),
                ('chat',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.TelegramChat')),
            ],
        ),
        migrations.CreateModel(
            name='TelegramUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('uid', models.BigIntegerField()),
                ('first_name', models.CharField(max_length=30)),
                ('last_name',
                 models.CharField(blank=True, max_length=150, null=True)),
                ('username',
                 models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TelegramUpdate',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('update_id', models.BigIntegerField(unique=True)),
                ('edited_message',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='telegramupdate_edited_message',
                     to='core.TelegramMessage')),
                ('effective_chat',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='core.TelegramChat')),
                ('effective_message',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='telegramupdate_effective_message',
                     to='core.TelegramMessage')),
                ('effective_user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='core.TelegramUser')),
                ('message',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='telegramupdate_message',
                                   to='core.TelegramMessage')),
            ],
        ),
        migrations.AddField(
            model_name='telegrammessage',
            name='from_user',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='telegrammessage_from_user',
                to='core.TelegramUser'),
        ),
        migrations.AddField(
            model_name='telegrammessage',
            name='new_chat_members',
            field=models.ManyToManyField(
                related_name='telegrammessage_new_chat_members',
                to='core.TelegramUser'),
        ),
        migrations.CreateModel(
            name='SeparatorQuestion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text', models.TextField()),
                ('variants',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(max_length=100), size=None)),
                ('gang',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Gang')),
            ],
        ),
        migrations.CreateModel(
            name='HistoryEntry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ts', models.DateTimeField()),
                ('user1',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='historyentry_user1',
                                   to=settings.AUTH_USER_MODEL)),
                ('user2',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='historyentry_user2',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='rcuser',
            name='gang',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='core.Gang'),
        ),
        migrations.AddField(
            model_name='rcuser',
            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='rcuser',
            name='telegram_chat',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='telegram_chat',
                to='core.TelegramChat'),
        ),
        migrations.AddField(
            model_name='rcuser',
            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 = []

    operations = [
        migrations.CreateModel(
            name='RideDriver',
            fields=[
                ('did', models.AutoField(primary_key=True, serialize=False)),
                ('location_start', models.CharField(max_length=100)),
                ('location_end', models.CharField(max_length=100)),
                ('time_start', models.TimeField()),
                ('time_end', models.TimeField()),
                ('point', models.FloatField()),
                ('status', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='RideRequest',
            fields=[
                ('rid', models.AutoField(primary_key=True, serialize=False)),
                ('time_create', models.TimeField(blank=True, null=True)),
                ('time_pickup', models.TimeField(blank=True, null=True)),
                ('recommended_price', models.FloatField(blank=True,
                                                        null=True)),
                ('point', models.FloatField(blank=True, null=True)),
                ('status', models.CharField(blank=True, max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Schedule',
            fields=[
                ('sid', models.AutoField(primary_key=True, serialize=False)),
                ('location_pickup', models.CharField(max_length=100)),
                ('location_to', models.CharField(max_length=100)),
                ('price', models.FloatField()),
                ('status', models.CharField(max_length=100)),
                ('did',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.ridedriver')),
                ('rid',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.riderequest')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('student_id',
                 models.CharField(max_length=10,
                                  primary_key=True,
                                  serialize=False)),
                ('phone_number',
                 models.CharField(blank=True, max_length=10, unique=True)),
                ('first_name', models.CharField(max_length=50)),
                ('last_name', models.CharField(max_length=50)),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=1)),
                ('birthday', models.DateField(blank=True)),
                ('address', models.CharField(blank=True, max_length=255)),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('profile_image',
                 models.ImageField(
                     upload_to=core.models.upload_to_student_profile)),
                ('idcard_image',
                 models.ImageField(
                     upload_to=core.models.upload_to_student_idcard)),
                ('status',
                 models.IntegerField(choices=[(1, 'Enable'), (0, 'Disable')],
                                     default=1)),
                ('is_driver', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='University',
            fields=[
                ('uni_id',
                 models.CharField(max_length=8,
                                  primary_key=True,
                                  serialize=False)),
                ('uni_name', models.CharField(max_length=100)),
                ('uni_city', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Vehicle',
            fields=[
                ('vehicle_id',
                 models.CharField(max_length=8,
                                  primary_key=True,
                                  serialize=False)),
                ('vehicle_name', models.CharField(max_length=30)),
                ('vehicle_manufacturer', models.CharField(max_length=20)),
                ('cylinder_capacity', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='StudentVehicle',
            fields=[
                ('svehicle_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('color', models.CharField(max_length=10)),
                ('lp_number', models.CharField(max_length=20)),
                ('lp_image',
                 models.ImageField(
                     upload_to=core.models.upload_to_vehicle_license_plate)),
                ('ve_image',
                 models.ImageField(
                     upload_to=core.models.upload_to_vehicle_image)),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.student')),
                ('vehicle',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='core.vehicle')),
            ],
        ),
        migrations.AddField(
            model_name='student',
            name='university',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='core.university'),
        ),
        migrations.CreateModel(
            name='ScheduleCancel',
            fields=[
                ('cid', models.AutoField(primary_key=True, serialize=False)),
                ('reason', models.TextField()),
                ('sid',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='core.schedule')),
            ],
        ),
        migrations.CreateModel(
            name='Route',
            fields=[
                ('rid', models.AutoField(primary_key=True, serialize=False)),
                ('location_pickup', models.CharField(max_length=100)),
                ('location_end', models.CharField(max_length=100)),
                ('time_start', models.TimeField()),
                ('time_end', models.TimeField()),
                ('lenght', models.FloatField()),
                ('duration', models.IntegerField()),
                ('status', models.CharField(max_length=100)),
                ('sid',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='core.schedule')),
            ],
        ),
        migrations.AddField(
            model_name='riderequest',
            name='student',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='core.student'),
        ),
        migrations.AddField(
            model_name='ridedriver',
            name='student',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='core.student'),
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('review_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('comment', models.TextField()),
                ('rid',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.route')),
            ],
        ),
        migrations.CreateModel(
            name='Campus',
            fields=[
                ('campus_id',
                 models.CharField(max_length=1,
                                  primary_key=True,
                                  serialize=False)),
                ('campus_name', models.CharField(max_length=100)),
                ('address', models.CharField(max_length=255)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('university',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='core.university')),
            ],
        ),
    ]
Esempio n. 8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [("auth", "0012_alter_user_first_name_max_length")]

    operations = [
        migrations.CreateModel(
            name="Area",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=255)),
                ("shortTitle", models.CharField(max_length=10)),
                ("created_at",
                 models.DateField(default=django.utils.timezone.now)),
                (
                    "updated_at",
                    core.models.AutoDateTimeField(
                        default=django.utils.timezone.now),
                ),
            ],
            options={
                "verbose_name": "Направления",
                "verbose_name_plural": "Направления",
            },
        ),
        migrations.CreateModel(
            name="Boec",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("firstName", models.CharField(max_length=255)),
                ("lastName", models.CharField(max_length=255)),
                ("middleName", models.CharField(blank=True, max_length=255)),
                ("DOB", models.DateField(blank=True, null=True)),
                ("created_at",
                 models.DateField(default=django.utils.timezone.now)),
                (
                    "updated_at",
                    core.models.AutoDateTimeField(
                        default=django.utils.timezone.now),
                ),
                (
                    "vkId",
                    models.IntegerField(blank=True,
                                        null=True,
                                        unique=True,
                                        verbose_name="VK id"),
                ),
            ],
            options={
                "verbose_name": "Боец",
                "verbose_name_plural": "Бойцы"
            },
        ),
        migrations.CreateModel(
            name="Brigade",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=255)),
                ("DOB", models.DateTimeField(blank=True, null=True)),
                ("status", models.BooleanField(default=True)),
                ("created_at",
                 models.DateField(default=django.utils.timezone.now)),
                (
                    "updated_at",
                    core.models.AutoDateTimeField(
                        default=django.utils.timezone.now),
                ),
                (
                    "area",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.RESTRICT,
                        related_name="brigades",
                        to="core.area",
                    ),
                ),
                (
                    "boec",
                    models.ManyToManyField(blank=True,
                                           related_name="brigades",
                                           to="core.Boec"),
                ),
            ],
            options={
                "verbose_name": "Отряд",
                "verbose_name_plural": "Отряды"
            },
        ),
        migrations.CreateModel(
            name="Event",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "status",
                    models.IntegerField(
                        choices=[
                            (0, "Мероприятие создано"),
                            (1, "Мероприятие прошло"),
                            (2, "Мероприятие не прошло"),
                        ],
                        default=0,
                        verbose_name="Статус мероприятия",
                    ),
                ),
                (
                    "worth",
                    models.CharField(
                        choices=[
                            ("0", "Не учитывается"),
                            ("1", "Творчество"),
                            ("2", "Спорт"),
                            ("3", "Волонтерство"),
                            ("4", "Городское"),
                        ],
                        default="0",
                        max_length=5,
                        verbose_name="Ценность блоков",
                    ),
                ),
                ("title",
                 models.CharField(max_length=255, verbose_name="Название")),
                (
                    "description",
                    models.CharField(blank=True,
                                     max_length=255,
                                     verbose_name="Описание"),
                ),
                (
                    "location",
                    models.CharField(blank=True,
                                     max_length=255,
                                     verbose_name="Место проведение"),
                ),
                (
                    "startDate",
                    models.DateField(blank=True,
                                     null=True,
                                     verbose_name="Дата начала"),
                ),
                (
                    "startTime",
                    models.TimeField(blank=True,
                                     null=True,
                                     verbose_name="Время начала"),
                ),
                (
                    "visibility",
                    models.BooleanField(default=False,
                                        verbose_name="Видимость"),
                ),
                (
                    "organizer",
                    models.ManyToManyField(
                        blank=True,
                        related_name="organizers_list",
                        to="core.Boec",
                        verbose_name="Организаторы",
                    ),
                ),
            ],
            options={
                "verbose_name": "Мероприятие",
                "verbose_name_plural": "Мероприятия",
            },
        ),
        migrations.CreateModel(
            name="Shtab",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=255)),
                ("created_at",
                 models.DateField(default=django.utils.timezone.now)),
                (
                    "updated_at",
                    core.models.AutoDateTimeField(
                        default=django.utils.timezone.now),
                ),
            ],
            options={
                "verbose_name": "Штаб",
                "verbose_name_plural": "Штабы"
            },
        ),
        migrations.CreateModel(
            name="Season",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("year", models.IntegerField(verbose_name="Год выезда")),
                (
                    "boec",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="seasons",
                        to="core.boec",
                        verbose_name="ФИО",
                    ),
                ),
                (
                    "brigade",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.RESTRICT,
                        related_name="seasons",
                        to="core.brigade",
                        verbose_name="Отряд",
                    ),
                ),
            ],
            options={
                "verbose_name": "Выезжавший на сезон",
                "verbose_name_plural": "Выезжавшие на сезон",
            },
        ),
        migrations.CreateModel(
            name="Position",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "position",
                    models.IntegerField(
                        choices=[
                            (0, "Работник"),
                            (1, "Комендант"),
                            (2, "Методист"),
                            (3, "Мастер"),
                            (4, "Комиссар"),
                            (5, "Командир"),
                        ],
                        verbose_name="Должность",
                    ),
                ),
                ("fromDate",
                 models.DateTimeField(default=django.utils.timezone.now)),
                ("toDate", models.DateTimeField(blank=True, null=True)),
                (
                    "boec",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.RESTRICT,
                        related_name="positions",
                        to="core.boec",
                        verbose_name="Боец",
                    ),
                ),
                (
                    "brigade",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.RESTRICT,
                        related_name="positions",
                        to="core.brigade",
                        verbose_name="Отряд",
                    ),
                ),
                (
                    "shtab",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.RESTRICT,
                        related_name="positions",
                        to="core.shtab",
                        verbose_name="Штаб",
                    ),
                ),
            ],
            options={
                "verbose_name": "Должность",
                "verbose_name_plural": "Должности"
            },
        ),
        migrations.CreateModel(
            name="EventOrder",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "title",
                    models.CharField(blank=True,
                                     max_length=255,
                                     verbose_name="Название"),
                ),
                (
                    "isСontender",
                    models.BooleanField(
                        default=False,
                        verbose_name=
                        "Прошел в конкурсную программу (или плей-офф)",
                    ),
                ),
                (
                    "place",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("1", "Первое место"),
                            ("2", "Второе место"),
                            ("3", "Третье место"),
                        ],
                        max_length=5,
                        null=True,
                        verbose_name="Занятое место",
                    ),
                ),
                (
                    "brigades",
                    models.ManyToManyField(related_name="event_participations",
                                           to="core.Brigade"),
                ),
                (
                    "event",
                    models.ForeignKey(
                        blank=True,
                        on_delete=django.db.models.deletion.RESTRICT,
                        related_name="orders",
                        to="core.event",
                        verbose_name="Мероприятие",
                    ),
                ),
                (
                    "participations",
                    models.ManyToManyField(blank=True,
                                           related_name="event_participations",
                                           to="core.Boec"),
                ),
            ],
            options={
                "verbose_name": "Заявка на мероприятие",
                "verbose_name_plural": "Заявки на мероприятие",
            },
        ),
        migrations.AddField(
            model_name="event",
            name="shtab",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="core.shtab",
                verbose_name="Штаб",
            ),
        ),
        migrations.AddField(
            model_name="event",
            name="volonteer",
            field=models.ManyToManyField(
                blank=True,
                related_name="volonteers_list",
                to="core.Boec",
                verbose_name="Волонтеры",
            ),
        ),
        migrations.AddField(
            model_name="brigade",
            name="shtab",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.RESTRICT, to="core.shtab"),
        ),
        migrations.CreateModel(
            name="User",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "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",
                    ),
                ),
                ("vkId", models.IntegerField(unique=True)),
                ("name", models.CharField(max_length=255)),
                ("is_active", models.BooleanField(default=True)),
                ("is_staff", models.BooleanField(default=False)),
                ("created_at",
                 models.DateField(default=django.utils.timezone.now)),
                (
                    "updated_at",
                    core.models.AutoDateTimeField(
                        default=django.utils.timezone.now),
                ),
                ("password", models.CharField(blank=True, max_length=128)),
                (
                    "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},
        ),
    ]
Esempio n. 9
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('credit',
                 models.DecimalField(decimal_places=2, default=0,
                                     max_digits=8)),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=core.models.image_file_path)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField()),
                ('is_artist', models.BooleanField(default=False)),
                ('is_promoter', models.BooleanField(default=False)),
                ('address_city', models.CharField(blank=True, max_length=255)),
                ('address_country', models.CharField(blank=True,
                                                     max_length=255)),
                ('address_line1', models.CharField(blank=True,
                                                   max_length=255)),
                ('address_line2', models.CharField(blank=True,
                                                   max_length=255)),
                ('address_state', models.CharField(blank=True,
                                                   max_length=255)),
                ('address_zip', models.CharField(blank=True, max_length=255)),
                ('facebook', models.URLField(blank=True)),
                ('instagram', models.URLField(blank=True)),
                ('phone',
                 phonenumber_field.modelfields.PhoneNumberField(blank=True,
                                                                max_length=128,
                                                                region=None)),
                ('soundcloud', models.URLField(blank=True)),
                ('spotify', models.URLField(blank=True)),
                ('twitter', models.URLField(blank=True)),
                ('website', models.URLField(blank=True)),
                ('youtube', models.URLField(blank=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description', models.CharField(blank=True, max_length=1000)),
                ('end_date', models.DateField()),
                ('end_time', models.TimeField()),
                ('name', models.CharField(max_length=255)),
                ('start_date', models.DateField()),
                ('start_time', models.TimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateField(auto_now_add=True)),
                ('created_time', models.TimeField(auto_now_add=True)),
                ('subject', models.CharField(max_length=255)),
                ('text', models.CharField(max_length=1000)),
                ('sender',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='messages',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tally',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField()),
                ('event',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='lineup',
                                   to='core.Event')),
            ],
        ),
        migrations.CreateModel(
            name='Venue',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address_city', models.CharField(blank=True, max_length=255)),
                ('address_country', models.CharField(blank=True,
                                                     max_length=255)),
                ('address_line1', models.CharField(max_length=255)),
                ('address_line2', models.CharField(blank=True,
                                                   max_length=255)),
                ('address_state', models.CharField(blank=True,
                                                   max_length=255)),
                ('address_zip', models.CharField(max_length=255)),
                ('description', models.CharField(blank=True, max_length=1000)),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField()),
            ],
        ),
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('user_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('description', models.CharField(blank=True, max_length=1000)),
            ],
            options={
                'abstract': False,
            },
            bases=('core.user', models.Model),
        ),
        migrations.CreateModel(
            name='Promoter',
            fields=[
                ('user_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('description', models.CharField(blank=True, max_length=1000)),
                ('is_verified', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            bases=('core.user', models.Model),
        ),
        migrations.CreateModel(
            name='TicketType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('price', models.DecimalField(decimal_places=2, max_digits=8)),
                ('slug', models.SlugField()),
                ('tickets_remaining', models.IntegerField(blank=True,
                                                          null=True)),
                ('event',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='ticket_types',
                                   to='core.Event')),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=6)),
                ('owner',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='tickets',
                                   to=settings.AUTH_USER_MODEL)),
                ('ticket_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='tickets',
                                   to='core.TicketType')),
                ('vote',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='tickets',
                                   to='core.Tally')),
            ],
        ),
        migrations.CreateModel(
            name='ReadFlag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('opened', models.BooleanField(default=False)),
                ('message',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='readflags',
                                   to='core.Message')),
                ('recipient',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='readflags',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='event',
            name='venue',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='events',
                to='core.Venue'),
        ),
        migrations.AddField(
            model_name='tally',
            name='artist',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='tallies',
                to='core.Artist'),
        ),
        migrations.AddField(
            model_name='event',
            name='promoter',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='events',
                to='core.Promoter'),
        ),
    ]
Esempio n. 10
0
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)),
                ('birthday', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Parent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='WithDefault',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(blank=True,
                                  default='foo_bar',
                                  max_length=75,
                                  verbose_name='Default')),
            ],
        ),
        migrations.CreateModel(
            name='WithDynamicDefault',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default=core.models.random_name,
                                  max_length=100,
                                  verbose_name='Dyn Default')),
            ],
        ),
        migrations.CreateModel(
            name='WithFloatField',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('f', models.FloatField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_private', models.BooleanField(default=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Role')),
            ],
        ),
        migrations.CreateModel(
            name='Entry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Child',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('parent',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Parent')),
            ],
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Book name')),
                ('author_email',
                 models.EmailField(blank=True,
                                   max_length=75,
                                   verbose_name='Author email')),
                ('imported', models.BooleanField(default=False)),
                ('published',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Published')),
                ('published_time',
                 models.TimeField(blank=True,
                                  null=True,
                                  verbose_name='Time published')),
                ('price',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     max_digits=10,
                                     null=True)),
                ('added', models.DateTimeField(blank=True, null=True)),
                ('author',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Author')),
                ('categories',
                 models.ManyToManyField(blank=True, to='core.Category')),
            ],
        ),
        migrations.CreateModel(
            name='EBook',
            fields=[],
            options={
                'proxy': True,
                'indexes': [],
                'constraints': [],
            },
            bases=('core.book', ),
        ),
    ]
Esempio n. 11
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Agenda',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('dia',
                 models.DateField(validators=[core.models.data_passada])),
                ('horario',
                 multiselectfield.db.fields.MultiSelectField(choices=[
                     (7, '07:00'), (8, '08:00'), (9, '09:00'), (10, '10:00'),
                     (11, '11:00'), (12, '12:00'), (13, '13:00'),
                     (14, '14:00'), (15, '15:00'), (16, '16:00'),
                     (17, '17:00'), (18, '18:00'), (19, '19:00'), (20, '20:00')
                 ],
                                                             max_length=200)),
            ],
            options={
                'ordering': ['dia'],
            },
        ),
        migrations.CreateModel(
            name='Especialidade',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('especialidade',
                 models.CharField(default='Demartologia', max_length=50)),
            ],
            options={
                'ordering': ['especialidade'],
            },
        ),
        migrations.CreateModel(
            name='Medico',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nome', models.CharField(max_length=200,
                                          verbose_name='Nome')),
                ('crm', models.CharField(max_length=11, verbose_name='CRM')),
                ('email', models.EmailField(max_length=254)),
                ('telefone',
                 models.CharField(max_length=11, verbose_name='Telefone')),
                ('especialidade',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.especialidade')),
            ],
            options={
                'ordering': ['nome'],
            },
        ),
        migrations.CreateModel(
            name='Consulta',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('horario', models.TimeField()),
                ('data_agendamento', models.DateTimeField(auto_now=True)),
                ('dia',
                 smart_selects.db_fields.ChainedForeignKey(
                     auto_choose=True,
                     chained_field='medico',
                     chained_model_field='medico',
                     on_delete=django.db.models.deletion.CASCADE,
                     to='core.agenda')),
                ('especialidade',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.especialidade')),
                ('medico',
                 smart_selects.db_fields.ChainedForeignKey(
                     auto_choose=True,
                     chained_field='especialidade',
                     chained_model_field='especialidade',
                     on_delete=django.db.models.deletion.CASCADE,
                     to='core.medico')),
                ('usuario',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['dia', 'horario'],
            },
        ),
        migrations.AddField(
            model_name='agenda',
            name='medico',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='core.medico'),
        ),
    ]