/
project.go
69 lines (62 loc) · 2.39 KB
/
project.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Code generated by ent, DO NOT EDIT.
package project
import (
"time"
"github.com/google/uuid"
)
const (
// Label holds the string label denoting the project type in the database.
Label = "project"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldCreateTime holds the string denoting the create_time field in the database.
FieldCreateTime = "create_time"
// FieldUpdateTime holds the string denoting the update_time field in the database.
FieldUpdateTime = "update_time"
// FieldTitle holds the string denoting the title field in the database.
FieldTitle = "title"
// FieldDescription holds the string denoting the description field in the database.
FieldDescription = "description"
// EdgeIssues holds the string denoting the issues edge name in mutations.
EdgeIssues = "issues"
// Table holds the table name of the project in the database.
Table = "projects"
// IssuesTable is the table that holds the issues relation/edge.
IssuesTable = "issues"
// IssuesInverseTable is the table name for the Issue entity.
// It exists in this package in order to avoid circular dependency with the "issue" package.
IssuesInverseTable = "issues"
// IssuesColumn is the table column denoting the issues relation/edge.
IssuesColumn = "project_issues"
)
// Columns holds all SQL columns for project fields.
var Columns = []string{
FieldID,
FieldCreateTime,
FieldUpdateTime,
FieldTitle,
FieldDescription,
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// DefaultCreateTime holds the default value on creation for the "create_time" field.
DefaultCreateTime func() time.Time
// DefaultUpdateTime holds the default value on creation for the "update_time" field.
DefaultUpdateTime func() time.Time
// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
UpdateDefaultUpdateTime func() time.Time
// TitleValidator is a validator for the "title" field. It is called by the builders before save.
TitleValidator func(string) error
// DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
DescriptionValidator func(string) error
// DefaultID holds the default value on creation for the "id" field.
DefaultID func() uuid.UUID
)