from odoo import models, fields


class EncoachExamStructure(models.Model):
    _name = 'encoach.exam.structure'
    _description = 'Reusable Exam Structure'
    _order = 'create_date desc'

    name = fields.Char(size=200, required=True)
    entity_id = fields.Many2one('encoach.entity', ondelete='set null')
    industry = fields.Char(size=100)
    modules = fields.Text(help='JSON list of module keys, e.g. ["reading","listening"]')
    config = fields.Text(help='JSON config: timer, difficulty, passage counts per module')
    active = fields.Boolean(default=True)
