from odoo import fields, models


class DirectiveStage(models.Model):
    _name = "directive.stage"
    _description = "Directive Stage"
    _order = "id asc"

    name = fields.Char(string="Название статуса", required=True)
    code = fields.Char(string="Технический код", required=True, index=True)

    is_hidden = fields.Boolean(string="Скрыт в канбане", default=False)

    _sql_constraints = [
        ("directive_stage_code_uniq", "unique(code)", "Stage code must be unique."),
    ]
