added sqlite
This commit is contained in:
141
backend/app/generated/prismabox/User.ts
Normal file
141
backend/app/generated/prismabox/User.ts
Normal file
@@ -0,0 +1,141 @@
|
||||
import { t } from "elysia";
|
||||
|
||||
import { __transformDate__ } from "./__transformDate__";
|
||||
|
||||
import { __nullable__ } from "./__nullable__";
|
||||
|
||||
export const UserPlain = t.Object(
|
||||
{ id: t.String(), email: t.String(), username: t.String() },
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserRelations = t.Object({}, { additionalProperties: false });
|
||||
|
||||
export const UserPlainInputCreate = t.Object(
|
||||
{ email: t.String(), username: t.String() },
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserPlainInputUpdate = t.Object(
|
||||
{ email: t.Optional(t.String()), username: t.Optional(t.String()) },
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserRelationsInputCreate = t.Object(
|
||||
{},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserRelationsInputUpdate = t.Partial(
|
||||
t.Object({}, { additionalProperties: false }),
|
||||
);
|
||||
|
||||
export const UserWhere = t.Partial(
|
||||
t.Recursive(
|
||||
(Self) =>
|
||||
t.Object(
|
||||
{
|
||||
AND: t.Union([Self, t.Array(Self, { additionalProperties: false })]),
|
||||
NOT: t.Union([Self, t.Array(Self, { additionalProperties: false })]),
|
||||
OR: t.Array(Self, { additionalProperties: false }),
|
||||
id: t.String(),
|
||||
email: t.String(),
|
||||
username: t.String(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ $id: "User" },
|
||||
),
|
||||
);
|
||||
|
||||
export const UserWhereUnique = t.Recursive(
|
||||
(Self) =>
|
||||
t.Intersect(
|
||||
[
|
||||
t.Partial(
|
||||
t.Object(
|
||||
{ id: t.String(), email: t.String(), username: t.String() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
t.Union(
|
||||
[
|
||||
t.Object({ id: t.String() }),
|
||||
t.Object({ email: t.String() }),
|
||||
t.Object({ username: t.String() }),
|
||||
],
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
t.Partial(
|
||||
t.Object({
|
||||
AND: t.Union([
|
||||
Self,
|
||||
t.Array(Self, { additionalProperties: false }),
|
||||
]),
|
||||
NOT: t.Union([
|
||||
Self,
|
||||
t.Array(Self, { additionalProperties: false }),
|
||||
]),
|
||||
OR: t.Array(Self, { additionalProperties: false }),
|
||||
}),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
t.Partial(
|
||||
t.Object(
|
||||
{ id: t.String(), email: t.String(), username: t.String() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
],
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ $id: "User" },
|
||||
);
|
||||
|
||||
export const UserSelect = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
id: t.Boolean(),
|
||||
email: t.Boolean(),
|
||||
username: t.Boolean(),
|
||||
_count: t.Boolean(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const UserInclude = t.Partial(
|
||||
t.Object({ _count: t.Boolean() }, { additionalProperties: false }),
|
||||
);
|
||||
|
||||
export const UserOrderBy = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
id: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
email: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
username: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const User = t.Composite([UserPlain, UserRelations], {
|
||||
additionalProperties: false,
|
||||
});
|
||||
|
||||
export const UserInputCreate = t.Composite(
|
||||
[UserPlainInputCreate, UserRelationsInputCreate],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserInputUpdate = t.Composite(
|
||||
[UserPlainInputUpdate, UserRelationsInputUpdate],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
3
backend/app/generated/prismabox/__nullable__.ts
Normal file
3
backend/app/generated/prismabox/__nullable__.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { t, type TSchema } from "elysia";
|
||||
export const __nullable__ = <T extends TSchema>(schema: T) =>
|
||||
t.Union([t.Null(), schema]);
|
||||
6
backend/app/generated/prismabox/__transformDate__.ts
Normal file
6
backend/app/generated/prismabox/__transformDate__.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { t } from "elysia";
|
||||
export const __transformDate__ = (options?: Parameters<typeof t.String>[0]) =>
|
||||
t
|
||||
.Transform(t.String({ format: "date-time", ...options }))
|
||||
.Decode((value) => new Date(value))
|
||||
.Encode((value) => value.toISOString());
|
||||
3
backend/app/generated/prismabox/barrel.ts
Normal file
3
backend/app/generated/prismabox/barrel.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from "./User";
|
||||
export * from "./__nullable__";
|
||||
export * from "./__transformDate__";
|
||||
Reference in New Issue
Block a user