Upgrade to oparent 3.2.1
[policy/models.git] / models-interactions / model-impl / guard / src / main / java / org / onap / policy / guard / OperationsHistory.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP
4  * ================================================================================
5  * Copyright (C) 2020,2022 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * SPDX-License-Identifier: Apache-2.0
20  * ============LICENSE_END=========================================================
21  */
22
23 package org.onap.policy.guard;
24
25 import java.io.Serializable;
26 import java.util.Date;
27 import javax.persistence.Column;
28 import javax.persistence.Entity;
29 import javax.persistence.GeneratedValue;
30 import javax.persistence.Id;
31 import javax.persistence.Index;
32 import javax.persistence.Table;
33 import lombok.Data;
34
35 @Entity
36 @Table(name = "operationshistory",
37                 indexes = {@Index(name = "operationshistory_clreqid_index", columnList = "closedLoopName,requestId"),
38                               @Index(name = "operationshistory_target_index", columnList = "target,operation,actor")})
39 @Data
40 public class OperationsHistory implements Serializable {
41
42     private static final long serialVersionUID = -551420180714993577L;
43
44     @Id
45     @GeneratedValue
46     @Column(name = "id")
47     private Long id;
48
49     @Column(name = "closedLoopName", length = 255)
50     private String closedLoopName;
51
52     @Column(name = "requestId", length = 50)
53     private String requestId;
54
55     @Column(name = "subrequestId", length = 50)
56     private String subrequestId;
57
58     @Column(name = "actor", length = 50)
59     private String actor;
60
61     @Column(name = "operation", length = 50)
62     private String operation;
63
64     @Column(name = "target", length = 50)
65     private String target;
66
67     @Column(name = "starttime")
68     private Date starttime;
69
70     @Column(name = "outcome", length = 50)
71     private String outcome;
72
73     @Column(name = "message", length = 255)
74     private String message;
75
76     @Column(name = "endtime")
77     private Date endtime;
78
79 }