from odoo import fields, models


class TierRoutingMailbox(models.Model):
    _name = 'tier.routing.mailbox'
    _description = 'Mailbox Routing Rule'

    model_id = fields.Many2one(
        'ir.model',
        string='Model',
        required=True,
        ondelete='cascade',
    )
    mailbox_ids = fields.Many2many(
        'tier.mailbox',
        string='Target Mailboxes',
    )
    priority = fields.Integer(
        string='Priority',
        default=10,
    )
