nes-num-old"> 21
+            name='coverImgUrl',
22
+            field=models.CharField(blank=True, db_index=True, help_text='微信mediaID', max_length=255, verbose_name='coverImgUrl'),
23
+        ),
24
+        migrations.AlterField(
25
+            model_name='livegoodsinfo',
26
+            name='goods_img',
27
+            field=models.FileField(blank=True, help_text='商品图', upload_to=django_models_ext.fileext.upload_path, verbose_name='goods_img'),
28
+        ),
29
+    ]

+ 5 - 4
live/models.py

@@ -120,10 +120,11 @@ class liveGoodsInfo(BaseModelMixin):
120 120
     goods_id = ShortUUIDField(_('goods_id'), max_length=32, blank=True, help_text='商品ID', unique=True)
121 121
 
122 122
     wx_goods_id = models.CharField(_('wx_goods_id'), max_length=255, blank=True, help_text='微信商品ID', db_index=True)
123
-    audit_id = models.CharField(_('anchor_name'), max_length=255, blank=True, help_text='审核单ID', db_index=True)
123
+    audit_id = models.CharField(_('audit_id'), default=0, max_length=255, blank=True, help_text='审核单ID', db_index=True)
124
+    # 商品状态,0:未审核。1:审核中,2:审核通过,3:审核驳回
124 125
     audit_status = models.IntegerField(_('audit_status'), default=0, blank=True, help_text='审核状态', db_index=True)
125 126
 
126
-    goods_img = models.ImageField(_('goods_img'), upload_to=upload_path, help_text='商品图')
127
+    goods_img = models.FileField(_('goods_img'), upload_to=upload_path, blank=True, help_text='商品图')
127 128
 
128 129
     # {
129 130
     #   "goodsInfo": {
@@ -135,7 +136,7 @@ class liveGoodsInfo(BaseModelMixin):
135 136
     #   "url":"pages/index/index"
136 137
     #   }
137 138
     # }
138
-    coverImgUrl = models.CharField(_('anchor_name'), max_length=255, blank=True, help_text='微信mediaID', db_index=True)
139
+    coverImgUrl = models.CharField(_('coverImgUrl'), max_length=255, blank=True, help_text='微信mediaID', db_index=True)
139 140
     name = models.CharField(_('name'), max_length=34, help_text='商品', blank=True, db_index=True)
140 141
 
141 142
     # 价格类型,1:一口价,2:价格区间,3:显示折扣价;1:一口价,只需要传入price,price2不传;2:价格区间,price字段为左边界,price2字段为右边界,price和price2必传。3:折扣价,price字段为原价,price2字段为现价, price和price2必传
@@ -169,7 +170,7 @@ class liveGoodsInfo(BaseModelMixin):
169 170
             'goods_img': self.goods_img_url,
170 171
             'name': self.name,
171 172
             'coverImgUrl': self.coverImgUrl,
172
-            'price_type': self.price,
173
+            'price_type': self.price_type,
173 174
             'price': self.price,
174 175
             'price2': self.price2,
175 176
             'url': self.url

adminSystem - Gogs: Go Git Service

Geen omschrijving

LICENSE 765B

    The ISC License Copyright (c) Isaac Z. Schlueter and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.