vlan.py 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import jimit as ji
  4. from jimvc.models import FilterFieldType
  5. from jimvc.models import ORM
  6. __author__ = 'James Iter'
  7. __date__ = '2019-03-11'
  8. __contact__ = 'james.iter.cn@gmail.com'
  9. __copyright__ = '(c) 2019 by James Iter.'
  10. class VLAN(ORM):
  11. _table_name = 'vlan'
  12. _primary_key = 'id'
  13. def __init__(self):
  14. super(VLAN, self).__init__()
  15. self.id = 0
  16. self.vlan_id = None
  17. self.label = ''
  18. self.description = ''
  19. self.create_time = ji.Common.tus()
  20. @staticmethod
  21. def get_filter_keywords():
  22. return {
  23. 'id': FilterFieldType.INT.value,
  24. 'label': FilterFieldType.INT.value,
  25. 'vlan_id': FilterFieldType.INT.value
  26. }
  27. @staticmethod
  28. def get_allow_update_keywords():
  29. return []
  30. @staticmethod
  31. def get_allow_content_search_keywords():
  32. return ['vlan_id', 'label', 'description']