12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- package model
- import (
- "go-common/library/time"
- )
- const (
-
- StateCreate = 1
-
- StateReply = 2
-
- StateAdminClose = 3
-
- StateUserFinished = 4
-
- StateTimeoutClose = 5
-
- StateNoRead = 6
-
- StateUserClosed = 7
-
- StateAdminFinished = 8
-
- EventStateAdminReply = 1
-
- EventStateAdminNote = 2
-
- EventStateUserReply = 3
-
- EventStateSystem = 4
-
- Business = 5
- )
- type Appeal struct {
- ID int64 `json:"id"`
- Oid int64 `json:"oid"`
- Cid int64 `json:"cid"`
- Mid int64 `json:"mid"`
- Aid int64 `json:"aid"`
- Tid int8 `json:"tid"`
- Title string `json:"title"`
- State int8 `json:"state"`
- Visit int8 `json:"visit"`
- QQ string `json:"qq"`
- Email string `json:"email"`
- Phone string `json:"phone"`
- Pics string `json:"pics"`
- Content string `json:"content"`
- Description string `json:"description"`
- Star int8 `json:"star"`
- CTime time.Time `json:"ctime"`
- MTime time.Time `json:"mtime"`
- }
- func IsOpen(state int8) bool {
- return state == StateCreate || state == StateReply || state == StateNoRead
- }
- func OpenedStates() (states []int64) {
- return []int64{StateCreate, StateReply, StateNoRead}
- }
- func ClosedStates() (states []int64) {
- return []int64{StateAdminClose, StateUserFinished, StateTimeoutClose, StateUserClosed, StateAdminFinished}
- }
|