from odoo import models, fields


class EncoachAudioFile(models.Model):
    _name = 'encoach.audio.file'
    _description = 'Listening Audio File'

    exam_type = fields.Selection([
        ('academic', 'Academic'),
        ('general_training', 'General Training'),
        ('general_english', 'General English'),
    ], required=True)
    part = fields.Integer(required=True)
    context_type = fields.Selection([
        ('conversation', 'Conversation'),
        ('monologue', 'Monologue'),
    ], required=True)
    topic = fields.Char(size=200, required=True)
    audio_url = fields.Char(size=500, required=True)
    transcript = fields.Text()
    difficulty = fields.Selection([
        ('easy', 'Easy'),
        ('medium', 'Medium'),
        ('hard', 'Hard'),
    ], required=True)
    ai_generated = fields.Boolean(default=False)
    approved = fields.Boolean(default=False)
    ielts_certified = fields.Boolean(default=False)
    generation_brief = fields.Text()
    validation_errors = fields.Text()
