first commit
This commit is contained in:
parent
6bdba48fa5
commit
7f28fe580d
38 changed files with 452 additions and 0 deletions
22
api/migrations/0001_initial.py
Normal file
22
api/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Generated by Django 5.1.7 on 2025-03-15 08:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Todo',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=100)),
|
||||
('completed', models.BooleanField(default=False)),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
# Generated by Django 5.1.7 on 2025-03-31 10:14
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Prediction',
|
||||
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)),
|
||||
('result', models.JSONField()),
|
||||
('deleted_at', models.DateTimeField(blank=True, null=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='User',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='UserPrediction',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('prediction', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.prediction')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.user')),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('user', 'prediction')},
|
||||
},
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='Todo',
|
||||
),
|
||||
]
|
||||
0
api/migrations/__init__.py
Normal file
0
api/migrations/__init__.py
Normal file
BIN
api/migrations/__pycache__/0001_initial.cpython-313.pyc
Normal file
BIN
api/migrations/__pycache__/0001_initial.cpython-313.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
api/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
api/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue