add new structure field of measurement table and add new test data of component table and station table
This commit is contained in:
parent
fcf4ef3f7d
commit
29d0e06c94
|
|
@ -92,7 +92,8 @@ insert into public.grid(id,tagname,name,description,op,ts) VALUES (1, 'grid1', '
|
|||
|
||||
insert into public.zone(id,grid_id,tagname,name,description,op,ts) VALUES (1, 1,'zone1', '区域1_1', '测试区域1_1', -1,CURRENT_TIMESTAMP);
|
||||
|
||||
insert into public.station(id,zone_id,tagname,name,description,is_local,op,ts) VALUES (1, 1,'station1', '站1_1_1', '测试站1_1_1', true, -1,CURRENT_TIMESTAMP);
|
||||
insert into public.station(id,zone_id,tagname,name,description,is_local,op,ts) VALUES (1, 1,'station1', '站1_1_1', '测试站1_1_1', true, -1,CURRENT_TIMESTAMP),
|
||||
(2, 1, 'station2', '站1_1_2', '测试站1_1_2', false, -1, CURRENT_TIMESTAMP);
|
||||
|
||||
INSERT INTO public.topologic(flag, uuid_from, uuid_to, context, description, op, ts)
|
||||
VALUES
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ type Measurement struct {
|
|||
Size int `gorm:"column:size;not null;default:-1"`
|
||||
DataSource JSONMap `gorm:"column:data_source;type:jsonb;not null;default:'{}'"`
|
||||
EventPlan JSONMap `gorm:"column:event_plan;type:jsonb;not null;default:'{}'"`
|
||||
Binding JSONMap `gorm:"column:binding;type:jsonb;not null;default:'{\"ct\":{\"ratio\":1.0,\"polarity\":1,\"index\":0},\"pt\":{\"ratio\":1.0,\"polarity\":1,\"index\":0}}'"`
|
||||
BayUUID uuid.UUID `gorm:"column:bay_uuid;type:uuid;not null"`
|
||||
ComponentUUID uuid.UUID `gorm:"column:component_uuid;type:uuid;not null"`
|
||||
Op int `gorm:"column:op;not null;default:-1"`
|
||||
|
|
|
|||
Loading…
Reference in New Issue