provinsi.py
472 Bytes
from sqlalchemy import (
Column,
String,
)
from sqlalchemy.ext.declarative import declared_attr
class ProvinsiMixin:
@declared_attr
def __tablename__(self):
return 'ref_propinsi'
@declared_attr
def kd_propinsi(self):
return Column(String(2), primary_key=True)
@declared_attr
def nm_propinsi(self):
return Column(String(30))
@declared_attr
def __table_args__(self):
return dict(schema='pbb')