XH_Digital_Management/application/fin_tbl/models.py

23 lines
1.0 KiB
Python
Raw Normal View History

from django.db import models
class DepartmentOperations(models.Model):
department = models.CharField(max_length=255)
year_month = models.CharField(max_length=7)
current_month_revenue = models.DecimalField(max_digits=15, decimal_places=2)
current_month_new_revenue = models.DecimalField(max_digits=15, decimal_places=2)
current_month_existing_revenue = models.DecimalField(max_digits=15, decimal_places=2)
current_month_cost = models.DecimalField(max_digits=15, decimal_places=2)
gross_profit = models.DecimalField(max_digits=15, decimal_places=2)
taxes_and_surcharges = models.DecimalField(max_digits=15, decimal_places=2)
expenses = models.DecimalField(max_digits=15, decimal_places=2)
operating_profit = models.DecimalField(max_digits=15, decimal_places=2)
operational_cash_flow = models.DecimalField(max_digits=15, decimal_places=2)
class Meta:
verbose_name = '各一级部门经营情况'
verbose_name_plural = verbose_name
def __str__(self):
return f"{self.department} - {self.year_month}"