Artifex/control_plane/resources/migrations/0001_initial.py
2026-08-15 13:50:24 +07:00

53 lines
2.3 KiB
Python

# Generated by Django 5.2.16 on 2026-08-15 05:46
import django.db.models.deletion
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('agents', '0001_initial'),
('projects', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Resource',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=200, unique=True)),
('kind', models.CharField(choices=[('MODEL', 'Model'), ('COMPUTE', 'Compute'), ('GIT', 'Git'), ('ARTIFACT_STORAGE', 'Artifact Storage')], max_length=80)),
('provider', models.CharField(blank=True, max_length=120)),
('config', models.JSONField(blank=True, default=dict)),
('is_active', models.BooleanField(default=True)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='ModelRequest',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('model', models.CharField(max_length=120)),
('priority', models.PositiveSmallIntegerField(default=50)),
('token_budget', models.PositiveIntegerField(default=8000)),
('status', models.CharField(default='QUEUED', max_length=32)),
('request', models.JSONField(default=dict)),
('response', models.JSONField(blank=True, default=dict)),
('agent_version', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='agents.agentversion')),
('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='projects.project')),
],
options={
'abstract': False,
},
),
]