TP-55555 | Project handler

This commit is contained in:
Lokesh Dugar
2024-07-24 12:30:35 +05:30
parent 80fe136a42
commit 0952887606
14 changed files with 104 additions and 74 deletions

View File

@@ -4,6 +4,6 @@ import "gorm.io/gorm"
type Release struct {
gorm.Model
ProductReferenceId string `gorm:"primaryKey"`
ProjectReferenceId string `gorm:"primaryKey"`
ReleaseVersion string `gorm:"column:name"`
}

View File

@@ -1,9 +0,0 @@
package db
import "gorm.io/gorm"
type Product struct {
gorm.Model
ProductReferenceId string `gorm:"primaryKey"`
Name string `gorm:"column:name"`
}

13
models/db/project.go Normal file
View File

@@ -0,0 +1,13 @@
package db
import (
"github.com/google/uuid"
"gorm.io/gorm"
)
type Project struct {
gorm.Model
ProjectReferenceId uuid.UUID `gorm:"primaryKey"`
Name string `gorm:"column:name;unique"`
Team string
}

View File

@@ -4,7 +4,6 @@ import "gorm.io/gorm"
type Roles struct {
gorm.Model
ProductReferenceId string `gorm:"primaryKey"`
ProjectReferenceId string `gorm:"primaryKey"`
Role string `gorm:"column:name"`
}