from odoo import fields, models


class TierRoutingChannel(models.Model):
    _name = 'tier.routing.channel'
    _description = 'Channel Routing Rule'

    partner_id = fields.Many2one(
        'res.partner',
        string='Partner',
        required=True,
    )
    channel_tag_ids = fields.Many2many(
        'tier.channel.tag',
        string='Allowed Channels',
    )
    preferred_channel_tag_id = fields.Many2one(
        'tier.channel.tag',
        string='Preferred Channel',
    )
    priority = fields.Integer(
        string='Priority',
        default=10,
    )
