Skip to content

Commit

Permalink
chore(docs): adding docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuefii committed Aug 24, 2024
1 parent 30dde5e commit 7af9a07
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ class Districts(db.Model):


class Villages(db.Model):
"""
Model untuk table "villages" dalam database.
Attributes:
code (str): Code Unique untuk Desa (primary key).
district_code (str): Kode Kecamatan yang merupakan foreign key dari tabel "districts".
name (str): Nama Desa yang tidak boleh kosong.
"""

code = db.Column(db.String(13), primary_key=True)
district_code = db.Column(
db.String(8), db.ForeignKey("districts.code"), nullable=False
Expand Down

0 comments on commit 7af9a07

Please sign in to comment.