2 * Copyright © 2019 IBM.
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.db.primary.domain
19 import com.fasterxml.jackson.annotation.JsonFormat
20 import com.fasterxml.jackson.annotation.JsonTypeInfo
21 import com.fasterxml.jackson.annotation.JsonTypeName
22 import com.fasterxml.jackson.databind.annotation.JsonSerialize
23 import io.swagger.annotations.ApiModel
24 import io.swagger.annotations.ApiModelProperty
25 import org.springframework.data.annotation.LastModifiedDate
26 import java.io.Serializable
28 import javax.persistence.Column
29 import javax.persistence.Entity
30 import javax.persistence.Id
31 import javax.persistence.Lob
32 import javax.persistence.Table
33 import javax.persistence.Temporal
34 import javax.persistence.TemporalType
37 * Provide Blueprint Model Search Entity
39 * @author Brinda Santh
44 @Table(name = "BLUEPRINT_MODEL")
45 @JsonTypeName("blueprintModel")
46 @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
48 class BlueprintModelSearch : Serializable {
51 value = "ID of Blueprint model, is automatically created by CDS",
52 example = "\"658f9a48-7f54-41ba-ae18-c69f26f3dc94\"",
56 @Column(name = "blueprint_model_id")
57 var id: String? = null
59 @ApiModelProperty(value = "Artifact UUID, usually null", example = "null", required = false)
60 @Column(name = "artifact_uuid")
61 var artifactUUId: String? = null
64 @ApiModelProperty(value = "Artifact Type, usually null", example = "\"SDNC_MODEL\"", required = false)
65 @Column(name = "artifact_type")
66 var artifactType: String? = null
68 @ApiModelProperty(value = "Artifact Version, usually 1.0.0", example = "\"1.0.0\"", required = true)
69 @Column(name = "artifact_version", nullable = false)
70 var artifactVersion: String? = null
72 @ApiModelProperty(value = "Artifact Description, usually empty", example = "\"\"", required = false)
74 @Column(name = "artifact_description")
75 var artifactDescription: String? = null
77 @ApiModelProperty(value = "Internal Version of CBA, usually null", example = "null", required = false)
78 @Column(name = "internal_version")
79 var internalVersion: Int? = null
81 @ApiModelProperty(value = "Datetime of the creation of CBA in CDS", example = "\"2020-11-19T10:34:56.000Z\"", required = true)
82 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
84 @Temporal(TemporalType.TIMESTAMP)
85 @Column(name = "creation_date")
86 var createdDate = Date()
88 @ApiModelProperty(value = "Artifact Name, defined in Metadata", example = "\"pnf_netconf\"", required = true)
89 @Column(name = "artifact_name", nullable = false)
90 var artifactName: String? = null
92 @ApiModelProperty(value = "Artifact Name, defined in Metadata", example = "\"pnf_netconf\"", required = true)
93 @Column(name = "published", nullable = false)
94 var published: String? = null
96 @ApiModelProperty(value = "Name of publisher, defined in Metadata", example = "\"Deutsche Telekom AG\"", required = true)
97 @Column(name = "updated_by", nullable = false)
98 var updatedBy: String? = null
100 @ApiModelProperty(value = "Tags to identify the CBA, defined in Metadata", example = "\"test\"", required = true)
102 @Column(name = "tags", nullable = false)
103 var tags: String? = null
107 const val serialversionuid = 1L