oth_ref.py 1.36 KB
import sys
from datetime import datetime
from sqlalchemy import (
    Column,
    Integer,
    BigInteger,
    Float,
    Text,
    DateTime,
    ForeignKey,
    UniqueConstraint,
    String,
    SmallInteger,
    types,
    func,
    ForeignKeyConstraint,
    literal_column,
    and_
    )
from sqlalchemy.orm import aliased

from sqlalchemy.orm.exc import NoResultFound

from sqlalchemy.orm import (
    relationship,
    backref,
    )
import re
from .tools import as_timezone
# from ..models import NamaModel, DefaultModel, DBSession, Base
ARGS = {'extend_existing': True, 'schema': 'public'}
# class PbbPelayanan(Base, NamaModel):
    # __tablename__ = 'pbb_pelayanan'
    # kode = Column(String(2))
    # nama = Column(String(50))
    # __table_args__ = (ARGS)
    # @classmethod
    # def query_kode(kode):
        # return cls.query().filter_by(kode=kode)
        
# class PbbSyarat(Base, NamaModel):
    # __tablename__ = 'pbb_syarat'
    # kode = Column(String(2))
    # nama = Column(String(50))
    # __table_args__ = (ARGS)
    # @classmethod
    # def query_kode(kode):
        # return cls.query().filter_by(kode=kode)

# class PbbSyaratPelayanan(Base, DefaultModel):
    # __tablename__ = 'pbb_syarat_pelayanan'
    # pelayanan_id = Column(Integer, ForeignKey(PbbPelayanan.id))
    # syarat_id = Column(Integer, ForeignKey(PbbSyarat.id))
    # __table_args__ = (ARGS)