From a6a29c67cbb22b9b120d08fe5310a45a16d987c6 Mon Sep 17 00:00:00 2001
From: zhuguanyu <zhuguanyu5@huawei.com>
Date: Tue, 16 Aug 2022 16:14:56 +0800
Subject: Update intent module and intent API of retrieval

Issue-ID: USECASEUI-710
Signed-off-by: zhuguanyu <zhuguanyu5@huawei.com>
Change-Id: I1d6e19db2a4c78f07b907f51fa3c9cf904eff4aa
---
 .../src/main/resources/intent-analysis-init.sql     | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

(limited to 'intentanalysis/src/main/resources/intent-analysis-init.sql')

diff --git a/intentanalysis/src/main/resources/intent-analysis-init.sql b/intentanalysis/src/main/resources/intent-analysis-init.sql
index 727e0c6..d777077 100644
--- a/intentanalysis/src/main/resources/intent-analysis-init.sql
+++ b/intentanalysis/src/main/resources/intent-analysis-init.sql
@@ -1,3 +1,5 @@
+CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
+
 create table if not exists intent(
     intent_id varchar(255) primary key,
     intent_name varchar(255)
@@ -11,25 +13,24 @@ create table if not exists expectation(
 );
 
 create table if not exists expectation_object(
-    expectation_id varchar(255) primary key,
+    object_id varchar(255) DEFAULT uuid_generate_v4 (),
+    primary key(object_id),
     object_type varchar(255),
-    object_instance varchar(255)
+    object_instance varchar(255),
+    expectation_id varchar(255)
 );
 
 create table if not exists expectation_target(
     target_id varchar(255) primary key,
     target_name varchar(255),
+    target_condition varchar(255),
     expectation_id varchar(255)
 );
 
 create table if not exists context(
     context_id varchar(255) primary key,
-    context_name varchar(255)
-);
-
-create table if not exists context_mapping(
-    context_id varchar(255) primary key,
-    parent_type varchar(255),
+    context_name varchar(255),
+    context_condition varchar(255),
     parent_id varchar(255)
 );
 
@@ -61,10 +62,10 @@ create table if not exists condition_mapping(
     parent_id varchar(255)
     );
 
-create table if not exists intent_management_function_reg_info{
+create table if not exists intent_management_function_reg_info(
     imfr_info_id varchar(255) primary key,
     imfr_info_description varchar(255),
     support_model varchar(255),
     handle_name varchar(255),
     intent_function_type varchar(255)
-    };
\ No newline at end of file
+    );
\ No newline at end of file
-- 
cgit 1.2.3-korg

