# coding=utf-8
from api.models import WikidetailAdver
from gm_dataquery.dataquery import DataSQLQuery, DataBuilder
from gm_dataquery.db import DB


class WikidetailAdverDB(DataBuilder):
    def getval_is_online(self, obj):
        return u'上线' if obj.is_online else u'下线'


@DB
class WikidetailAdverDQ(DataSQLQuery):
    model = WikidetailAdver
    data_model = WikidetailAdverDB

