os_template_initialize_operate_set.py 933 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from models import FilterFieldType
  4. from models import ORM
  5. __author__ = 'James Iter'
  6. __date__ = '2018/2/4'
  7. __contact__ = 'james.iter.cn@gmail.com'
  8. __copyright__ = '(c) 2018 by James Iter.'
  9. class OSTemplateInitializeOperateSet(ORM):
  10. _table_name = 'os_template_initialize_operate_set'
  11. _primary_key = 'id'
  12. def __init__(self):
  13. super(OSTemplateInitializeOperateSet, self).__init__()
  14. self.id = 0
  15. self.label = None
  16. self.describe = ''
  17. self.active = True
  18. @staticmethod
  19. def get_filter_keywords():
  20. return {
  21. 'id': FilterFieldType.INT.value,
  22. 'label': FilterFieldType.STR.value,
  23. 'active': FilterFieldType.INT.value
  24. }
  25. @staticmethod
  26. def get_allow_update_keywords():
  27. return []
  28. @staticmethod
  29. def get_allow_content_search_keywords():
  30. return ['label']