2 * Copyright © 2021 Aarna Networks, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.ccsdk.cds.blueprintsprocessor.functions.workflow.audit.db
19 import com.fasterxml.jackson.annotation.JsonFormat
20 import io.swagger.annotations.ApiModelProperty
21 import org.hibernate.annotations.Proxy
22 import org.springframework.data.annotation.LastModifiedDate
23 import java.io.Serializable
25 import javax.persistence.Column
26 import javax.persistence.Entity
27 import javax.persistence.GenerationType
28 import javax.persistence.GeneratedValue
29 import javax.persistence.Id
30 import javax.persistence.Lob
31 import javax.persistence.Table
32 import javax.persistence.Temporal
33 import javax.persistence.TemporalType
36 * BlueprintWorkflowAuditStatus Model.
37 * Records stored and retrieved in table BLUEPRINT_WORKFLOW_AUDIT_STATUS is
38 * done through this entity.
41 @Table(name = "BLUEPRINT_WORKFLOW_AUDIT_STATUS")
43 class BlueprintWorkflowAuditStatus : Serializable {
46 @GeneratedValue(strategy = GenerationType.IDENTITY)
47 @Column(name = "workflow_audit_id")
50 @get:ApiModelProperty(value = "Workflow payload.", required = true)
52 @Column(name = "workflow_task_content", nullable = false)
53 @ApiModelProperty(required = true)
54 lateinit var workflowTaskContent: String
56 @get:ApiModelProperty(value = "request originator Id", required = true)
57 @Column(name = "originator_Id", nullable = false)
58 @ApiModelProperty(required = true)
59 lateinit var originatorId: String
61 @get:ApiModelProperty(value = "request Id", required = true)
62 @Column(name = "request_Id", nullable = false)
63 @ApiModelProperty(required = true)
64 lateinit var requestId: String
66 @get:ApiModelProperty(value = "sub request Id", required = true)
67 @Column(name = "subRequest_Id", nullable = false)
68 @ApiModelProperty(required = true)
69 lateinit var subRequestId: String
71 @get:ApiModelProperty(value = "workflow name", required = true)
72 @Column(name = "workflow_name", nullable = false)
73 @ApiModelProperty(required = true)
74 lateinit var workflowName: String
76 @get:ApiModelProperty(value = "status", required = true)
77 @Column(name = "status", nullable = true)
78 @ApiModelProperty(required = true)
79 lateinit var status: String
81 @get:ApiModelProperty(
82 value = "start time when request process started", required = true
84 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
86 @Temporal(TemporalType.TIMESTAMP)
87 @Column(name = "start_time")
88 var startDate: Date = Date()
90 @get:ApiModelProperty(
91 value = "end time when request process completed", required = true
93 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
95 @Temporal(TemporalType.TIMESTAMP)
96 @Column(name = "end_time")
97 var endDate: Date = Date()
99 @get:ApiModelProperty(value = "current date time", required = true)
100 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
102 @Temporal(TemporalType.TIMESTAMP)
103 @Column(name = "updated_date")
104 var updatedDate: Date = Date()
106 @get:ApiModelProperty(value = "updated by", required = true)
107 @Column(name = "updated_by", nullable = true)
108 @ApiModelProperty(required = true)
109 lateinit var updatedBy: String
111 @get:ApiModelProperty(value = "blueprint version", required = true)
112 @Column(name = "blueprint_version", nullable = false)
113 @ApiModelProperty(required = true)
114 lateinit var blueprintVersion: String
116 @get:ApiModelProperty(value = "blueprint name", required = true)
117 @Column(name = "blueprint_name", nullable = false)
118 @ApiModelProperty(required = true)
119 lateinit var blueprintName: String
121 @get:ApiModelProperty(value = "request mode", required = true)
122 @Column(name = "request_mode", nullable = true)
123 @ApiModelProperty(required = true)
124 lateinit var requestMode: String
126 @get:ApiModelProperty(value = "workflow response content", required = false)
128 @Column(name = "workflow_response_content", nullable = true)
129 @ApiModelProperty(required = false)
130 lateinit var workflowResponseContent: String
132 @get:ApiModelProperty(value = "bluprint model uuid", required = true)
133 @Column(name = "blueprint_uuid", nullable = true)
134 @ApiModelProperty(required = false)
135 var blueprintUuid: String = ""