# -*- coding: utf-8 -*-
from odoo import models, fields

class LimsAnalysisRange(models.Model):
    _name = 'lims.analysis.range'
    _description = 'Rangos de Referencia para Análisis Clínicos'

    analysis_id = fields.Many2one(
        'product.template', 
        string="Análisis",
        required=True,
        ondelete='cascade'
    )
    gender = fields.Selection([
        ('male', 'Masculino'),
        ('female', 'Femenino'),
        ('both', 'Ambos')
    ], string="Género", default='both')
    
    age_min = fields.Integer(string="Edad Mínima", default=0)
    age_max = fields.Integer(string="Edad Máxima", default=99)
    
    min_value = fields.Float(string="Valor Mínimo")
    max_value = fields.Float(string="Valor Máximo")
    
    unit_of_measure = fields.Char(string="Unidad de Medida")
