|
| 1 | +Class Community.Comment Extends %Persistent |
| 2 | +{ |
| 3 | + |
| 4 | +Parameter DSTIME = "AUTO"; |
| 5 | + |
| 6 | +Property Id As %Integer [ Required ]; |
| 7 | + |
| 8 | +Index IDKEY On (Type, Id) [ IdKey, Unique ]; |
| 9 | + |
| 10 | +Property AvgVote As %Integer; |
| 11 | + |
| 12 | +Property VotesAmount As %Integer; |
| 13 | + |
| 14 | +Property Post As %String; |
| 15 | + |
| 16 | +Index PostIndex On Post; |
| 17 | + |
| 18 | +Property Author As %String; |
| 19 | + |
| 20 | +Index AuthorIndex On Author; |
| 21 | + |
| 22 | +Property Created As %TimeStamp; |
| 23 | + |
| 24 | +Property Text As %String(MAXLEN = ""); |
| 25 | + |
| 26 | +Property Type As %String(VALUELIST = ",answer,comment"); |
| 27 | + |
| 28 | +Property Correct As %Boolean; |
| 29 | + |
| 30 | +/// Hash of input row, used to build this object |
| 31 | +Property Hash As %String; |
| 32 | + |
| 33 | +Property TextHash As %String; |
| 34 | + |
| 35 | +Index TextHashIndex On TextHash; |
| 36 | + |
| 37 | +Property AcceptedAnswerTS As %TimeStamp; |
| 38 | + |
| 39 | +Storage Default |
| 40 | +{ |
| 41 | +<Data name="CommentDefaultData"> |
| 42 | +<Value name="1"> |
| 43 | +<Value>%%CLASSNAME</Value> |
| 44 | +</Value> |
| 45 | +<Value name="2"> |
| 46 | +<Value>AvgVote</Value> |
| 47 | +</Value> |
| 48 | +<Value name="3"> |
| 49 | +<Value>VotesAmount</Value> |
| 50 | +</Value> |
| 51 | +<Value name="4"> |
| 52 | +<Value>Post</Value> |
| 53 | +</Value> |
| 54 | +<Value name="5"> |
| 55 | +<Value>Author</Value> |
| 56 | +</Value> |
| 57 | +<Value name="6"> |
| 58 | +<Value>Link</Value> |
| 59 | +</Value> |
| 60 | +<Value name="7"> |
| 61 | +<Value>Created</Value> |
| 62 | +</Value> |
| 63 | +<Value name="8"> |
| 64 | +<Value>Text</Value> |
| 65 | +</Value> |
| 66 | +<Value name="9"> |
| 67 | +<Value>Deleted</Value> |
| 68 | +</Value> |
| 69 | +<Value name="10"> |
| 70 | +<Value>Hash</Value> |
| 71 | +</Value> |
| 72 | +<Value name="11"> |
| 73 | +<Value>Correct</Value> |
| 74 | +</Value> |
| 75 | +<Value name="12"> |
| 76 | +<Value>TextHash</Value> |
| 77 | +</Value> |
| 78 | +<Value name="13"> |
| 79 | +<Value>AsseptedAnswerTS</Value> |
| 80 | +</Value> |
| 81 | +<Value name="14"> |
| 82 | +<Value>AcceptedAnswerTS</Value> |
| 83 | +</Value> |
| 84 | +<Value name="15"> |
| 85 | +<Value>Language</Value> |
| 86 | +</Value> |
| 87 | +<Value name="16"> |
| 88 | +<Value>Lang</Value> |
| 89 | +</Value> |
| 90 | +</Data> |
| 91 | +<DataLocation>^Community.CommentD</DataLocation> |
| 92 | +<DefaultData>CommentDefaultData</DefaultData> |
| 93 | +<IdLocation>^Community.CommentD</IdLocation> |
| 94 | +<IndexLocation>^Community.CommentI</IndexLocation> |
| 95 | +<StreamLocation>^Community.CommentS</StreamLocation> |
| 96 | +<Type>%Storage.Persistent</Type> |
| 97 | +} |
| 98 | + |
| 99 | +} |
0 commit comments