Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Owo Sugiana / sismiop-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
  • sismiop-models
  • sismiop
  • models
  • propinsi.py
  • Owo Sugiana's avatar
    Penambahan modul serang_kab · 1aea8b9b
    Owo Sugiana committed Aug 31, 2020
    1aea8b9b
propinsi.py 388 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
from sqlalchemy import (
    Column,
    String,
    )
from sqlalchemy.ext.declarative import declared_attr


class PropinsiMixin:
    @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))