Skip to content

Commit 3cf8168

Browse files
authored
chore: update schema generated for tests (#432)
1 parent 8b4511b commit 3cf8168

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

tests/regression/test/issue-204/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ import { schema as $schema, type SchemaType as $Schema } from "./schema";
99
import { type ModelResult as $ModelResult, type TypeDefResult as $TypeDefResult } from "@zenstackhq/orm";
1010
export type Foo = $ModelResult<$Schema, "Foo">;
1111
export type Configuration = $TypeDefResult<$Schema, "Configuration">;
12-
export const ShirtColor = $schema.enums.ShirtColor;
12+
export const ShirtColor = $schema.enums.ShirtColor.values;
1313
export type ShirtColor = (typeof ShirtColor)[keyof typeof ShirtColor];

tests/regression/test/issue-204/schema.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* eslint-disable */
77

88
import { type SchemaDef } from "@zenstackhq/orm/schema";
9-
export const schema = {
9+
const _schema = {
1010
provider: {
1111
type: "sqlite"
1212
},
@@ -47,13 +47,19 @@ export const schema = {
4747
},
4848
enums: {
4949
ShirtColor: {
50-
Black: "Black",
51-
White: "White",
52-
Red: "Red",
53-
Green: "Green",
54-
Blue: "Blue"
50+
values: {
51+
Black: "Black",
52+
White: "White",
53+
Red: "Red",
54+
Green: "Green",
55+
Blue: "Blue"
56+
}
5557
}
5658
},
5759
plugins: {}
5860
} as const satisfies SchemaDef;
59-
export type SchemaType = typeof schema;
61+
type Schema = typeof _schema & {
62+
__brand?: "schema";
63+
};
64+
export const schema: Schema = _schema;
65+
export type SchemaType = Schema;

0 commit comments

Comments
 (0)