# coding=utf-8
from django.core.management import BaseCommand
from api.models import Doctor
from maidan.models.setting import MaidanSetting


class Command(BaseCommand):
    def handle(self, *args, **kwargs):
        ids = [
            u'ID',
            u'aojianfei',
            u'baojing',
            u'cengang',
            u'chengang',
            u'chentiefu',
            u'chenxiaofang',
            u'9b560732167211e6992c00163e0051d4',
            u'chenchangyong',
            u'daili',
            u'dutaichao',
            u'aa8df5dc9eec11e5953300163e0051d4',
            u'47ee8be60ad311e6920300163e000a4a',
            u'08d3af4ab82b11e5954300163e000a4a',
            u'f8b9aa94b4e511e58f2000163e00062b',
            u'7a698eaafad311e583d000163e002cb6',
            u'leihua',
            u'lichang',
            u'liguojun',
            u'0ae37958f27511e5a84800163e002cb6',
            u'lianxiyan',
            u'liangweizhong',
            u'Drliuchang',
            u'DRliucheng',
            u'50f9ec92e04111e58c2c00163e00062b',
            u'd43c88f694ee11e5976500163e002fb3',
            u'liutun',
            u'c0b8eb4e2ba211e6ad2c00163e002fb3',
            u'shengan',
            u'songchunqiong',
            u'a133a470a39f11e5939a00163e00062b',
            u'DRsupeng',
            u'sunjianbin',
            u'tianhao',
            u'0b5d43e0dc3711e5814300163e000d0b',
            u'wangruiheng',
            u'xieyangchun',
            u'xuguang',
            u'xujianwei',
            u'xurongyang',
            u'xulianji',
            u'yubo',
            u'yuhongmin',
            u'DRyujiangang',
            u'yuxiaobo',
            u'zhaohongyi',
            u'zhaozuojun',
            u'zhengjuwei',
            u'zhengyongsheng',
            u'zhengzongmei',
            u'zhouchangqing'
        ]
        for doctor in Doctor.objects.all():
            s, _ = MaidanSetting.objects.get_or_create(doctor=doctor)
            if doctor.id in ids:
                s.discount_rate = 40
            else:
                s.discount_rate = 10
            s.save()
