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.SequenceGenerator;
50 import javax.persistence.Table;
51 import javax.persistence.UniqueConstraint;
52 import javax.validation.constraints.Digits;
53 import javax.validation.constraints.NotNull;
54 import javax.validation.constraints.Size;
55 import lombok.AllArgsConstructor;
57 import lombok.NoArgsConstructor;
59 import org.hibernate.validator.constraints.SafeHtml;
61 CREATE TABLE `fn_workflow` (
62 `id` mediumint(9) NOT NULL AUTO_INCREMENT,
63 `name` varchar(20) NOT NULL,
64 `description` varchar(500) DEFAULT NULL,
65 `run_link` varchar(300) DEFAULT NULL,
66 `suspend_link` varchar(300) DEFAULT NULL,
67 `modified_link` varchar(300) DEFAULT NULL,
68 `active_yn` varchar(300) DEFAULT NULL,
69 `created` varchar(300) DEFAULT NULL,
70 `created_by` int(11) DEFAULT NULL,
71 `modified` varchar(300) DEFAULT NULL,
72 `modified_by` int(11) DEFAULT NULL,
73 `workflow_key` varchar(50) DEFAULT NULL,
75 UNIQUE KEY `name` (`name`)
79 @Table(name = "fn_workflow", uniqueConstraints = {
80 @UniqueConstraint(name = "name", columnNames = "name")
87 public class FnWorkflow implements Serializable {
90 @GeneratedValue(strategy = GenerationType.AUTO)
91 @Column(name = "id", nullable = false, length = 9, columnDefinition = "mediumint(9) AUTO_INCREMENT")
92 @Digits(integer = 9, fraction = 0)
94 @Column(name = "name", length = 20, nullable = false, unique = true)
99 @Column(name = "description", length = 500, columnDefinition = "varchar(500) default null")
102 private String description;
103 @Column(name = "run_link", length = 300, columnDefinition = "varchar(300) default null")
106 private String runLink;
107 @Column(name = "suspend_link", length = 300, columnDefinition = "varchar(300) default null")
110 private String suspendLink;
111 @Column(name = "modified_link", length = 300, columnDefinition = "varchar(300) default null")
114 private String modifiedLink;
115 //TODO varchar(300)? Should be varchar(1)?
116 @Column(name = "active_yn", length = 300, columnDefinition = "varchar(300) default null")
119 private String activeYn;
120 @Column(name = "created", length = 300, columnDefinition = "varchar(300) default null")
123 private String created;
124 @Column(name = "created_by", length = 11, columnDefinition = "int(11) default null")
125 @Digits(integer = 11, fraction = 0)
126 private Integer created_by;
127 @Column(name = "modified", length = 300, columnDefinition = "varchar(300) default null")
130 private String modified;
131 @Column(name = "modified_by", length = 11, columnDefinition = "int(11) default null")
132 @Digits(integer = 11, fraction = 0)
133 private Integer modified_by;
134 @Column(name = "workflow_key", length = 50, columnDefinition = "varchar(50) default null")
137 private String workflowKey;