-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathworkspace_project_mapping.go
52 lines (43 loc) · 1.81 KB
/
workspace_project_mapping.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package models
import (
"encoding/json"
"time"
"github.com/gobuffalo/pop/v6"
"github.com/gobuffalo/validate/v3"
"github.com/gofrs/uuid"
)
// WorkspaceProjectMapping is used by pop to map your workspace_project_mappings database table to your go code.
type WorkspaceProjectMapping struct {
ID uuid.UUID `json:"id" db:"id"`
WorkspaceID uuid.UUID `json:"workspace_id" db:"workspace_id"`
ProjectID uuid.UUID `json:"project_id" db:"project_id"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
// String is not required by pop and may be deleted
func (w WorkspaceProjectMapping) String() string {
jw, _ := json.Marshal(w)
return string(jw)
}
// WorkspaceProjectMappings is not required by pop and may be deleted
type WorkspaceProjectMappings []WorkspaceProjectMapping
// String is not required by pop and may be deleted
func (w WorkspaceProjectMappings) String() string {
jw, _ := json.Marshal(w)
return string(jw)
}
// Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.
// This method is not required and may be deleted.
func (w *WorkspaceProjectMapping) Validate(tx *pop.Connection) (*validate.Errors, error) {
return validate.NewErrors(), nil
}
// ValidateCreate gets run every time you call "pop.ValidateAndCreate" method.
// This method is not required and may be deleted.
func (w *WorkspaceProjectMapping) ValidateCreate(tx *pop.Connection) (*validate.Errors, error) {
return validate.NewErrors(), nil
}
// ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method.
// This method is not required and may be deleted.
func (w *WorkspaceProjectMapping) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error) {
return validate.NewErrors(), nil
}