blob: ac3eaf0fed148415ed051d5b10f60b361f5bca9f [file] [log] [blame]
xudan16c7f36a62022-07-21 17:27:14 +08001/*
2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2022 Huawei Technologies Co., Ltd.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * 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.
15 *
16 * SPDX-License-Identifier: Apache-2.0
17 * ============LICENSE_END=========================================================
18 */
19
20CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
21
22create table if not exists intent(
23 intent_id varchar(255) primary key,
24 intent_name varchar(255)
25);
26
27create table if not exists expectation(
28 expectation_id varchar(255) primary key,
29 expectation_name varchar(255),
30 expectation_type varchar(255),
31 intent_id varchar(255)
32);
33
34create table if not exists expectation_object(
35 object_id varchar(255) DEFAULT uuid_generate_v4 (),
36 primary key(object_id),
37 object_type varchar(255),
38 object_instance varchar(255),
39 expectation_id varchar(255)
40);
41
42create table if not exists expectation_target(
43 target_id varchar(255) primary key,
44 target_name varchar(255),
45 expectation_id varchar(255)
46);
47
48create table if not exists context(
49 context_id varchar(255) primary key,
50 context_name varchar(255),
51 parent_id varchar(255)
52);
53
54create table if not exists context_mapping(
55 context_id varchar(255) primary key,
56 parent_type varchar(255),
57 parent_id varchar(255)
58);
59
60create table if not exists fulfilment_info(
61 fulfilment_info_id varchar(255) primary key,
62 fulfilment_info_status varchar(255),
63 not_fulfilled_state varchar(255),
64 not_fulfilled_reason varchar(255)
65);
66
67create table if not exists state(
68 state_id varchar(255) primary key,
69 state_name varchar(255),
70 is_satisfied boolean,
71 condition varchar(255),
72 expectation_id varchar(255)
73);
74
75create table if not exists condition(
76 condition_id varchar(255) primary key,
77 condition_name varchar(255),
78 operator_type varchar(255),
79 condition_value varchar(255),
80 parent_id varchar(255)
81 );
82
83create table if not exists intent_management_function_reg_info(
84 imfr_info_id varchar(255) primary key,
85 imfr_info_description varchar(255),
86 support_area varchar(255),
87 support_model varchar(255),
88 support_interfaces varchar(255),
89 handle_name varchar(255),
90 intent_function_type varchar(255)
91 );