clinic/netforce_clinic/models/vascular_access.py

17 lines
505 B
Python

from netforce.model import Model, fields
class VascularAccess(Model):
_name="clinic.vascular.access"
_string="Vascular Access"
_fields={
"name": fields.Char("Name",required=True,search=True),
"code": fields.Char("Code",required=True,search=True),
"description": fields.Char("Description",search=True),
'note': fields.Text("Note"),
}
_sql_constraints=("clinic_vascular_key_uniq","unique(code)","code should be unique"),
VascularAccess.register()