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


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


@DB
class SeckillDQ(DataSQLQuery):
        model = Seckill
        data_model = SeckillDB
