From 459eff093939c077fd597cf5a217f3448140e274 Mon Sep 17 00:00:00 2001 From: yangk Date: Thu, 12 Nov 2020 13:35:42 +0800 Subject: [PATCH] modified monitor model --- db/model/monitor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/model/monitor.go b/db/model/monitor.go index e2446a9f3..98891d3aa 100644 --- a/db/model/monitor.go +++ b/db/model/monitor.go @@ -3,9 +3,9 @@ package model //TenantServiceMonitor custom service monitor type TenantServiceMonitor struct { Model - TenantID string `gorm:"column:tenant_id;size:40" json:"tenant_id"` + TenantID string `gorm:"column:tenant_id;size:40;primary_key" json:"tenant_id"` ServiceID string `gorm:"column:service_id;size:40" json:"service_id"` - Name string `gorm:"column:name;size:40;unique_index" json:"name"` + Name string `gorm:"column:name;size:40;primary_key" json:"name"` ServiceShowName string `gorm:"column:service_show_name" json:"service_show_name"` Port int `gorm:"column:port;size:5" json:"port"` Path string `gorm:"column:path;size:255" json:"path"`