from odoo import models, fields


class EncoachGapProfile(models.Model):
    _name = 'encoach.gap.profile'
    _description = 'Student Gap Profile'

    student_id = fields.Many2one('res.users', required=True, ondelete='cascade', index=True)
    source_type = fields.Selection([
        ('placement', 'Placement'),
        ('exam', 'Exam'),
    ], required=True)
    source_id = fields.Integer()
    skill_gaps = fields.Text()
    question_type_weaknesses = fields.Text()
    topic_weaknesses = fields.Text()
    entity_id = fields.Many2one('encoach.entity', ondelete='set null')
    created_at = fields.Datetime(default=fields.Datetime.now)
