db

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableMSPTenant = "msp_tenant"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MSPTenant

type MSPTenant struct {
	Id               string    `gorm:"column:id" db:"id" json:"id" form:"id"`                                                                 // Tenant id
	Type             string    `gorm:"column:type" db:"type" json:"type" form:"type"`                                                         // Tenant type(dop 、msp)
	RelatedProjectId int64     `gorm:"column:related_project_id" db:"related_project_id" json:"related_project_id" form:"related_project_id"` // Project id
	RelatedWorkspace string    `gorm:"column:related_workspace" db:"related_workspace" json:"related_workspace" form:"related_workspace"`     // Workspace( DEV、TEST、STAGING、PROD、DEFAULT)
	CreateTime       time.Time `gorm:"column:create_time" db:"create_time" json:"create_time" form:"create_time"`                             // Create time
	UpdateTime       time.Time `gorm:"column:update_time" db:"update_time" json:"update_time" form:"update_time"`                             // Update time
	IsDeleted        bool      `gorm:"column:is_deleted" db:"is_deleted" json:"is_deleted" form:"is_deleted"`                                 // Delete or not
}

func (MSPTenant) TableName

func (MSPTenant) TableName() string

type MSPTenantDB

type MSPTenantDB struct {
	*gorm.DB
}

MSPTenantDB msp_tenant

func (*MSPTenantDB) InsertTenant

func (db *MSPTenantDB) InsertTenant(tenant *MSPTenant) (*MSPTenant, *errors.DatabaseError)

func (*MSPTenantDB) QueryTenant

func (db *MSPTenantDB) QueryTenant(tenantID string) (*MSPTenant, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL