aifeilong 38ec52abf5 Add STAR International API apps and wire production Postgres defaults.
Introduce content/cms/accounts modules with DRF routes, and point default DB settings at the official starintldb instance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 17:08:01 +08:00

40 lines
2.0 KiB
Python

# Generated by Django 5.2.8 on 2026-10-13 11:36
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='Member',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
('is_deleted', models.BooleanField(db_index=True, default=False, verbose_name='已删除')),
('name', models.CharField(max_length=200, verbose_name='姓名')),
('phone', models.CharField(blank=True, default='', max_length=32, verbose_name='手机号')),
('organize', models.CharField(blank=True, default='', max_length=200, verbose_name='单位')),
('is_vip', models.BooleanField(default=False, verbose_name='VIP')),
('last_login_at', models.DateTimeField(blank=True, null=True, verbose_name='最后登录')),
('is_disabled', models.BooleanField(default=False, verbose_name='禁用')),
('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='member_profile', to=settings.AUTH_USER_MODEL, verbose_name='登录账号')),
],
options={
'verbose_name': '前台用户',
'verbose_name_plural': '前台用户',
'ordering': ['-id'],
'constraints': [models.UniqueConstraint(condition=models.Q(('phone', ''), _negated=True), fields=('phone',), name='accounts_member_phone_unique')],
},
),
]