modeling details with properties based on detail type

When a user is trying to specify a particular detail of something, they are presented with a list of properties and options related to that detail. Each property has its own set of options, and the user must select one of these options to specify the detail they want. This ensures that the detail is accurately represented and meets the user’s specific needs for the detail.

Detail → Type (1) → Properties (N) → Options (N) The user needs to specify the option from properties.

class WorkshopDetail(models.Model):
    status = models.CharField(
        max_length=2, choices=WorkshopDetailStatus.choices, default=WorkshopDetailStatus.OPEN,
        help_text="product state"
    )
    type = models.ForeignKey(
        WorkshopType, null=True, on_delete=models.SET_NULL, related_name="workshop_details",
        help_text="product type"
    )

class WorkshopType(models.Model):
    name = models.CharField(
        max_length=32
    )
    properties = models.ManyToManyField(Property)

class Property(models.Model):
    name = models.CharField(max_length=16, unique=True)
    code = models.CharField(max_length=8, unique=True)
    options = models.ManyToManyField(Option)

class Option(models.Model):
    name = models.CharField(max_length=16, unique=True)
    code = models.CharField(max_length=8, unique=True)

How to specify the relationship of the selected option for the detail property?
How do I perform the query obtaining the selected option for the property of the detail?