from odoo import models, fields


class EncoachEntityLevelMapping(models.Model):
    _name = 'encoach.entity.level.mapping'
    _description = 'Entity Level Mapping'

    entity_id = fields.Many2one('encoach.entity', required=True, ondelete='cascade', index=True)
    min_score = fields.Float(required=True)
    max_score = fields.Float(required=True)
    internal_level_name = fields.Char(size=100, required=True)
    cefr_equivalent = fields.Selection([
        ('pre_a1', 'Pre-A1'), ('a1', 'A1'), ('a2', 'A2'),
        ('b1', 'B1'), ('b2', 'B2'), ('c1', 'C1'), ('c2', 'C2'),
    ])
