# -*- 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 ServiceMonitor


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


@DB
class ServiceMonitorDQ(DataSQLQuery):
        model = ServiceMonitor
        data_model = ServiceMonitorDB
