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

from gm_dataquery.dataquery import DataBuilder, DataSQLQuery
from api.models.advertise import WikiAdver
from gm_dataquery.db import DB


class WikiadverDB(DataBuilder):
    def getval_tag_name(self, obj):
        return obj.tag.name


@DB
class WikiadverDQ(DataSQLQuery):
    model = WikiAdver
    data_model = WikiadverDB
