-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy path0002_taskrecord.py
More file actions
32 lines (27 loc) · 1.65 KB
/
0002_taskrecord.py
File metadata and controls
32 lines (27 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Generated by Django 5.2.9 on 2026-01-22 09:32
import common.encoder.encoder
import uuid_utils.compat
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('trigger', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='TaskRecord',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('source_type', models.CharField(choices=[('APPLICATION', 'Application'), ('TOOL', 'Tool')], default='APPLICATION', max_length=256, verbose_name='触发器任务类型')),
('source_id', models.UUIDField(blank=True, null=True, verbose_name='资源id')),
('task_record_id', models.UUIDField(blank=True, verbose_name='任务记录id')),
('meta', models.JSONField(default=dict, encoder=common.encoder.encoder.SystemEncoder)),
('state', models.CharField(choices=[('PENDING', 'Pending'), ('STARTED', 'Started'), ('SUCCESS', 'Success'), ('FAILURE', 'Failure'), ('REVOKE', 'Revoke'), ('REVOKED', 'Revoked')], default='STARTED', max_length=20, verbose_name='状态')),
('run_time', models.FloatField(default=0, verbose_name='运行时长')),
],
options={
'db_table': 'event_trigger_task_record',
},
),
]