from odoo import models, fields


class EncoachOtp(models.Model):
    _name = 'encoach.otp'
    _description = 'OTP Verification Record'

    email = fields.Char(required=True, index=True)
    otp_hash = fields.Char(required=True)
    expires_at = fields.Datetime(required=True)
    used = fields.Boolean(default=False)
    resend_count = fields.Integer(default=0)
    created_at = fields.Datetime(default=fields.Datetime.now)
