first model draft
This commit is contained in:
parent
ee10df4cd0
commit
b9dc545ebb
@ -1,3 +1,29 @@
|
||||
from django.db import models
|
||||
from django.db.models import Model, CharField, ForeignKey, TextChoices, PROTECT
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class FinancialPosition(Model):
|
||||
|
||||
class FinStmt(TextChoices):
|
||||
BS = 'BS', _("Balance Sheet")
|
||||
IS = 'IS', _("Income Statement")
|
||||
CF = 'CF', _("Cash Flow Statement")
|
||||
|
||||
financial_statement = CharField(
|
||||
max_length=2,
|
||||
db_index=True,
|
||||
choices=FinStmt.choices,
|
||||
verbose_name=_("Financial statement")
|
||||
)
|
||||
name = CharField(
|
||||
max_length=255,
|
||||
db_index=True,
|
||||
verbose_name=_("Position name")
|
||||
)
|
||||
parent = ForeignKey(
|
||||
to='self',
|
||||
on_delete=PROTECT,
|
||||
null=True,
|
||||
blank=True,
|
||||
verbose_name=_("Parent position")
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user