diff options
author | zhangfan345 <zhangfan345@huawei.com> | 2022-09-01 11:24:47 +0800 |
---|---|---|
committer | zhangfan345 <zhangfan345@huawei.com> | 2022-09-01 14:40:14 +0800 |
commit | 54e7ca4ddf183cd15bd7afff0c53b1970698432b (patch) | |
tree | 8b4e8f780b24b409e4e81a375e9e933415e444f5 /intentanalysis/src/test/resources/intentdb-test-init.sql | |
parent | 0699e877538e8ee6179750112a4414848058fe09 (diff) |
Add UT to intent service
Issue-ID: USECASEUI-716
Signed-off-by: zhangfan345 <zhangfan345@huawei.com>
Change-Id: I45b7faf76bf899510d11939021fd1d788c95a4bf
Diffstat (limited to 'intentanalysis/src/test/resources/intentdb-test-init.sql')
-rw-r--r-- | intentanalysis/src/test/resources/intentdb-test-init.sql | 78 |
1 files changed, 58 insertions, 20 deletions
diff --git a/intentanalysis/src/test/resources/intentdb-test-init.sql b/intentanalysis/src/test/resources/intentdb-test-init.sql index b84f8e3..211e1cb 100644 --- a/intentanalysis/src/test/resources/intentdb-test-init.sql +++ b/intentanalysis/src/test/resources/intentdb-test-init.sql @@ -14,29 +14,67 @@ Date: 30/12/2019 14:40:23 */ -DROP TABLE IF EXISTS intent; -DROP TABLE IF EXISTS expectation; -DROP TABLE IF EXISTS state; - -CREATE TABLE if NOT EXISTS intent( - intent_id varchar(255), - intent_name varchar(255), - CONSTRAINT intent_test_task_pkey PRIMARY KEY (intent_id) +//CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; + +DROP TABLE IF EXISTS intent; +DROP TABLE IF EXISTS expectation; +DROP TABLE IF EXISTS expectation_object; +DROP TABLE IF EXISTS expectation_target; +DROP TABLE IF EXISTS context; +DROP TABLE IF EXISTS fulfilment_info; +DROP TABLE IF EXISTS condition; + +create table if not exists intent +( + intent_id varchar(255) primary key, + intent_name varchar(255) ); -create table if not exists expectation( - expectation_id varchar(255), +create table if not exists expectation +( + expectation_id varchar(255) primary key, expectation_name varchar(255), - target_moi varchar(255), - intent_id varchar(255), - CONSTRAINT expectation_test_task_pkey PRIMARY KEY (expectation_id) + expectation_type varchar(255), + intent_id varchar(255) +); + +create table if not exists expectation_object +( + object_id varchar(255) DEFAULT random_uuid(), + primary key (object_id), + object_type 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), + expectation_id varchar(255) ); -create table if not exists state( - state_id varchar(255), - state_name varchar(255), - is_satisfied boolean, - condition varchar(255), - expectation_id varchar(255), - CONSTRAINT state_test_task_pkey PRIMARY KEY (state_id) +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 fulfilment_info +( + fulfilment_info_id varchar(255) primary key, + fulfilment_info_status varchar(255), + not_fulfilled_state varchar(255), + not_fulfilled_reason 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) +); + |