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 javax.persistence.Column;
44 import javax.persistence.Entity;
45 import javax.persistence.GeneratedValue;
46 import javax.persistence.GenerationType;
47 import javax.persistence.Id;
48 import javax.persistence.Table;
49 import javax.persistence.UniqueConstraint;
50 import javax.validation.constraints.Digits;
51 import javax.validation.constraints.NotNull;
52 import javax.validation.constraints.Size;
53 import lombok.AllArgsConstructor;
55 import lombok.NoArgsConstructor;
57 import org.hibernate.validator.constraints.SafeHtml;
59 CREATE TABLE `fn_workflow` (
60 `id` mediumint(9) NOT NULL AUTO_INCREMENT,
61 `name` varchar(20) NOT NULL,
62 `description` varchar(500) DEFAULT NULL,
63 `run_link` varchar(300) DEFAULT NULL,
64 `suspend_link` varchar(300) DEFAULT NULL,
65 `modified_link` varchar(300) DEFAULT NULL,
66 `active_yn` varchar(300) DEFAULT NULL,
67 `created` varchar(300) DEFAULT NULL,
68 `created_by` int(11) DEFAULT NULL,
69 `modified` varchar(300) DEFAULT NULL,
70 `modified_by` int(11) DEFAULT NULL,
71 `workflow_key` varchar(50) DEFAULT NULL,
73 UNIQUE KEY `name` (`name`)
77 @Table(name = "fn_workflow", uniqueConstraints = {
78 @UniqueConstraint(name = "name", columnNames = "name")
85 public class FnWorkflow {
87 @GeneratedValue(strategy = GenerationType.AUTO)
88 @Column(name = "id", nullable = false, length = 9, columnDefinition = "mediumint(9) AUTO_INCREMENT")
89 @Digits(integer = 9, fraction = 0)
91 @Column(name = "name", length = 20, nullable = false, unique = true)
96 @Column(name = "description", length = 500, columnDefinition = "varchar(500) default null")
99 private String description;
100 @Column(name = "run_link", length = 300, columnDefinition = "varchar(300) default null")
103 private String runLink;
104 @Column(name = "suspend_link", length = 300, columnDefinition = "varchar(300) default null")
107 private String suspendLink;
108 @Column(name = "modified_link", length = 300, columnDefinition = "varchar(300) default null")
111 private String modifiedLink;
112 //TODO varchar(300)? Should be varchar(1)?
113 @Column(name = "active_yn", length = 300, columnDefinition = "varchar(300) default null")
116 private String activeYn;
117 @Column(name = "created", length = 300, columnDefinition = "varchar(300) default null")
120 private String created;
121 @Column(name = "created_by", length = 11, columnDefinition = "int(11) default null")
122 @Digits(integer = 11, fraction = 0)
123 private Integer created_by;
124 @Column(name = "modified", length = 300, columnDefinition = "varchar(300) default null")
127 private String modified;
128 @Column(name = "modified_by", length = 11, columnDefinition = "int(11) default null")
129 @Digits(integer = 11, fraction = 0)
130 private Integer modified_by;
131 @Column(name = "workflow_key", length = 50, columnDefinition = "varchar(50) default null")
134 private String workflowKey;