123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- # Generated by Django 4.0.5 on 2022-06-26 10:36
- from django.db import migrations, models
- import django.db.models.deletion
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- ]
- operations = [
- migrations.CreateModel(
- name='Company',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=128)),
- ('address', models.CharField(blank=True, max_length=256, null=True)),
- ('phone', models.BigIntegerField(unique=True)),
- ('license_id', models.CharField(max_length=128)),
- ('primary_contact_name', models.CharField(max_length=128)),
- ('primary_contact_mobile', models.BigIntegerField(unique=True)),
- ('primary_contact_email', models.CharField(max_length=256)),
- ('create_datetime', models.DateTimeField(auto_now_add=True)),
- ('last_update_datetime', models.DateTimeField(auto_now=True)),
- ],
- ),
- migrations.CreateModel(
- name='user',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=128)),
- ('password', models.CharField(max_length=128)),
- ('mobile', models.BigIntegerField(blank=True, null=True, unique=True)),
- ('email', models.CharField(max_length=256, unique=True)),
- ('wechat_id', models.CharField(max_length=128, null=True)),
- ('role', models.CharField(default='user', max_length=32)),
- ('create_datetime', models.DateTimeField(auto_now_add=True)),
- ('last_update_datetime', models.DateTimeField(auto_now=True)),
- ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_to_company', to='Info.company')),
- ],
- ),
- ]
|