Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Owo Sugiana / opensipkd-bphtb-models

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • opensipkd-bphtb-models
  • opensipkd
  • bphtb
  • models
  • provinsi.py
  • Owo Sugiana's avatar
    Penyesuaian untuk Kabupaten Cirebon · 14d4255c
    Owo Sugiana committed Nov 15, 2020
    14d4255c Browse Files
provinsi.py 472 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
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')