# -*- coding: UTF-8 -*-

from django.db.models import Q
from gm_dataquery.dataquery import DataBuilder, DataSQLQuery
from gm_dataquery.db import DB

from api.models import PreBlackList


class PreBlackListDB(DataBuilder):
    def getval_tag_name(self, obj):
        return unicode(obj.tag)


@DB
class PreBlackListDQ(DataSQLQuery):
        model = PreBlackList
        data_model = PreBlackListDB
