Initial commit
This commit is contained in:
commit
5cda7bc309
28 changed files with 1173 additions and 0 deletions
30
yksa_kit/migrations/0001_initial.py
Normal file
30
yksa_kit/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import yksa_kit.models
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ApiToken',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(help_text="Human-readable label, e.g. 'TMTC pipeline' or 'ground station 1'.", max_length=64, unique=True)),
|
||||
('token', models.CharField(db_index=True, default=yksa_kit.models._generate_token, editable=False, help_text='Bearer credential. Treat as a secret.', max_length=128, unique=True)),
|
||||
('kind', models.CharField(choices=[('read', 'Read (non-public visibility)'), ('ingest', 'Ingest (push)')], default='read', help_text='Read tokens extend visibility; ingest tokens may also push data.', max_length=16)),
|
||||
('is_active', models.BooleanField(db_index=True, default=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('last_used_at', models.DateTimeField(blank=True, null=True)),
|
||||
('notes', models.TextField(blank=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'API token',
|
||||
'verbose_name_plural': 'API tokens',
|
||||
'ordering': ['-created_at'],
|
||||
},
|
||||
),
|
||||
]
|
||||
0
yksa_kit/migrations/__init__.py
Normal file
0
yksa_kit/migrations/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue