from odoo import fields, models


class WooPricelistMap(models.Model):
    _name = 'woo.pricelist.map'
    _description = 'WooCommerce Pricelist Mapping'

    instance_id = fields.Many2one('woo.instance', required=True, ondelete='cascade')
    pricelist_id = fields.Many2one('product.pricelist', required=True)
    woo_role = fields.Char(required=True)
    woo_role_name = fields.Char()
    company_id = fields.Many2one(
        'res.company', required=True, default=lambda self: self.env.company,
    )
