Files
abyssVpn/services/api/vpn/migrations/0001_initial.py
T
arthur_chen f69efb67ad Initial commit: abyssVpn project
- Tauri desktop app (apps/desktop)
- Python Django API service (services/api)
- Deployment scripts and docs
2026-05-15 09:06:10 +08:00

54 lines
2.0 KiB
Python

from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
("accounts", "0001_initial"),
]
operations = [
migrations.CreateModel(
name="Device",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("device_name", models.CharField(max_length=128)),
("device_fingerprint", models.CharField(blank=True, max_length=256)),
("netmaker_node_id", models.CharField(blank=True, max_length=128)),
("status", models.CharField(default="active", max_length=16)),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="devices",
to="accounts.user",
),
),
],
),
migrations.CreateModel(
name="VpnLog",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("action", models.CharField(max_length=64)),
("detail", models.JSONField(blank=True, default=dict)),
("created_at", models.DateTimeField(auto_now_add=True)),
(
"device",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="vpn.device",
),
),
("user", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="accounts.user")),
],
),
]