Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-21 08:46:24

0001 # Generated by Django 5.2.12 on 2026-07-16 00:22
0002 
0003 from django.db import migrations, models
0004 
0005 
0006 class Migration(migrations.Migration):
0007 
0008     initial = True
0009 
0010     dependencies = [
0011     ]
0012 
0013     operations = [
0014         migrations.CreateModel(
0015             name='Proposal',
0016             fields=[
0017                 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
0018                 ('action', models.CharField(max_length=40)),
0019                 ('subject_type', models.CharField(max_length=40)),
0020                 ('subject_key', models.CharField(db_index=True, max_length=255)),
0021                 ('counterpart_key', models.CharField(blank=True, default='', max_length=255)),
0022                 ('payload', models.JSONField(default=dict)),
0023                 ('comment', models.TextField()),
0024                 ('confidence', models.CharField(blank=True, default='', max_length=16)),
0025                 ('proposer', models.CharField(max_length=100)),
0026                 ('scan_version', models.IntegerField(default=1)),
0027                 ('batch_id', models.CharField(blank=True, db_index=True, default='', max_length=100)),
0028                 ('executor', models.CharField(choices=[('service', 'service'), ('agent_message', 'agent_message')], default='service', max_length=20)),
0029                 ('precondition', models.JSONField(default=dict)),
0030                 ('input_hash', models.CharField(db_index=True, max_length=40)),
0031                 ('status', models.CharField(choices=[('proposed', 'proposed'), ('approved_pending_execution', 'approved_pending_execution'), ('executed', 'executed'), ('denied', 'denied'), ('withdrawn', 'withdrawn'), ('stale', 'stale')], db_index=True, default='proposed', max_length=30)),
0032                 ('quality', models.CharField(blank=True, choices=[('wrong', 'wrong'), ('poor', 'poor'), ('ok', 'ok'), ('good', 'good')], default='', max_length=10)),
0033                 ('created_by', models.CharField(max_length=100)),
0034                 ('created_at', models.DateTimeField(auto_now_add=True)),
0035                 ('decided_by', models.CharField(blank=True, default='', max_length=100)),
0036                 ('decided_at', models.DateTimeField(blank=True, null=True)),
0037                 ('executed_log_id', models.BigIntegerField(blank=True, null=True)),
0038                 ('undone_by', models.CharField(blank=True, default='', max_length=100)),
0039                 ('undone_at', models.DateTimeField(blank=True, null=True)),
0040                 ('undone_log_id', models.BigIntegerField(blank=True, null=True)),
0041             ],
0042             options={
0043                 'db_table': 'ai_proposal',
0044                 'ordering': ['-created_at'],
0045                 'indexes': [models.Index(fields=['action', 'subject_key', 'status'], name='ai_proposal_action_76dc26_idx')],
0046             },
0047         ),
0048     ]