# Generated by Django 3.0.9 on 2020-10-02 15:23

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=1000)),
                ('address1', models.CharField(blank=True, max_length=1000, null=True)),
                ('address2', models.CharField(blank=True, max_length=1000, null=True)),
                ('city', models.CharField(blank=True, max_length=100, null=True)),
                ('state', models.CharField(blank=True, max_length=100, null=True)),
                ('country', models.CharField(blank=True, max_length=100, null=True)),
                ('partner_name', models.CharField(blank=True, max_length=100, null=True)),
                ('state_pin_code', models.CharField(blank=True, max_length=100, null=True)),
                ('active', models.BooleanField(default=1)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='company_created_by', to='usermanagement.Users')),
                ('updated_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='company_updated_by', to='usermanagement.Users')),
            ],
        ),
        migrations.CreateModel(
            name='UserCompanyRole',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('isActive', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organization.Company')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_role_created_by', to='usermanagement.Users')),
                ('role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='usermanagement.Roles')),
                ('updated_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_role_updated_by', to='usermanagement.Users')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='usermanagement.Users')),
            ],
        ),
    ]
