add new model and change offer models

This commit is contained in:
behruz-dev
2025-08-20 13:19:55 +05:00
parent aa5ff56216
commit 4c3630aca2
17 changed files with 173 additions and 8 deletions

View File

@@ -0,0 +1 @@
from .conterparty import *

View File

@@ -0,0 +1,22 @@
from django.db import models
from core.apps.shared.models import BaseModel
from core.apps.accounts.models import User
class Counterparty(BaseModel):
name = models.CharField(max_length=200)
description = models.TextField(null=True, blank=True)
start_date = models.DateField()
status = models.CharField(
max_length=20, choices=[('active', 'active'), ('inactive', 'inactive')], default='active'
)
type = models.CharField(max_length=20, choices=[('supplier', 'supplier')])
person = models.ForeignKey(User, on_delete=models.CASCADE, related_name='counterparties')
def __str__(self):
return self.name
class Meta:
verbose_name = 'Kontragent'
verbose_name_plural = 'Kontragentlar'