from odoo import fields, models, api


class EducationPeriod(models.Model):
    _name = 'education.period'
    _description = 'Education Period'
    _order = 'id desc'

    name = fields.Char(string="Name", required=True)
    start_date = fields.Date(string='Period Start Date', required=True)
    end_date = fields.Date(string='Period End Date', required=True)
    education_level_ids = fields.Many2many('education.level', string='Education Levels')
    education_entity_ids = fields.Many2many(
        "res.partner", domain="[('is_education_entity','=',True)]", string='Education Entities')
