first commit
This commit is contained in:
56
backend/journal/migrations/0001_initial.py
Normal file
56
backend/journal/migrations/0001_initial.py
Normal file
@@ -0,0 +1,56 @@
|
||||
# Generated by Django 5.2.14 on 2026-05-11 10:13
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Config',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('unlock_at', models.DateTimeField(help_text='Story unlocks at this time (timezone-aware).')),
|
||||
('bgm_enabled', models.BooleanField(default=True)),
|
||||
('site_title', models.CharField(blank=True, default='Nepal Journey: Our Story', max_length=120)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Config',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Guestbook',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('nickname', models.CharField(max_length=80)),
|
||||
('message', models.TextField()),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Guestbook entries',
|
||||
'ordering': ['-created_at'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Memory',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('story_order', models.PositiveIntegerField(db_index=True, default=0, help_text='叙事顺序,数字越小越靠前。')),
|
||||
('date', models.DateField()),
|
||||
('event_title', models.CharField(max_length=200)),
|
||||
('main_text', models.TextField(blank=True, help_text='支持 Markdown。')),
|
||||
('unique_feature_type', models.CharField(choices=[('heart_window', '心窗页'), ('fissure_page', '裂缝对开页'), ('standard_nepal', '标准尼泊尔页')], default='standard_nepal', max_length=32)),
|
||||
('nepal_art_style', models.CharField(blank=True, choices=[('none', '默认'), ('mandala_pink', '粉曼陀罗'), ('mandala_blue', '蓝曼陀罗'), ('spiral_rose', '玫瑰螺旋'), ('spiral_cyan', '青色螺旋')], default='none', max_length=32)),
|
||||
('image', models.ImageField(blank=True, null=True, upload_to='memories/')),
|
||||
('is_finale', models.BooleanField(default=False, help_text='终章:在解锁时间前仅可预览占位,到点后需手动打开。')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['story_order', 'id'],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.14 on 2026-05-11 10:23
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('journal', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='memory',
|
||||
name='nepal_art_style',
|
||||
field=models.CharField(blank=True, choices=[('none', '默认米黄'), ('mandala_pink', '粉曼陀罗'), ('mandala_blue', '蓝曼陀罗'), ('spiral_rose', '玫瑰螺旋'), ('spiral_cyan', '青色螺旋'), ('dawn_meet', '晨光·遇见'), ('blush_argue', '粉雾·争执'), ('mint_reconcile', '薄荷·和好'), ('saffron_home', '姜黄·小家'), ('indigo_ikea', '靛蓝·漫游'), ('lotus_petal', '莲花瓣'), ('lokta_gold', '金边手工纸'), ('ocean_prayer', '海洋祈愿'), ('desert_rose', '沙漠玫瑰'), ('night_star', '夜空星屑'), ('terra_torn', '赭石撕边')], default='none', help_text='标准页背景/纹理;心窗与裂缝页也可作辅色参考。', max_length=48),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 5.2.14 on 2026-05-11 10:27
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('journal', '0002_expand_nepal_art_style_length'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='config',
|
||||
name='netease_player_url',
|
||||
field=models.URLField(blank=True, help_text='网易云「外链播放器」生成的地址,须以 https://music.163.com/ 开头。留空则不显示播放器。', max_length=512),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='config',
|
||||
name='together_since',
|
||||
field=models.DateTimeField(blank=True, help_text='用于首页「我们在一起多少天多少秒」的起点(建议为正式在一起的时刻,含时区)。', null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='config',
|
||||
name='bgm_enabled',
|
||||
field=models.BooleanField(default=True, help_text='是否展示顶部音乐区(网易云 iframe)。'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='config',
|
||||
name='unlock_at',
|
||||
field=models.DateTimeField(blank=True, help_text='已弃用:前端不再按此锁定章节,可留空。', null=True),
|
||||
),
|
||||
]
|
||||
18
backend/journal/migrations/0004_netease_player_textfield.py
Normal file
18
backend/journal/migrations/0004_netease_player_textfield.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.14 on 2026-05-11 10:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('journal', '0003_config_together_netease_unlock_nullable'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='config',
|
||||
name='netease_player_url',
|
||||
field=models.TextField(blank=True, help_text='粘贴网易云外链播放器的整段 <iframe …>,或只粘贴 src 里的链接(支持 //music.163.com/…)。留空则不显示播放器。'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
# Generated by Django 5.2.14 on 2026-05-11 11:05
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('journal', '0004_netease_player_textfield'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='config',
|
||||
name='netease_player_url',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='config',
|
||||
name='bgm_enabled',
|
||||
field=models.BooleanField(default=True, help_text='是否展示顶部音乐区(播放器地址在前端环境变量 VITE_NETEASE_PLAYER_SRC 配置)。'),
|
||||
),
|
||||
]
|
||||
28
backend/journal/migrations/0006_memory_photo.py
Normal file
28
backend/journal/migrations/0006_memory_photo.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 5.2.14 on 2026-05-11 11:29
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('journal', '0005_remove_netease_from_config'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='MemoryPhoto',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('image', models.ImageField(upload_to='memory_photos/')),
|
||||
('sort_order', models.PositiveSmallIntegerField(default=0, help_text='数字越小越靠前(排在主图之后)。')),
|
||||
('memory', models.ForeignKey(help_text='所属故事页', on_delete=django.db.models.deletion.CASCADE, related_name='photos', to='journal.memory')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '附加照片',
|
||||
'verbose_name_plural': '附加照片',
|
||||
'ordering': ['sort_order', 'id'],
|
||||
},
|
||||
),
|
||||
]
|
||||
0
backend/journal/migrations/__init__.py
Normal file
0
backend/journal/migrations/__init__.py
Normal file
Reference in New Issue
Block a user