|
@@ -15,6 +15,8 @@ type EventForbiddenMating struct {
|
|
|
UnForbiddenMatingAt int64 `json:"unForbiddenMatingAt"`
|
|
|
OperationId int64 `json:"operationId"`
|
|
|
OperationName string `json:"operationName"`
|
|
|
+ UnForbiddenOperationId int64 `json:"unForbiddenOperationId"`
|
|
|
+ UnForbiddenOperationName string `json:"unForbiddenOperationName"`
|
|
|
Remarks string `json:"remarks"`
|
|
|
IsShow pasturePb.IsShow_Kind `json:"isShow"`
|
|
|
MessageId int64 `json:"messageId"`
|
|
@@ -27,9 +29,11 @@ func (e *EventForbiddenMating) TableName() string {
|
|
|
return "event_forbidden_mating"
|
|
|
}
|
|
|
|
|
|
-func (e *EventForbiddenMating) UnForbiddenMatingUpdate(unForbiddenMatingAt int64) {
|
|
|
+func (e *EventForbiddenMating) UnForbiddenMatingUpdate(unForbiddenMatingAt int64, currentUser *SystemUser) {
|
|
|
e.UnForbiddenMatingAt = unForbiddenMatingAt
|
|
|
e.IsShow = pasturePb.IsShow_No
|
|
|
+ e.UnForbiddenOperationId = currentUser.Id
|
|
|
+ e.UnForbiddenOperationName = currentUser.Name
|
|
|
}
|
|
|
|
|
|
func NewEventForbiddenMating(pastureId int64, cow *Cow, forbiddenMatingAt int64, forbiddenMatingReasonsKind pasturePb.ForbiddenMatingReasons_Kind,
|