XH_Digital_Management/application/ops_tbl/models.py

19 lines
724 B
Python
Raw Normal View History

from django.db import models
class DepartmentExpense(models.Model):
primary_department = models.CharField(max_length=255)
year_month = models.CharField(max_length=7)
expense_type = models.CharField(max_length=255)
expense_detail = models.CharField(max_length=255)
budget_limit = models.DecimalField(max_digits=15, decimal_places=2)
reimbursed_amount = models.DecimalField(max_digits=15, decimal_places=2)
available_budget = models.DecimalField(max_digits=15, decimal_places=2)
class Meta:
verbose_name = '各部门费用情况'
verbose_name_plural = verbose_name
def __str__(self):
return f"{self.primary_department} - {self.year_month} - {self.expense_type}"