# coding=utf-8
# coding=utf-8
import random

from django.core.management.base import BaseCommand

from doris.models import ServiceStat

query_list = [
    '双眼皮',
    '埋线',
    '瘦脸针',
    '丰胸',
    '玻尿酸',

]


class Command(BaseCommand):
    def handle(self, *args, **options):
        for x in range(10):
            query = query_list[random.randint(0, len(query_list) - 1)]
            ServiceStat.objects.create(
                    stat_date='20170328',
                    query=query,
                    service_id=random.randint(1, 100),
                    max_pv=random.randint(1, 10) * 100,
                    uv=random.randint(1, 10) * 100,
            )
