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


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


@DB
class StockAlertDQ(DataSQLQuery):
        model = StockAlert
        data_model = StockAlertDB
