Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-bphtb-models
This project
Loading...
Sign in
Toggle navigation
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
Commit fb375ce2
authored
May 27, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Perbaikan db schema tasik_kabupaten
1 parent
60ffe639
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
3 deletions
CHANGES.txt
opensipkd/bphtb/tangerang_kabupaten/services.py
opensipkd/bphtb/tasik_kabupaten/models.py
opensipkd/bphtb/tasik_kabupaten/services.py
CHANGES.txt
View file @
fb375ce
0.2.1 2020-05-
18
0.2.1 2020-05-
27
----------------
- Tidak perlu lagi tabel bphtb_config karena opsi Invoice ID 16 digit juga
tidak ada.
...
...
opensipkd/bphtb/tangerang_kabupaten/services.py
View file @
fb375ce
...
...
@@ -27,6 +27,10 @@ from .models import (
DBSession
=
None
# override, please
def
get_db_session
():
return
DBSession
class
Common
:
def
__init__
(
self
,
invoice_id
):
self
.
invoice_id
=
invoice_id
...
...
opensipkd/bphtb/tasik_kabupaten/models.py
View file @
fb375ce
...
...
@@ -16,6 +16,7 @@ class Provinsi(Base):
__tablename__
=
'ref_propinsi'
kd_propinsi
=
Column
(
String
(
2
),
primary_key
=
True
)
nm_propinsi
=
Column
(
String
(
30
),
nullable
=
False
)
__table_args__
=
dict
(
schema
=
'bphtb'
)
class
Kabupaten
(
Base
):
...
...
@@ -24,6 +25,7 @@ class Kabupaten(Base):
String
(
2
),
ForeignKey
(
Provinsi
.
kd_propinsi
),
primary_key
=
True
)
kd_dati2
=
Column
(
String
(
2
),
primary_key
=
True
)
nm_dati2
=
Column
(
String
(
30
),
nullable
=
False
)
__table_args__
=
dict
(
schema
=
'bphtb'
)
class
Kecamatan
(
Base
):
...
...
@@ -35,7 +37,8 @@ class Kecamatan(Base):
__table_args__
=
(
ForeignKeyConstraint
([
kd_propinsi
,
kd_dati2
],
[
Kabupaten
.
kd_propinsi
,
Kabupaten
.
kd_dati2
]),)
[
Kabupaten
.
kd_propinsi
,
Kabupaten
.
kd_dati2
]),
dict
(
schema
=
'bphtb'
))
class
Kelurahan
(
Base
):
...
...
@@ -52,4 +55,5 @@ class Kelurahan(Base):
ForeignKeyConstraint
(
[
kd_propinsi
,
kd_dati2
,
kd_kecamatan
],
[
Kecamatan
.
kd_propinsi
,
Kecamatan
.
kd_dati2
,
Kecamatan
.
kd_kecamatan
]),)
Kecamatan
.
kd_kecamatan
]),
dict
(
schema
=
'bphtb'
))
opensipkd/bphtb/tasik_kabupaten/services.py
View file @
fb375ce
...
...
@@ -12,6 +12,10 @@ from .models import (
DBSession
=
None
# override, please
def
get_db_session
():
return
DBSession
class
Inquiry
(
BaseInquiry
):
def
get_db_session
(
self
):
return
DBSession
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment