# coding=utf-8
from django.core.management import BaseCommand

from api.models import SimpleActionLog


class Command(BaseCommand):
    """
    同步美购申请线上日志  python manage.py deau_with_hear_log
    """

    def handle(self, *args, **options):
        SimpleActionLog.objects.filter(package=u'美购上线申请', action=u'审核通过').update(action_new=11, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购上线申请', action=u'驳回').update(action_new=12, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购上线申请', action=u'新建').update(action_new=1, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购上线申请', action=u'更新').update(action_new=2, package_new=5)

        SimpleActionLog.objects.filter(package=u'美购', action=u'更新').update(action_new=2, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'新建').update(action_new=1, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'创建多属性').update(action_new=1, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'修改多属性').update(action_new=2, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'删除多属性').update(action_new=3, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'创建多属性选项').update(action_new=1, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'修改多属性选项').update(action_new=2, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'删除多属性选项').update(action_new=3, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'保存多属性项目').update(action_new=1, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'修改顺序或是否上线').update(action_new=10, package_new=5)
        SimpleActionLog.objects.filter(package=u'美购', action=u'批量设置开始时间').update(action_new=2, package_new=5)
