reserved_ip.py 836 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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__ = '2018-12-25'
  8. __contact__ = 'james.iter.cn@gmail.com'
  9. __copyright__ = '(c) 2018 by James Iter.'
  10. class ReservedIP(ORM):
  11. _table_name = 'reserved_ip'
  12. _primary_key = 'id'
  13. def __init__(self):
  14. super(ReservedIP, self).__init__()
  15. self.id = 0
  16. self.ip = ''
  17. self.create_time = ji.Common.tus()
  18. @staticmethod
  19. def get_filter_keywords():
  20. return {
  21. 'id': FilterFieldType.INT.value,
  22. 'ip': FilterFieldType.STR.value,
  23. }
  24. @staticmethod
  25. def get_allow_update_keywords():
  26. return ['']
  27. @staticmethod
  28. def get_allow_content_search_keywords():
  29. return ['ip']