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

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id_company',
                 models.CharField(default=companies.models.create_id,
                                  editable=False,
                                  max_length=100,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('street', models.CharField(max_length=200)),
                ('phone', models.CharField(max_length=200)),
                ('description', models.CharField(max_length=200)),
                ('image', models.CharField(max_length=200)),
                ('lat', models.CharField(max_length=200, null=True)),
                ('lon', models.CharField(max_length=200, null=True)),
                ('service_hour', models.CharField(max_length=200, null=True)),
                ('type_company',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='kinds_companies.Kind_Company')),
            ],
        ),
    ]
Beispiel #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Investor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('job', models.CharField(max_length=100)),
                ('description', models.TextField()),
                ('active', models.BooleanField(default=True)),
                ('slug', models.SlugField(blank=True, null=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='StartUp',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('company_name', models.CharField(max_length=200)),
                ('category',
                 models.CharField(choices=[('', '')], max_length=100)),
                ('description', models.TextField(blank=True, null=True)),
                ('read_time', models.TimeField(blank=True, null=True)),
                ('dashboard',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=companies.models.upload_location)),
                ('address', models.CharField(max_length=200)),
                ('active', models.BooleanField(default=False)),
                ('featured', models.BooleanField(default=False)),
                ('slug', models.SlugField(blank=True, null=True)),
                ('status',
                 models.CharField(choices=[('StartUp', 'StartUp'),
                                           ('ScaleUp', 'ScaleUp')],
                                  max_length=100)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('interest',
                 models.ManyToManyField(blank=True,
                                        related_name='Interests',
                                        to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='accounts.Profile')),
            ],
            options={
                'ordering': ['-timestamp', '-updated'],
            },
        ),
        migrations.AddField(
            model_name='investor',
            name='startup',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='companies.StartUp'),
        ),
        migrations.AddField(
            model_name='investor',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='accounts.Profile'),
        ),
    ]
Beispiel #3
0
class Migration(migrations.Migration):
    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=127)),
                ('logo',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=companies.models.company.
                                  company_logo_upload_location)),
            ],
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('access',
                 models.FloatField(choices=[(0, 'Member'), (1, 'Manager'),
                                            (2, 'Owner')],
                                   default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('company',
                 models.ForeignKey(
                     default=None,
                     on_delete=django.db.models.deletion.SET_DEFAULT,
                     related_name='teams',
                     to='companies.Company')),
                ('team_memberships',
                 models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='CompanyMembership',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('company',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='companies.Company')),
                ('role',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='companies.Role')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='company',
            name='members',
            field=models.ManyToManyField(blank=True,
                                         related_name='companies',
                                         through='companies.CompanyMembership',
                                         to=settings.AUTH_USER_MODEL),
        ),
    ]
Beispiel #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Industry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Technology',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('city', smart_selects.db_fields.ChainedForeignKey(auto_choose=True, chained_field='country', chained_model_field='country', on_delete=django.db.models.deletion.CASCADE, to='companies.city')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='companies.country')),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('established_year', models.IntegerField(validators=[django.core.validators.MinValueValidator(2000), companies.models.max_value_current_year])),
                ('description', models.TextField()),
                ('company_size', models.CharField(choices=[('<10', '<10'), ('10-20', '10-20'), ('20-50', '20-50'), ('50+', '50+'), ('100+', '500+')], max_length=10)),
                ('industry', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='companies.industry')),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='companies.location')),
                ('technologies', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='companies.technology')),
            ],
        ),
        migrations.AddField(
            model_name='city',
            name='country',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='companies.country'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Companies',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.TextField(max_length=200)),
                ('description', models.TextField(max_length=500)),
                ('logo',
                 models.ImageField(upload_to=companies.models.get_image_name,
                                   verbose_name='Company Image')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Programs',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.TextField(max_length=200)),
                ('description', models.TextField(max_length=500)),
                ('duration', models.IntegerField()),
                ('price', models.DecimalField(decimal_places=2, max_digits=6)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('company',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='companies.Companies')),
            ],
        ),
        migrations.CreateModel(
            name='ProgramPhotos',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(upload_to=companies.models.get_image_name,
                                   verbose_name='Program Image')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('program',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='companies.Programs')),
            ],
        ),
        migrations.CreateModel(
            name='CompanyUrls',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('url', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('company',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='companies.Companies')),
            ],
        ),
        migrations.CreateModel(
            name='CompanyNumbers',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('phone_number', models.CharField(max_length=11)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('company',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='companies.Companies')),
            ],
        ),
    ]