# -*- encoding: utf-8 -*-
# 项目：JDG-
# 模块名称：
# 描述：
# Copyright 2018 JDG <www.yunside.com>
# Created by wxh (xianhuo.weng@yunside.com) at  2019/11/19 - 9:07 AM

from odoo import fields, api, models

TYPE = [('digit', u'数字'),
        ('bool', u'布尔'),
        ('text', u'文本'),
        ('range', u'范围')]


class AbnormalParam(models.Model):
    _name = 'jd.abnormal.param'
    _inherit = 'jdg.abstract.base.data'
    _description = u'异常参数'

    name = fields.Char(string=u'参数名')
    number = fields.Char(default='')
    type = fields.Selection(TYPE, string=u'参数值类型', required=True, help=u'范围类型参数由;(英文分号)分隔，左边为空则无穷小，右边为空则无穷大')
    note = fields.Text(string=u'描述')
