Epic-231:versioning, and backup the configuration
[sdnc/oam.git] / configbackuprestore / vnfconfigbackupservice / src / main / java / com / onap / sdnc / vnfbackupservice / model / VnfConfigDetailsDB.java
1 /*
2 * ============LICENSE_START=======================================================
3 * ONAP : SDNC-FEATURES
4 * ================================================================================
5 * Copyright 2018 TechMahindra
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 * ============LICENSE_END=========================================================
19 */
20 package com.onap.sdnc.vnfbackupservice.model;
21
22 import java.io.Serializable;
23 import java.sql.Timestamp;
24
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.GenerationType;
29 import javax.persistence.Id;
30 import javax.persistence.Lob;
31 import javax.persistence.Table;
32 import org.springframework.data.annotation.CreatedDate;
33 import org.springframework.data.annotation.LastModifiedDate;
34
35 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
36
37 @Entity
38 @Table(name = "vnfconfigdetails", schema = "testreports")
39 @JsonIgnoreProperties(value = {"createdAt", "updatedAt"}, 
40         allowGetters = true)
41 public class VnfConfigDetailsDB implements Serializable{
42
43         private static final long serialVersionUID = 1L;
44
45         @Id
46         @GeneratedValue(strategy = GenerationType.IDENTITY)
47         private int id;
48         
49         @Column(name = "vnfid")
50         private String vnfid;
51
52         @Column(name = "vnfversion")
53         private String vnfversion;
54
55         @Column(name = "vnfname")
56         private String vnfname;
57
58         @Column(name = "configinfo")
59         @Lob
60         private String configinfo;
61
62         @Column(nullable = false, updatable = false,columnDefinition="DATETIME")
63     @CreatedDate
64         private Timestamp creationdate;
65
66         @Column(nullable = false,columnDefinition="DATETIME")
67     @LastModifiedDate
68         private Timestamp lastupdated;
69         
70         @Column(name = "status")
71         private int status;
72
73         public int getId() {
74                 return id;
75         }
76
77         public void setId(int id) {
78                 this.id = id;
79         }
80
81         public String getVnfid() {
82                 return vnfid;
83         }
84
85         public void setVnfid(String vnfid) {
86                 this.vnfid = vnfid;
87         }
88
89         public String getVnfversion() {
90                 return vnfversion;
91         }
92
93         public void setVnfversion(String vnfversion) {
94                 this.vnfversion = vnfversion;
95         }
96
97         public String getVnfname() {
98                 return vnfname;
99         }
100
101         public void setVnfname(String vnfname) {
102                 this.vnfname = vnfname;
103         }
104
105         public String getConfiginfo() {
106                 return configinfo;
107         }
108
109         public void setConfiginfo(String configinfo) {
110                 this.configinfo = configinfo;
111         }
112
113         public Timestamp getCreationdate() {
114                 return creationdate;
115         }
116
117         public void setCreationdate(Timestamp creationdate) {
118                 this.creationdate = creationdate;
119         }
120         
121         public int getStatus() {
122                 return status;
123         }
124
125         public void setStatus(int status) {
126                 this.status = status;
127         }       
128
129         public Timestamp getLastupdated() {
130                 return lastupdated;
131         }
132
133         public void setLastupdated(Timestamp lastupdated) {
134                 this.lastupdated = lastupdated;
135         }
136
137 }