| 16 | @Model() |
| 17 | @ModelDocumentation("Documentation") |
| 18 | export 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 | |
| 43 | const model = parseModel(Example); |
| 44 |