# -*- coding: UTF-8 -*-
import json

from django.core.management import BaseCommand

from qa.models import Answer
from gm_types.mimas import CONTENT_CLASS

class Command(BaseCommand):
    def handle(self, *args, **kwargs):
        Answer.objects.filter(is_online=True).update(level=CONTENT_CLASS.GENERAL)
        Answer.objects.filter(is_recommend=True).update(level=CONTENT_CLASS.FINE)
        Answer.objects.filter(is_online=False).update(level=CONTENT_CLASS.ILLEGAL)
        print('done')

