64 lines
1.7 KiB
Python
64 lines
1.7 KiB
Python
# from django.contrib.postgres.fields import JSONField
|
|
# from django.db import models
|
|
# from django.utils.translation import gettext_lazy as _
|
|
#
|
|
# from utils.models import BaseAttributes
|
|
#
|
|
#
|
|
# class ProductManager(models.Manager):
|
|
# """Product manager."""
|
|
#
|
|
#
|
|
# class ProductQuerySet(models.QuerySet):
|
|
# """Product queryset."""
|
|
#
|
|
#
|
|
# class Product(BaseAttributes):
|
|
# """Product models."""
|
|
# name = models.CharField(_('name'), max_length=255)
|
|
# country = models.ForeignKey('location.Country', on_delete=models.CASCADE)
|
|
# region = models.ForeignKey('location.Region', on_delete=models.CASCADE)
|
|
# # ASK: What is the "subregion"
|
|
#
|
|
# description = JSONField(_('description'))
|
|
# characteristics = JSONField(_('characteristics'))
|
|
# metadata_values = JSONField(_('metadata_values'))
|
|
# # common_relations_id
|
|
# # product_region_id
|
|
# code = models.CharField(_('code'), max_length=255)
|
|
# available = models.BooleanField(_('available'))
|
|
#
|
|
# # dealer_type
|
|
# # target_scope
|
|
# # target_type
|
|
# # rank
|
|
# # excluding_tax_unit_price
|
|
# # column_21
|
|
# # currencies_id
|
|
# # vintage
|
|
# # producer_price
|
|
# # producer_description
|
|
# # annual_produced_quantity
|
|
# # production_method_description
|
|
# # unit_name
|
|
# # unit
|
|
# # unit_values
|
|
# # organic_source
|
|
# # certificates
|
|
# # establishments_id
|
|
# # restrictions
|
|
# #
|
|
# objects = ProductManager.from_queryset(ProductQuerySet)()
|
|
#
|
|
# class Meta:
|
|
# verbose_name = _('product')
|
|
# verbose_name_plural = _('products')
|
|
#
|
|
#
|
|
# class ProductType(models.Model):
|
|
# """ProductType model."""
|
|
#
|
|
# class Meta:
|
|
# verbose_name_plural = _('product types')
|
|
# verbose_name = _('product type')
|