MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Fields

Method Fields

app/controlplane/pkg/data/ent/schema/project.go:36–53  ·  view source on GitHub ↗

Fields of the Project.

()

Source from the content-addressed store, hash-verified

34
35// Fields of the Project.
36func (Project) Fields() []ent.Field {
37 return []ent.Field{
38 field.UUID("id", uuid.UUID{}).Default(uuid.New).Unique(),
39 field.String("name").Immutable().Validate(biz.ValidateIsDNS1123),
40 field.String("description").Optional(),
41 field.Time("created_at").
42 Default(time.Now).
43 Immutable().
44 Annotations(&entsql.Annotation{
45 Default: "CURRENT_TIMESTAMP",
46 }),
47 field.Time("updated_at").
48 Default(time.Now).
49 Annotations(&entsql.Annotation{Default: "CURRENT_TIMESTAMP"}),
50 field.Time("deleted_at").Optional(),
51 field.UUID("organization_id", uuid.UUID{}).Immutable(),
52 }
53}
54
55// Edges of the Project.
56func (Project) Edges() []ent.Edge {

Callers 1

IndexesMethod · 0.45

Calls 5

DefaultMethod · 0.80
AnnotationsMethod · 0.80
StringMethod · 0.65
UniqueMethod · 0.45
ValidateMethod · 0.45

Tested by

no test coverage detected