tr class="add-code nl-3 ol-3"> 3
+from __future__ import unicode_literals
4
+
5
+from django.db import migrations, models
6
+
7
+
8
+class Migration(migrations.Migration):
9
+
10
+    dependencies = [
11
+        ('pay', '0010_auto_20180101_2220'),
12
+    ]
13
+
14
+    operations = [
15
+        migrations.AlterField(
16
+            model_name='orderinfo',
17
+            name='from_uid',
18
+            field=models.CharField(db_index=True, help_text='\u4ed8\u6b3e\u7528\u6237\u552f\u4e00\u6807\u8bc6', max_length=32, verbose_name='from_uid'),
19
+        ),
20
+        migrations.AlterField(
21
+            model_name='orderinfo',
22
+            name='group_id',
23
+            field=models.CharField(blank=True, db_index=True, help_text='\u7fa4\u7ec4\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='group_id'),
24
+        ),
25
+        migrations.AlterField(
26
+            model_name='orderinfo',
27
+            name='lensman_photo_id',
28
+            field=models.CharField(blank=True, db_index=True, help_text='\u6444\u5f71\u5e08\u7167\u7247\u552f\u4e00\u6807\u8bc6\uff0c\u540c PhotosInfo \u8868', max_length=32, null=True, verbose_name='lensman_photo_id'),
29
+        ),
30
+        migrations.AlterField(
31
+            model_name='orderinfo',
32
+            name='photo_id',
33
+            field=models.CharField(blank=True, db_index=True, help_text='\u98de\u56fe\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='photo_id'),
34
+        ),
35
+        migrations.AlterField(
36
+            model_name='orderinfo',
37
+            name='prepay_id',
38
+            field=models.CharField(blank=True, help_text='\u9884\u652f\u4ed8\u4ea4\u6613\u4f1a\u8bdd\u6807\u8bc6', max_length=64, null=True, verbose_name='prepay_id'),
39
+        ),
40
+        migrations.AlterField(
41
+            model_name='orderinfo',
42
+            name='session_id',
43
+            field=models.CharField(blank=True, db_index=True, help_text='\u7167\u7247\u7ec4\u552f\u4e00\u6807\u8bc6\uff0c\u540c PhotosInfo \u8868', max_length=32, null=True, verbose_name='session_id'),
44
+        ),
45
+        migrations.AlterField(
46
+            model_name='orderinfo',
47
+            name='to_uid',
48
+            field=models.CharField(blank=True, db_index=True, help_text='\u6536\u6b3e\u7528\u6237\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='to_uid'),
49
+        ),
50
+        migrations.AlterField(
51
+            model_name='orderinfo',
52
+            name='transaction_id',
53
+            field=models.CharField(blank=True, help_text='\u4ea4\u6613\u5355\u53f7', max_length=32, null=True, verbose_name='transaction_id'),
54
+        ),
55
+    ]

+ 9 - 9
pay/models.py

@@ -51,21 +51,21 @@ class OrderInfo(BaseModelMixin):
51 51
         # (DELETED, u'已删除'),
52 52
     )
53 53
 
54
-    order_id = ShortUUIDField(_(u'order_id'), max_length=255, help_text=u'订单唯一标识', db_index=True)
54
+    order_id = ShortUUIDField(_(u'order_id'), max_length=32, help_text=u'订单唯一标识', db_index=True)
55 55
 
56
-    prepay_id = models.CharField(_(u'prepay_id'), max_length=255, blank=True, null=True, help_text=u'预支付交易会话标识')
57
-    transaction_id = models.CharField(_(u'transaction_id'), max_length=255, blank=True, null=True, help_text=u'交易单号')
56
+    prepay_id = models.CharField(_(u'prepay_id'), max_length=64, blank=True, null=True, help_text=u'预支付交易会话标识')
57
+    transaction_id = models.CharField(_(u'transaction_id'), max_length=32, blank=True, null=True, help_text=u'交易单号')
58 58
 
59
-    group_id = models.CharField(_(u'group_id'), max_length=255, blank=True, null=True, help_text=u'群组唯一标识', db_index=True)
60
-    session_id = models.CharField(_(u'session_id'), max_length=255, blank=True, null=True, help_text=u'照片组唯一标识,同 PhotosInfo 表', db_index=True)
61
-    photo_id = models.CharField(_(u'photo_id'), max_length=255, blank=True, null=True, help_text=u'飞图唯一标识', db_index=True)
62
-    lensman_photo_id = models.CharField(_(u'lensman_photo_id'), max_length=255, blank=True, null=True, help_text=u'摄影师照片唯一标识,同 PhotosInfo 表', db_index=True)
59
+    group_id = models.CharField(_(u'group_id'), max_length=32, blank=True, null=True, help_text=u'群组唯一标识', db_index=True)
60
+    session_id = models.CharField(_(u'session_id'), max_length=32, blank=True, null=True, help_text=u'照片组唯一标识,同 PhotosInfo 表', db_index=True)
61
+    photo_id = models.CharField(_(u'photo_id'), max_length=32, blank=True, null=True, help_text=u'飞图唯一标识', db_index=True)
62
+    lensman_photo_id = models.CharField(_(u'lensman_photo_id'), max_length=32, blank=True, null=True, help_text=u'摄影师照片唯一标识,同 PhotosInfo 表', db_index=True)
63 63
 
64 64
     photo_type = models.IntegerField(_(u'photo_type'), choices=PHOTO_TYPE, default=NOMARK, help_text=u'购买照片类型', db_index=True)
65 65
     photo_status = models.IntegerField(_(u'photo_status'), choices=PHOTO_STATUS, default=WANTED, help_text=_(u'购买照片状态, 标识用户是否已经获得照片'), db_index=True)
66 66
 
67
-    from_uid = models.CharField(_(u'from_uid'), max_length=255, help_text=u'付款用户唯一标识', db_index=True)
68
-    to_uid = models.CharField(_(u'to_uid'), max_length=255, blank=True, null=True, help_text=u'收款用户唯一标识', db_index=True)
67
+    from_uid = models.CharField(_(u'from_uid'), max_length=32, help_text=u'付款用户唯一标识', db_index=True)
68
+    to_uid = models.CharField(_(u'to_uid'), max_length=32, blank=True, null=True, help_text=u'收款用户唯一标识', db_index=True)
69 69
 
70 70
     body = models.CharField(_(u'body'), max_length=255, blank=True, null=True, help_text=u'商品描述')
71 71
     total_fee = models.IntegerField(_(u'total_fee'), default=0, help_text=u'总金额')

+ 80 - 0
photo/migrations/0013_auto_20180103_0446.py

@@ -0,0 +1,80 @@
1
+# -*- coding: utf-8 -*-
2
+# Generated by Django 1.11.3 on 2018-01-02 20:46
3
+from __future__ import unicode_literals
4
+
5
+from django.db import migrations, models
6
+
7
+
8
+class Migration(migrations.Migration):
9
+
10
+    dependencies = [
11
+        ('photo', '0012_auto_20180101_2220'),
12
+    ]
13
+
14
+    operations = [
15
+        migrations.AlterField(
16
+            model_name='photosinfo',
17
+            name='l_photo_path',
18
+            field=models.CharField(blank=True, help_text='\u7167\u7247\u5b58\u653e\u8def\u5f84\uff0c\u7f8e\u5316\u5927\u56fe', max_length=32, null=True, verbose_name='l_photo_path'),
19
+        ),
20
+        migrations.AlterField(
21
+            model_name='photosinfo',
22
+            name='lensman_id',
23
+            field=models.CharField(blank=True, db_index=True, help_text='\u6444\u5f71\u5e08\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='lensman_id'),
24
+        ),
25
+        migrations.AlterField(
26
+            model_name='photosinfo',
27
+            name='m_photo_path',
28
+            field=models.CharField(blank=True, help_text='\u7167\u7247\u5b58\u653e\u8def\u5f84\uff0cBox\u4e0a\u4f20\uff0c\u65e0\u6c34\u5370', max_length=32, null=True, verbose_name='m_photo_path'),
29
+        ),
30
+        migrations.AlterField(
31
+            model_name='photosinfo',
32
+            name='p_photo_path',
33
+            field=models.CharField(blank=True, help_text='\u7167\u7247\u5b58\u653e\u8def\u5f84\uff0cBox\u4e0a\u4f20\uff0c\u6709\u6c34\u5370\uff0c\u670d\u52a1\u5668\u6dfb\u52a0', max_length=32, null=True, verbose_name='p_photo_path'),
34
+        ),
35
+        migrations.AlterField(
36
+            model_name='photosinfo',
37
+            name='photo_id',
38
+            field=models.CharField(blank=True, db_index=True, help_text='\u7167\u7247\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='photo_id'),
39
+        ),
40
+        migrations.AlterField(
41
+            model_name='photosinfo',
42
+            name='r_photo_path',
43
+            field=models.CharField(blank=True, help_text='\u7167\u7247\u5b58\u653e\u8def\u5f84\uff0c\u9ad8\u6e05\u5927\u56fe', max_length=32, null=True, verbose_name='r_photo_path'),
44
+        ),
45
+        migrations.AlterField(
46
+            model_name='photosinfo',
47
+            name='session_id',
48
+            field=models.CharField(blank=True, db_index=True, help_text='\u7167\u7247\u7ec4\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='session_id'),
49
+        ),
50
+        migrations.AlterField(
51
+            model_name='photouuidinfo',
52
+            name='photo_md5',
53
+            field=models.CharField(blank=True, db_index=True, help_text='\u7167\u7247\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, unique=True, verbose_name='photo_md5'),
54
+        ),
55
+        migrations.AlterField(
56
+            model_name='photouuidinfo',
57
+            name='photo_path',
58
+            field=models.CharField(blank=True, help_text='\u7167\u7247\u8def\u5f84', max_length=32, null=True, verbose_name='photo_path'),
59
+        ),
60
+        migrations.AlterField(
61
+            model_name='photouuidinfo',
62
+            name='photo_thumbnail2_path',
63
+            field=models.CharField(blank=True, help_text='\u7167\u7247\u7f29\u7565\u56fe\u5b58\u653e\u8def\u5f84', max_length=32, null=True, verbose_name='photo_thumbnail2_path'),
64
+        ),
65
+        migrations.AlterField(
66
+            model_name='photouuidinfo',
67
+            name='photo_thumbnail_path',
68
+            field=models.CharField(blank=True, help_text='\u7167\u7247\u7f29\u7565\u56fe\u5b58\u653e\u8def\u5f84', max_length=32, null=True, verbose_name='photo_thumbnail_path'),
69
+        ),
70
+        migrations.AlterField(
71
+            model_name='photouuidinfo',
72
+            name='photo_watermark_path',
73
+            field=models.CharField(blank=True, help_text='\u7167\u7247\u5b58\u653e\u8def\u5f84\uff0cBox\u4e0a\u4f20\uff0c\u6709\u6c34\u5370\uff0c\u670d\u52a1\u5668\u6dfb\u52a0', max_length=32, null=True, verbose_name='photo_watermark_path'),
74
+        ),
75
+        migrations.AlterField(
76
+            model_name='uuidinfo',
77
+            name='lensman_id',
78
+            field=models.CharField(blank=True, db_index=True, help_text='\u6444\u5f71\u5e08\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='lensman_id'),
79
+        ),
80
+    ]

+ 13 - 13
photo/models.py

@@ -9,7 +9,7 @@ from utils.qiniucdn import qiniu_file_url
9 9
 
10 10
 class UUIDInfo(BaseModelMixin):
11 11
     uuid = models.CharField(_(u'uuid'), max_length=22, blank=True, null=True, help_text=u'唯一标识', db_index=True, unique=True)
12
-    lensman_id = models.CharField(_(u'lensman_id'), max_length=255, blank=True, null=True, help_text=u'摄影师唯一标识', db_index=True)
12
+    lensman_id = models.CharField(_(u'lensman_id'), max_length=32, blank=True, null=True, help_text=u'摄影师唯一标识', db_index=True)
13 13
 
14 14
     class Meta:
15 15
         verbose_name = _('uuidinfo')
@@ -28,21 +28,21 @@ class UUIDInfo(BaseModelMixin):
28 28
 
29 29
 
30 30
 class PhotoUUIDInfo(BaseModelMixin):
31
-    photo_md5 = models.CharField(_(u'photo_md5'), max_length=255, blank=True, null=True, help_text=u'照片唯一标识', db_index=True, unique=True)
31
+    photo_md5 = models.CharField(_(u'photo_md5'), max_length=32, blank=True, null=True, help_text=u'照片唯一标识', db_index=True, unique=True)
32 32
 
33
-    photo_path = models.CharField(_(u'photo_path'), max_length=255, blank=True, null=True, help_text=u'照片路径')
33
+    photo_path = models.CharField(_(u'photo_path'), max_length=32, blank=True, null=True, help_text=u'照片路径')
34 34
     photo_w = models.IntegerField(_(u'photo_w'), default=0, help_text=u'照片宽度')
35 35
     photo_h = models.IntegerField(_(u'photo_h'), default=0, help_text=u'照片高度')
36 36
 
37
-    photo_watermark_path = models.CharField(_(u'photo_watermark_path'), max_length=255, blank=True, null=True, help_text=u'照片存放路径,Box上传,有水印,服务器添加')
37
+    photo_watermark_path = models.CharField(_(u'photo_watermark_path'), max_length=32, blank=True, null=True, help_text=u'照片存放路径,Box上传,有水印,服务器添加')
38 38
     photo_watermark_w = models.IntegerField(_(u'photo_watermark_w'), default=0, help_text=u'照片水印图宽度')
39 39
     photo_watermark_h = models.IntegerField(_(u'photo_watermark_h'), default=0, help_text=u'照片水印图高度')
40 40
 
41
-    photo_thumbnail_path = models.CharField(_(u'photo_thumbnail_path'), max_length=255, blank=True, null=True, help_text=u'照片缩略图存放路径')
41
+    photo_thumbnail_path = models.CharField(_(u'photo_thumbnail_path'), max_length=32, blank=True, null=True, help_text=u'照片缩略图存放路径')
42 42
     photo_thumbnail_w = models.IntegerField(_(u'photo_thumbnail_w'), default=0, help_text=u'照片缩略图宽度')
43 43
     photo_thumbnail_h = models.IntegerField(_(u'photo_thumbnail_h'), default=0, help_text=u'照片缩略图高度')
44 44
 
45
-    photo_thumbnail2_path = models.CharField(_(u'photo_thumbnail2_path'), max_length=255, blank=True, null=True, help_text=u'照片缩略图存放路径')
45
+    photo_thumbnail2_path = models.CharField(_(u'photo_thumbnail2_path'), max_length=32, blank=True, null=True, help_text=u'照片缩略图存放路径')
46 46
     photo_thumbnail2_w = models.IntegerField(_(u'photo_thumbnail2_w'), default=0, help_text=u'照片缩略图宽度')
47 47
     photo_thumbnail2_h = models.IntegerField(_(u'photo_thumbnail2_h'), default=0, help_text=u'照片缩略图高度')
48 48
 
@@ -55,13 +55,13 @@ class PhotoUUIDInfo(BaseModelMixin):
55 55
 
56 56
 
57 57
 class PhotosInfo(BaseModelMixin):
58
-    lensman_id = models.CharField(_(u'lensman_id'), max_length=255, blank=True, null=True, help_text=u'摄影师唯一标识', db_index=True)
59
-    session_id = models.CharField(_(u'session_id'), max_length=255, blank=True, null=True, help_text=u'照片组唯一标识', db_index=True)
60
-    photo_id = models.CharField(_(u'photo_id'), max_length=255, blank=True, null=True, help_text=u'照片唯一标识', db_index=True)
61
-    p_photo_path = models.CharField(_(u'p_photo_path'), max_length=255, blank=True, null=True, help_text=u'照片存放路径,Box上传,有水印,服务器添加')
62
-    m_photo_path = models.CharField(_(u'm_photo_path'), max_length=255, blank=True, null=True, help_text=u'照片存放路径,Box上传,无水印')
63
-    l_photo_path = models.CharField(_(u'l_photo_path'), max_length=255, blank=True, null=True, help_text=u'照片存放路径,美化大图')
64
-    r_photo_path = models.CharField(_(u'r_photo_path'), max_length=255, blank=True, null=True, help_text=u'照片存放路径,高清大图')
58
+    lensman_id = models.CharField(_(u'lensman_id'), max_length=32, blank=True, null=True, help_text=u'摄影师唯一标识', db_index=True)
59
+    session_id = models.CharField(_(u'session_id'), max_length=32, blank=True, null=True, help_text=u'照片组唯一标识', db_index=True)
60
+    photo_id = models.CharField(_(u'photo_id'), max_length=32, blank=True, null=True, help_text=u'照片唯一标识', db_index=True)
61
+    p_photo_path = models.CharField(_(u'p_photo_path'), max_length=32, blank=True, null=True, help_text=u'照片存放路径,Box上传,有水印,服务器添加')
62
+    m_photo_path = models.CharField(_(u'm_photo_path'), max_length=32, blank=True, null=True, help_text=u'照片存放路径,Box上传,无水印')
63
+    l_photo_path = models.CharField(_(u'l_photo_path'), max_length=32, blank=True, null=True, help_text=u'照片存放路径,美化大图')
64
+    r_photo_path = models.CharField(_(u'r_photo_path'), max_length=32, blank=True, null=True, help_text=u'照片存放路径,高清大图')
65 65
 
66 66
     class Meta:
67 67
         verbose_name = _('photosinfo')

+ 1 - 1
requirements.txt

@@ -38,7 +38,7 @@ pywe-pay-notify==1.0.1
38 38
 pywe-response==1.0.1
39 39
 pywe-sign==1.0.6
40 40
 pywe-xml==1.0.0
41
-qiniu==7.1.9
41
+qiniu==7.2.0
42 42
 redis==2.10.6
43 43
 redis-extensions==1.1.6
44 44
 requests==2.18.4

Kodo/kodo - Gogs: Go Git Service

1 次代碼提交 (c5d558d393b149e2a43a2d37a32cc3d292ce915f)

作者 SHA1 備註 提交日期
  Brightcells feebb32686 Add pc website 9 年之前