| @@ -0,0 +1,40 @@ | ||
| 1 | +# -*- coding: utf-8 -*- | |
| 2 | +# Generated by Django 1.11.3 on 2017-08-25 05:42 | |
| 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 | +        ('group', '0039_auto_20170821_1613'), | |
| 12 | + ] | |
| 13 | + | |
| 14 | + operations = [ | |
| 15 | + migrations.AlterField( | |
| 16 | + model_name='groupphotoorderinfo', | |
| 17 | + name='group_id', | |
| 18 | + 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'), | |
| 19 | + ), | |
| 20 | + migrations.AlterField( | |
| 21 | + model_name='groupphotoorderinfo', | |
| 22 | + name='lensman_photo_id', | |
| 23 | + 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=127, null=True, verbose_name='lensman_photo_id'), | |
| 24 | + ), | |
| 25 | + migrations.AlterField( | |
| 26 | + model_name='groupphotoorderinfo', | |
| 27 | + name='photo_id', | |
| 28 | + 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'), | |
| 29 | + ), | |
| 30 | + migrations.AlterField( | |
| 31 | + model_name='groupphotoorderinfo', | |
| 32 | + name='session_id', | |
| 33 | + 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'), | |
| 34 | + ), | |
| 35 | + migrations.AlterField( | |
| 36 | + model_name='groupphotoorderinfo', | |
| 37 | + name='user_id', | |
| 38 | + field=models.CharField(blank=True, db_index=True, help_text='\u7528\u6237\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='user_id'), | |
| 39 | + ), | |
| 40 | + ] | 
| @@ -0,0 +1,19 @@ | ||
| 1 | +# -*- coding: utf-8 -*- | |
| 2 | +# Generated by Django 1.11.3 on 2017-08-25 05:42 | |
| 3 | +from __future__ import unicode_literals | |
| 4 | + | |
| 5 | +from django.db import migrations | |
| 6 | + | |
| 7 | + | |
| 8 | +class Migration(migrations.Migration): | |
| 9 | + | |
| 10 | + dependencies = [ | |
| 11 | +        ('group', '0040_auto_20170825_1342'), | |
| 12 | + ] | |
| 13 | + | |
| 14 | + operations = [ | |
| 15 | + migrations.AlterUniqueTogether( | |
| 16 | + name='groupphotoorderinfo', | |
| 17 | +            unique_together=set([('group_id', 'session_id', 'user_id', 'photo_id', 'lensman_photo_id')]), | |
| 18 | + ), | |
| 19 | + ] | 
| @@ -330,11 +330,11 @@ class GroupPhotoInfo(CreateUpdateMixin): | ||
| 330 | 330 |  | 
| 331 | 331 |  | 
| 332 | 332 | class GroupPhotoOrderInfo(CreateUpdateMixin): | 
| 333 | - group_id = models.CharField(_(u'group_id'), max_length=255, blank=True, null=True, help_text=u'群组唯一标识', db_index=True) | |
| 334 | - session_id = models.CharField(_(u'session_id'), max_length=255, blank=True, null=True, help_text=u'照片组唯一标识,同 PhotosInfo 表', db_index=True) | |
| 335 | - user_id = models.CharField(_(u'user_id'), max_length=255, blank=True, null=True, help_text=u'用户唯一标识', db_index=True) | |
| 336 | - photo_id = models.CharField(_(u'photo_id'), max_length=255, blank=True, null=True, help_text=u'照片唯一标识', db_index=True) | |
| 337 | - lensman_photo_id = models.CharField(_(u'lensman_photo_id'), max_length=255, blank=True, null=True, help_text=u'摄影师照片唯一标识,同 PhotosInfo 表', db_index=True) | |
| 333 | + group_id = models.CharField(_(u'group_id'), max_length=32, blank=True, null=True, help_text=u'群组唯一标识', db_index=True) | |
| 334 | + session_id = models.CharField(_(u'session_id'), max_length=32, blank=True, null=True, help_text=u'照片组唯一标识,同 PhotosInfo 表', db_index=True) | |
| 335 | + user_id = models.CharField(_(u'user_id'), max_length=32, blank=True, null=True, help_text=u'用户唯一标识', db_index=True) | |
| 336 | + photo_id = models.CharField(_(u'photo_id'), max_length=32, blank=True, null=True, help_text=u'照片唯一标识', db_index=True) | |
| 337 | + lensman_photo_id = models.CharField(_(u'lensman_photo_id'), max_length=127, blank=True, null=True, help_text=u'摄影师照片唯一标识,同 PhotosInfo 表', db_index=True) | |
| 338 | 338 |  | 
| 339 | 339 | m_photo_path = models.CharField(_(u'm_photo_path'), max_length=255, blank=True, null=True, help_text=u'照片存放路径,Box上传,无水印') | 
| 340 | 340 | l_photo_path = models.CharField(_(u'l_photo_path'), max_length=255, blank=True, null=True, help_text=u'照片存放路径,美化大图') | 
| @@ -344,6 +344,8 @@ class GroupPhotoOrderInfo(CreateUpdateMixin): | ||
| 344 | 344 | verbose_name = _(u'groupphotoorderinfo') | 
| 345 | 345 | verbose_name_plural = _(u'groupphotoorderinfo') | 
| 346 | 346 |  | 
| 347 | +        unique_together = (('group_id', 'session_id', 'user_id', 'photo_id', 'lensman_photo_id'),) | |
| 348 | + | |
| 347 | 349 | def __unicode__(self): | 
| 348 | 350 | return unicode(self.pk) | 
| 349 | 351 |  |