os_template_image.py 963 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 OSTemplateImage(ORM):
  10. _table_name = 'os_template_image'
  11. _primary_key = 'id'
  12. def __init__(self):
  13. super(OSTemplateImage, self).__init__()
  14. self.id = 0
  15. self.os_template_profile_id = None
  16. self.path = None
  17. self.active = True
  18. @staticmethod
  19. def get_filter_keywords():
  20. return {
  21. 'id': FilterFieldType.INT.value,
  22. 'os_template_profile_id': FilterFieldType.INT.value,
  23. 'path': FilterFieldType.STR.value,
  24. 'active': FilterFieldType.INT.value
  25. }
  26. @staticmethod
  27. def get_allow_update_keywords():
  28. return []
  29. @staticmethod
  30. def get_allow_content_search_keywords():
  31. return ['path']