MCPcopy Create free account
hub / github.com/alii/trisma / Example

Class Example

example.ts:18–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16@Model()
17@ModelDocumentation("Documentation")
18export class Example {
19 @ID()
20 @Field()
21 @Documentation("This is the ID of the row")
22 @Default("now()")
23 id!: string;
24
25 @Field()
26 @Array(String)
27 names!: string[];
28
29 @Field()
30 @Nullable()
31 created_at?: Date;
32
33 @Field()
34 @UpdatedAt()
35 updated_at!: Date;
36
37 @Field("Boolean")
38 @Default(true)
39 @Unique()
40 count!: boolean;
41}
42
43const model = parseModel(Example);
44

Callers

nothing calls this directly

Calls 8

IDFunction · 0.90
FieldFunction · 0.90
DocumentationFunction · 0.90
DefaultFunction · 0.90
ArrayFunction · 0.90
NullableFunction · 0.90
UpdatedAtFunction · 0.90
UniqueFunction · 0.90

Tested by

no test coverage detected