()
| 96 | } |
| 97 | |
| 98 | func (s *SimpleObjectInfo) hasParentQuestion() bool { |
| 99 | switch s.ObjectType { |
| 100 | case constant.AnswerObjectType, constant.CommentObjectType: |
| 101 | return len(s.QuestionID) > 0 && s.QuestionID != "0" |
| 102 | default: |
| 103 | return false |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | func (s *SimpleObjectInfo) isObjectRestricted() bool { |
| 108 | switch s.ObjectType { |