from odoo import models, fields


class EncoachSpeakingCard(models.Model):
    _name = 'encoach.speaking.card'
    _description = 'Speaking Cue Card'

    part = fields.Integer(required=True)
    topic = fields.Char(size=200, required=True)
    questions = fields.Text()
    bullet_points = fields.Text()
    linked_card_id = fields.Many2one('encoach.speaking.card', ondelete='set null')
    rubric_id = fields.Many2one('encoach.rubric', ondelete='set null')
    difficulty = fields.Selection([
        ('easy', 'Easy'),
        ('medium', 'Medium'),
        ('hard', 'Hard'),
    ], required=True)
    model_response = fields.Text()
    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()
