2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
7 * Modifications Copyright (c) 2019 Samsung
8 * ===================================================================
10 * Unless otherwise specified, all software contained herein is licensed
11 * under the Apache License, Version 2.0 (the "License");
12 * you may not use this software except in compliance with the License.
13 * You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
23 * Unless otherwise specified, all documentation contained herein is licensed
24 * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
25 * you may not use this documentation except in compliance with the License.
26 * You may obtain a copy of the License at
28 * https://creativecommons.org/licenses/by/4.0/
30 * Unless required by applicable law or agreed to in writing, documentation
31 * distributed under the License is distributed on an "AS IS" BASIS,
32 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33 * See the License for the specific language governing permissions and
34 * limitations under the License.
36 * ============LICENSE_END============================================
41 package org.onap.portal.domain.db.fn;
43 import java.io.Serializable;
44 import javax.persistence.Column;
45 import javax.persistence.Entity;
46 import javax.persistence.GeneratedValue;
47 import javax.persistence.GenerationType;
48 import javax.persistence.Id;
49 import javax.persistence.Table;
50 import javax.persistence.UniqueConstraint;
51 import javax.validation.constraints.Digits;
52 import javax.validation.constraints.NotNull;
53 import javax.validation.constraints.Size;
54 import lombok.AllArgsConstructor;
56 import lombok.NoArgsConstructor;
58 import org.hibernate.validator.constraints.SafeHtml;
60 CREATE TABLE `fn_workflow` (
61 `id` mediumint(9) NOT NULL AUTO_INCREMENT,
62 `name` varchar(20) NOT NULL,
63 `description` varchar(500) DEFAULT NULL,
64 `run_link` varchar(300) DEFAULT NULL,
65 `suspend_link` varchar(300) DEFAULT NULL,
66 `modified_link` varchar(300) DEFAULT NULL,
67 `active_yn` varchar(300) DEFAULT NULL,
68 `created` varchar(300) DEFAULT NULL,
69 `created_by` int(11) DEFAULT NULL,
70 `modified` varchar(300) DEFAULT NULL,
71 `modified_by` int(11) DEFAULT NULL,
72 `workflow_key` varchar(50) DEFAULT NULL,
74 UNIQUE KEY `name` (`name`)
78 @Table(name = "fn_workflow", uniqueConstraints = {
79 @UniqueConstraint(name = "name", columnNames = "name")
86 public class FnWorkflow implements Serializable {
88 @GeneratedValue(strategy = GenerationType.AUTO)
89 @Column(name = "id", nullable = false, length = 9, columnDefinition = "mediumint(9) AUTO_INCREMENT")
90 @Digits(integer = 9, fraction = 0)
92 @Column(name = "name", length = 20, nullable = false, unique = true)
97 @Column(name = "description", length = 500, columnDefinition = "varchar(500) default null")
100 private String description;
101 @Column(name = "run_link", length = 300, columnDefinition = "varchar(300) default null")
104 private String runLink;
105 @Column(name = "suspend_link", length = 300, columnDefinition = "varchar(300) default null")
108 private String suspendLink;
109 @Column(name = "modified_link", length = 300, columnDefinition = "varchar(300) default null")
112 private String modifiedLink;
113 //TODO varchar(300)? Should be varchar(1)?
114 @Column(name = "active_yn", length = 300, columnDefinition = "varchar(300) default null")
117 private String activeYn;
118 @Column(name = "created", length = 300, columnDefinition = "varchar(300) default null")
121 private String created;
122 @Column(name = "created_by", length = 11, columnDefinition = "int(11) default null")
123 @Digits(integer = 11, fraction = 0)
124 private Integer created_by;
125 @Column(name = "modified", length = 300, columnDefinition = "varchar(300) default null")
128 private String modified;
129 @Column(name = "modified_by", length = 11, columnDefinition = "int(11) default null")
130 @Digits(integer = 11, fraction = 0)
131 private Integer modified_by;
132 @Column(name = "workflow_key", length = 50, columnDefinition = "varchar(50) default null")
135 private String workflowKey;