aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/intent-analysis-init.sql
blob: dedb4f4b5dd88b97a42786b9eb7ef08d5dc71459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

create table if not exists intent(
    intent_id varchar(255) primary key,
    intent_name varchar(255),
    intent_generateType VARCHAR (225)
);

create table if not exists expectation(
    expectation_id varchar(255) primary key,
    expectation_name varchar(255),
    expectation_type varchar(255),
    intent_id varchar(255)
);

create table if not exists expectation_object(
    object_id varchar(255) DEFAULT uuid_generate_v4 (),
    primary key(object_id),
    object_type varchar(255),
    expectation_id varchar(255)
);

create table if not exists expectation_target(
    target_id varchar(255) primary key,
    target_name varchar(255),
    expectation_id varchar(255)
);

create table if not exists context(
    context_id varchar(255) primary key,
    context_name varchar(255),
    parent_id varchar(255)
);

create table if not exists context_mapping(
    context_id varchar(255) primary key,
    parent_type varchar(255),
    parent_id varchar(255)
);

create table if not exists fulfillment_info(
    fulfillment_info_id varchar(255) primary key,
    fulfillment_info_status varchar(255),
    not_fulfilled_state varchar(255),
    not_fulfilled_reason varchar(255),
    achieve_value varchar(255)
);

create table if not exists state(
    state_id varchar(255) primary key,
    state_name varchar(255),
    is_satisfied boolean,
    condition varchar(255),
    expectation_id varchar(255)
);

create table if not exists condition(
    condition_id varchar(255) primary key,
    condition_name varchar(255),
    operator_type varchar(255),
    condition_value varchar(255),
    parent_id varchar(255)
    );

create table if not exists intent_management_function_reg_info(
    imfr_info_id varchar(255) primary key,
    imfr_info_description varchar(255),
    support_area varchar(255),
    support_model varchar(255),
    support_interfaces varchar(255),
    handle_name varchar(255),
    intent_function_type varchar(255)
    );

create table if not exists intent_event_record(
    id varchar(255) DEFAULT uuid_generate_v4 (),
    intent_id varchar(255),
    intent_name varchar(255),
    intent_status varchar (225),
    operate_type varchar (225),
    parent_id varchar(255)
    );

create table if not exists intent_report(
    intent_report_id varchar(255) primary key,
    intent_reference varchar(255),
    report_time timestamptz
    );

create table if not exists intent_report_fulfillment_info(
    parent_id varchar(255),
    fulfillment_info_id varchar(255),
    fulfillment_info_status varchar(255),
    not_fulfilled_state varchar(255),
    not_fulfilled_reason varchar(255),
    achieve_value varchar(255)
    );

create table if not exists object_instance(
    parent_id varchar(255),
    object_instance varchar(255)
    );

create table if not exists intent_instance(
    intent_instance_id varchar(255) primary key,
    intent_id varchar(255)
    );