Source code for endoreg_db.models.other.distribution.base_value_distribution

from django.db import models

[docs] class BaseValueDistribution(models.Model): """ Abstract base class for value distributions. """ name = models.CharField(max_length=100)
[docs] class Meta: abstract = True
[docs] def generate_value(self): """ Generate a value based on the distribution rules. Must be implemented by subclasses. """ raise NotImplementedError("Subclasses must implement this method")
[docs] def natural_key(self): return (self.name,)