You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/11/07 12:18:23 UTC

[GitHub] [incubator-devlake] warren830 commented on a diff in pull request #3679: feat: add project api and tables

warren830 commented on code in PR #3679:
URL: https://github.com/apache/incubator-devlake/pull/3679#discussion_r1015353620


##########
models/project.go:
##########
@@ -0,0 +1,54 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package models
+
+import "github.com/apache/incubator-devlake/models/common"
+
+type Project struct {
+	Name     string `gorm:"primaryKey;type:varchar(255)"`
+	Describe string `gorm:"type:text"`
+
+	common.NoPKModel
+}
+
+func (Project) TableName() string {
+	return "_devlake_projects"
+}
+
+type ProjectMetric struct {
+	ProjectName  string `gorm:"primaryKey;type:varchar(255)"`
+	PluginName   string `gorm:"primaryKey;type:varchar(255)"`
+	PluginOption string `gorm:"type:text"`
+
+	common.NoPKModel
+}
+
+func (ProjectMetric) TableName() string {
+	return "_devlake_project_metrics"
+}
+
+type ProjectMapping struct {

Review Comment:
   @mindlesscloud already created this table in July



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org