34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
![]() |
# Generated by Django 5.2 on 2025-05-13 09:47
|
||
|
|
||
|
import django.db.models.deletion
|
||
|
import uuid
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('accounts', '0004_delete_usergoal'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='UserGoal',
|
||
|
fields=[
|
||
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||
|
('description', models.TextField(verbose_name='目标描述')),
|
||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||
|
('updated_at', models.DateTimeField(auto_now=True)),
|
||
|
('is_active', models.BooleanField(default=True, verbose_name='是否激活')),
|
||
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='goals', to=settings.AUTH_USER_MODEL)),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': '用户目标',
|
||
|
'verbose_name_plural': '用户目标',
|
||
|
'db_table': 'user_goals',
|
||
|
'ordering': ['-updated_at'],
|
||
|
},
|
||
|
),
|
||
|
]
|