示例#1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('workspaces', '0001_initial'),
        ('fyle', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='TaskLog',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('type', models.CharField(help_text='Task type (FETCH_EXPENSES / CREATE_BILL)', max_length=50)),
                ('task_id', models.CharField(help_text='Django Q task reference', max_length=255, null=True)),
                ('status', models.CharField(help_text='Task Status', max_length=255)),
                ('detail', django.contrib.postgres.fields.jsonb.JSONField(default=apps.tasks.models.get_default, help_text='Task response', null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='Created at datetime')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='Updated at datetime')),
                ('expense_group', models.ForeignKey(help_text='Reference to Expense group', null=True, on_delete=django.db.models.deletion.PROTECT, to='fyle.ExpenseGroup')),
                ('workspace', models.ForeignKey(help_text='Reference to Workspace model', on_delete=django.db.models.deletion.PROTECT, to='workspaces.Workspace')),
            ],
            options={
                'db_table': 'task_log',
            },
        ),
    ]
示例#2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(
                     max_length=45,
                     validators=[apps.tasks.models.ValidarLongitudMinima])),
                ('lastname',
                 models.CharField(
                     max_length=45,
                     validators=[apps.tasks.models.ValidarLongitudMinima])),
                ('email',
                 models.CharField(max_length=50,
                                  validators=[apps.tasks.models.ValidarEmail
                                              ])),
                ('password', models.CharField(max_length=20)),
                ('fecha_nacimiento', models.DateField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
    ]
示例#3
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=45, validators=[apps.tasks.models.ValidarLongitudMinima])),
                ('due_date', models.DateField()),
                ('completed', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tasks', to='tasks.User')),
            ],
        ),
    ]