34 lines
1.4 KiB
Python
34 lines
1.4 KiB
Python
# Generated by Django 4.2.27 on 2026-01-27 07:39
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Notification',
|
|
fields=[
|
|
('id', models.AutoField(primary_key=True, serialize=False)),
|
|
('type', models.CharField(choices=[('bounty_accepted', '悬赏被接受'), ('bounty_completed', '悬赏已完成'), ('new_comment', '新评论'), ('payment_received', '收到付款'), ('system', '系统通知')], max_length=30, verbose_name='类型')),
|
|
('title', models.CharField(max_length=200, verbose_name='标题')),
|
|
('content', models.TextField(blank=True, null=True, verbose_name='内容')),
|
|
('related_id', models.IntegerField(blank=True, null=True, verbose_name='关联ID')),
|
|
('related_type', models.CharField(blank=True, max_length=50, null=True, verbose_name='关联类型')),
|
|
('is_read', models.BooleanField(default=False, verbose_name='是否已读')),
|
|
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
|
|
],
|
|
options={
|
|
'verbose_name': '通知',
|
|
'verbose_name_plural': '通知',
|
|
'db_table': 'notifications',
|
|
'ordering': ['-created_at'],
|
|
},
|
|
),
|
|
]
|