# -*- coding: utf-8 -*-
from odoo import models, fields, api
from datetime import datetime

class EmployeeDocument(models.Model):
    _name = 'employee.document'
    _description = 'Employee Document'

    name = fields.Char(string='Document Reference', required=True)
    employee_id = fields.Many2one('hr.employee', string='Employee', required=True)
    document_type = fields.Selection([
        ('offer_letter', 'Offer Letter'),
        ('contract', 'Contract'),
        ('id_proof', 'ID Proof'),
        ('other', 'Other'),
    ], string='Document Type', default='other', required=True)
    file = fields.Binary(string='File', required=True)
    file_name = fields.Char(string='File Name')
    upload_date = fields.Datetime(string='Upload Date', default=fields.Datetime.now)
