Files
Django/users/migrations/0005_dashou_zengsong_huiyuan.py
XingQue cb89720260 feat: 打手赠送会员(免费接单)独立表与抢单资格
新增 dashou_zengsong_huiyuan,与购买会员分离;抢单/抢单池认赠送有效会员;后台送/改期/移除接口,送时积分非10则改为10并写操作日志。

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

34 lines
1.5 KiB
Python

from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0004_user_shangjia_youzhi'),
]
operations = [
migrations.CreateModel(
name='DashouZengsongHuiyuan',
fields=[
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='记录ID')),
('yonghu_id', models.CharField(db_index=True, max_length=7, verbose_name='打手用户ID')),
('huiyuan_id', models.CharField(db_index=True, max_length=6, verbose_name='会员ID')),
('daoqi_time', models.DateTimeField(db_index=True, verbose_name='到期时间')),
('song_ren', models.CharField(max_length=30, verbose_name='赠送人账号')),
('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='赠送时间')),
('UpdateTime', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
],
options={
'verbose_name': '打手赠送会员',
'verbose_name_plural': '打手赠送会员',
'db_table': 'dashou_zengsong_huiyuan',
'indexes': [
models.Index(fields=['yonghu_id', 'huiyuan_id'], name='dashou_zeng_yonghu__7a1c01_idx'),
models.Index(fields=['yonghu_id', 'daoqi_time'], name='dashou_zeng_yonghu__8b2d02_idx'),
],
'unique_together': {('yonghu_id', 'huiyuan_id')},
},
),
]