Initial commit
This commit is contained in:
50
core/migrations/0001_initial.py
Normal file
50
core/migrations/0001_initial.py
Normal file
@@ -0,0 +1,50 @@
|
||||
# Generated by Django 5.2.8 on 2025-11-07 07:39
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='SystemSettings',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('goedge_base_url', models.URLField(blank=True, default='')),
|
||||
('edge_access_token', models.CharField(blank=True, default='', max_length=255)),
|
||||
('default_free_traffic_gb_per_domain', models.PositiveIntegerField(default=15)),
|
||||
('default_overage_policy', models.JSONField(blank=True, default=dict)),
|
||||
('cname_template', models.CharField(blank=True, default='{sub}.cdn.example.com', max_length=255)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '系统设置',
|
||||
'verbose_name_plural': '系统设置',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='OperationLog',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('action', models.CharField(max_length=100)),
|
||||
('target', models.CharField(blank=True, default='', max_length=200)),
|
||||
('detail', models.TextField(blank=True, default='')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('actor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '操作日志',
|
||||
'verbose_name_plural': '操作日志',
|
||||
'ordering': ['-created_at'],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 5.2.8 on 2025-11-07 07:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='admin_access_key',
|
||||
field=models.CharField(blank=True, default='', max_length=128),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='admin_access_key_id',
|
||||
field=models.CharField(blank=True, default='', max_length=64),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='edge_token_expires_at',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.8 on 2025-11-07 08:26
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0002_systemsettings_admin_access_key_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='default_node_cluster_id',
|
||||
field=models.BigIntegerField(blank=True, null=True),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 5.2.8 on 2025-11-08 08:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0003_systemsettings_default_node_cluster_id'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='anomaly_detection_enabled',
|
||||
field=models.BooleanField(default=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='anomaly_min_gb',
|
||||
field=models.FloatField(default=1.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='anomaly_threshold_multiplier',
|
||||
field=models.FloatField(default=3.0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='anomaly_window_days',
|
||||
field=models.PositiveIntegerField(default=7),
|
||||
),
|
||||
]
|
||||
18
core/migrations/0005_systemsettings_captcha_enabled.py
Normal file
18
core/migrations/0005_systemsettings_captcha_enabled.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.8 on 2025-11-09 08:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0004_systemsettings_anomaly_detection_enabled_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='captcha_enabled',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
21
core/migrations/0006_systemsettings_policy_ids.py
Normal file
21
core/migrations/0006_systemsettings_policy_ids.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0005_systemsettings_captcha_enabled'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='default_http_access_log_policy_id',
|
||||
field=models.BigIntegerField(null=True, blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='default_http_firewall_policy_id',
|
||||
field=models.BigIntegerField(null=True, blank=True),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 5.2.8 on 2025-11-17 12:36
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0006_systemsettings_policy_ids'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='epay_api_base_url',
|
||||
field=models.URLField(blank=True, default=''),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='epay_key',
|
||||
field=models.CharField(blank=True, default='', max_length=128),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='systemsettings',
|
||||
name='epay_pid',
|
||||
field=models.CharField(blank=True, default='', max_length=64),
|
||||
),
|
||||
]
|
||||
0
core/migrations/__init__.py
Normal file
0
core/migrations/__init__.py
Normal file
BIN
core/migrations/__pycache__/0001_initial.cpython-312.pyc
Normal file
BIN
core/migrations/__pycache__/0001_initial.cpython-312.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
core/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
core/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user