m-new"> 18
+            field=models.CharField(choices=[('SONY', '索尼'), ('FUJIFILM', '富士'), ('CANON', '佳能'), ('NIKON', '尼康')], default='SONY', help_text='镜头卡口', max_length=32, verbose_name='model_mount'),
19
+        ),
20
+        migrations.AlterField(
21
+            model_name='modelinfo',
22
+            name='image',
23
+            field=models.ImageField(blank=True, help_text='横图', null=True, upload_to=django_models_ext.fileext.upload_path, verbose_name='image'),
24
+        ),
25
+        migrations.AlterField(
26
+            model_name='modelinfo',
27
+            name='image2',
28
+            field=models.ImageField(blank=True, help_text='方图', null=True, upload_to=django_models_ext.fileext.upload_path, verbose_name='image2'),
29
+        ),
30
+    ]

+ 12 - 3
mch/models.py

@@ -147,6 +147,13 @@ class BrandInfo(BaseModelMixin):
147 147
 
148 148
 
149 149
 class ModelInfo(BaseModelMixin):
150
+    MOUNT_TUPLE = (
151
+        ('SONY', u'索尼'),
152
+        ('FUJIFILM', u'富士'),
153
+        ('CANON', u'佳能'),
154
+        ('NIKON', u'尼康'),
155
+    )
156
+    
150 157
     brand_id = models.CharField(_(u'brand_id'), max_length=32, blank=True, null=True, help_text=u'品牌唯一标识', db_index=True)
151 158
     brand_name = models.CharField(_(u'brand_name'), max_length=255, blank=True, null=True, help_text=u'品牌名称')
152 159
 
@@ -157,14 +164,15 @@ class ModelInfo(BaseModelMixin):
157 164
     model_uni_name = models.CharField(_(u'model_uni_name'), max_length=32, blank=True, null=True, help_text=u'型号统一名称')
158 165
     model_full_name = models.CharField(_(u'model_full_name'), max_length=255, blank=True, null=True, help_text=u'型号全名称')
159 166
     model_descr = models.TextField(_(u'model_descr'), max_length=255, blank=True, null=True, help_text=u'型号描述')
167
+    model_mount = models.CharField(_(u'model_mount'), max_length=32, choices=MOUNT_TUPLE, default='SONY', help_text=u'镜头卡口')
160 168
 
161 169
     category = models.CharField(_(u'category'), max_length=32, blank=True, null=True, help_text=u'型号类别', db_index=True)
162 170
     warehouse = models.CharField(_(u'warehouse'), max_length=32, blank=True, null=True, help_text=u'所属仓库', db_index=True)
163 171
 
164
-    image = models.ImageField(_(u'image'), upload_to=upload_path, blank=True, null=True, help_text=u'图片')
172
+    image = models.ImageField(_(u'image'), upload_to=upload_path, blank=True, null=True, help_text=u'横图')
165 173
     url = models.CharField(_(u'url'), max_length=255, blank=True, null=True, help_text=u'链接')
166 174
 
167
-    image2 = models.ImageField(_(u'image2'), upload_to=upload_path, blank=True, null=True, help_text=u'图片2')
175
+    image2 = models.ImageField(_(u'image2'), upload_to=upload_path, blank=True, null=True, help_text=u'方图')
168 176
 
169 177
     factory_yuan = models.FloatField(_(u'factory_yuan'), default=1000, help_text=u'出厂价(元)')
170 178
     factory_fee = models.IntegerField(_(u'factory_fee'), default=100000, help_text=u'出厂价(分)')
@@ -267,7 +275,7 @@ class ModelInfo(BaseModelMixin):
267 275
         return {
268 276
             'shot_id': self.model_id,
269 277
             'shot_name': self.shot_member_name,
270
-            'shot_image': self.shot_member_image_url,
278
+            'shot_image': self.image2_url,
271 279
             'integral': self.shot_member_integral,
272 280
         }
273 281
 
@@ -282,6 +290,7 @@ class ModelInfo(BaseModelMixin):
282 290
             'model_uni_name': self.model_uni_name,
283 291
             'model_full_name': self.model_full_name,
284 292
             'model_desc': self.model_descr,
293
+            'model_mount': self.model_mount,
285 294
             'shot_type': self.shot_type_id,
286 295
             'shot_name': self.shot_member_name,
287 296
             'shot_type_name': shot_type.shot_type_name

Pai2/pai2 - Gogs: Go Git Service

8 次代碼提交 (102152ca4ac496ec989ebe2eb5dc5684ad4c53de)

作者 SHA1 備註 提交日期
  Brightcells 102152ca4a add api lensman_photo_bought & modify api wx_order_create_api and adjust return field 10 年之前
  Brightcells 98f968c53c add api lesman_photo_price/wx_order_list_api/wx_order_detail_api 10 年之前
  Brightcells 0f425ae151 add api wx_order_query_api 10 年之前
  Brightcells 3586c96fbb Fix Bug: duplicate thumbup should not increase thumbup_num 10 年之前
  Brightcells 537bd9bd41 add api group_quit_api 10 年之前
  Brightcells 454f8cd8ec change some info store in redis & remove some unnecessary params check & add some return for some api 10 年之前
  Brightcells 78e4e238a7 GroupUserInfo.user_status == GroupUserInfo.DELETED & error status code 10 年之前
  Brightcells 7d85bed0b0 move errno_utils.py/response_utils.py into error file 10 年之前