Site/prices/models.py
2026-07-13 22:37:41 +03:00

15 lines
595 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from django.db import models
from django.urls import reverse
class PriceItem(models.Model):
name = models.CharField(max_length=255, verbose_name='Наименование услуги')
price = models.DecimalField(max_digits=10, decimal_places=2, verbose_name='Цена (₽)')
updated_at = models.DateTimeField(auto_now=True, verbose_name='Дата обновления')
class Meta:
verbose_name = 'Услуга'
verbose_name_plural = 'Прайс-лист'
ordering = ['name']
def __str__(self):
return f"{self.name} {self.price}"