from odoo import fields, models


class TierMailboxTag(models.Model):
    _name = 'tier.mailbox.tag'
    _description = 'Mailbox Tag (Message-Mailbox link)'
    _rec_name = 'mailbox_id'

    mailbox_id = fields.Many2one(
        'tier.mailbox',
        string='Mailbox',
        required=True,
        ondelete='cascade',
    )
    message_id = fields.Many2one(
        'mail.message',
        string='Message',
        required=True,
        ondelete='cascade',
    )
