Initial commit from monorepo

This commit is contained in:
Ruslan Bakiev
2026-01-07 09:12:35 +07:00
commit 5a5186732b
53 changed files with 3347 additions and 0 deletions

41
suppliers/models.py Normal file
View File

@@ -0,0 +1,41 @@
from django.db import models
import uuid
class SupplierProfile(models.Model):
"""Профиль поставщика на бирже - витринные данные для marketplace.
Первоисточник данных о поставщике - Team (team_type=SELLER).
Этот профиль содержит только витринную информацию для отображения на бирже.
"""
uuid = models.CharField(max_length=100, unique=True, default=uuid.uuid4)
team_uuid = models.CharField(max_length=100, unique=True) # Связь с Team
name = models.CharField(max_length=255)
description = models.TextField(blank=True, default='')
country = models.CharField(max_length=100, blank=True, default='')
country_code = models.CharField(max_length=3, blank=True, default='')
logo_url = models.URLField(blank=True, default='')
# Координаты для карты
latitude = models.FloatField(null=True, blank=True)
longitude = models.FloatField(null=True, blank=True)
is_verified = models.BooleanField(default=False)
is_active = models.BooleanField(default=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
class Meta:
db_table = 'suppliers' # Сохраняем имя таблицы для совместимости
ordering = ['name']
verbose_name = 'Supplier Profile'
verbose_name_plural = 'Supplier Profiles'
def __str__(self):
return f"{self.name} ({self.country})"
# Alias for backwards compatibility
Supplier = SupplierProfile