@@ -0,0 +1,20 @@ |
||
| 1 |
+# -*- coding: utf-8 -*- |
|
| 2 |
+# Generated by Django 3.2.16 on 2026-10-23 13:10 |
|
| 3 |
+ |
|
| 4 |
+from django.db import migrations |
|
| 5 |
+import jsonfield.fields |
|
| 6 |
+ |
|
| 7 |
+ |
|
| 8 |
+class Migration(migrations.Migration): |
|
| 9 |
+ |
|
| 10 |
+ dependencies = [ |
|
| 11 |
+ ('sales', '0010_lotterycampaigninfo_lotteryentryinfo'),
|
|
| 12 |
+ ] |
|
| 13 |
+ |
|
| 14 |
+ operations = [ |
|
| 15 |
+ migrations.AddField( |
|
| 16 |
+ model_name='lotterycampaigninfo', |
|
| 17 |
+ name='model_ids', |
|
| 18 |
+ field=jsonfield.fields.JSONField(blank=True, help_text='参与型号列表', null=True, verbose_name='model_ids'), |
|
| 19 |
+ ), |
|
| 20 |
+ ] |
@@ -5,6 +5,7 @@ from django.db import models |
||
| 5 | 5 |
from django.utils.translation import ugettext_lazy as _ |
| 6 | 6 |
from django_models_ext import BaseModelMixin, upload_file_url, upload_path |
| 7 | 7 |
from shortuuidfield import ShortUUIDField |
| 8 |
+from jsonfield import JSONField |
|
| 8 | 9 |
|
| 9 | 10 |
from datetime import datetime |
| 10 | 11 |
from django.utils import timezone |
@@ -177,6 +178,7 @@ class LotteryCampaignInfo(BaseModelMixin): |
||
| 177 | 178 |
start_at = models.DateTimeField(_(u'start_at'), blank=True, null=True, help_text=u'参与开始时间') |
| 178 | 179 |
end_at = models.DateTimeField(_(u'end_at'), blank=True, null=True, help_text=u'参与结束时间') |
| 179 | 180 |
draw_at = models.DateTimeField(_(u'draw_at'), blank=True, null=True, help_text=u'开奖时间', db_index=True) |
| 181 |
+ model_ids = JSONField(_(u'model_ids'), blank=True, null=True, help_text=u'参与型号列表') |
|
| 180 | 182 |
|
| 181 | 183 |
class Meta: |
| 182 | 184 |
verbose_name = _(u'抽奖活动') |