# -*- coding: UTF-8 -*-
import json
import datetime
from hippo.models import Doctor
from django.core.management import BaseCommand
from rpc.tool.queryset_tool import big_qs_iter

class Command(BaseCommand):
    """
    python manage.py update_20181114_fix_doctor_bad_data
    """
    def handle(self, *args, **options):
        last_edit_time = datetime.datetime.fromtimestamp(0)
        doctors = Doctor.objects.filter(last_edit_time__isnull=True)
        print('count: ',doctors.count())
        doctors.update(last_edit_time=last_edit_time)
        print('Done!')