from odoo import fields, models


class WooCustomer(models.Model):
    _name = 'woo.customer'
    _description = 'WooCommerce Customer'

    instance_id = fields.Many2one('woo.instance', required=True, ondelete='cascade')
    partner_id = fields.Many2one('res.partner', required=True)
    woo_customer_id = fields.Integer(index=True)
    woo_email = fields.Char()
    last_synced = fields.Datetime()
    company_id = fields.Many2one(
        'res.company', required=True, default=lambda self: self.env.company,
    )
