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

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


class PeriodHospitalDB(DataBuilder):
    pass


@DB
class PeriodHospitalDQ(DataSQLQuery):
    model = PeriodHospital
    data_model = PeriodHospitalDB

    def filter_create_time(self, srch_key, srch_val, regex=False):
        return self._qry_time_range(srch_key, srch_val, regex)
