m
This commit is contained in:
@@ -5,29 +5,155 @@ import { __transformDate__ } from "./__transformDate__";
|
||||
import { __nullable__ } from "./__nullable__";
|
||||
|
||||
export const UserPlain = t.Object(
|
||||
{ id: t.String(), email: t.String(), username: t.String() },
|
||||
{
|
||||
id: t.String(),
|
||||
email: t.String(),
|
||||
username: t.String(),
|
||||
password: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserRelations = t.Object({}, { additionalProperties: false });
|
||||
export const UserRelations = t.Object(
|
||||
{
|
||||
messages: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String(),
|
||||
conversationId: t.String(),
|
||||
senderId: t.String(),
|
||||
content: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
conversationMemberships: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String(),
|
||||
conversationId: t.String(),
|
||||
userId: t.String(),
|
||||
lastReadAt: __nullable__(t.Date()),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserPlainInputCreate = t.Object(
|
||||
{ email: t.String(), username: t.String() },
|
||||
{ email: t.String(), username: t.String(), password: t.String() },
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserPlainInputUpdate = t.Object(
|
||||
{ email: t.Optional(t.String()), username: t.Optional(t.String()) },
|
||||
{
|
||||
email: t.Optional(t.String()),
|
||||
username: t.Optional(t.String()),
|
||||
password: t.Optional(t.String()),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserRelationsInputCreate = t.Object(
|
||||
{},
|
||||
{
|
||||
messages: t.Optional(
|
||||
t.Object(
|
||||
{
|
||||
connect: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
conversationMemberships: t.Optional(
|
||||
t.Object(
|
||||
{
|
||||
connect: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const UserRelationsInputUpdate = t.Partial(
|
||||
t.Object({}, { additionalProperties: false }),
|
||||
t.Object(
|
||||
{
|
||||
messages: t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
connect: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
disconnect: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
conversationMemberships: t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
connect: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
disconnect: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const UserWhere = t.Partial(
|
||||
@@ -41,6 +167,8 @@ export const UserWhere = t.Partial(
|
||||
id: t.String(),
|
||||
email: t.String(),
|
||||
username: t.String(),
|
||||
password: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
@@ -83,7 +211,13 @@ export const UserWhereUnique = t.Recursive(
|
||||
),
|
||||
t.Partial(
|
||||
t.Object(
|
||||
{ id: t.String(), email: t.String(), username: t.String() },
|
||||
{
|
||||
id: t.String(),
|
||||
email: t.String(),
|
||||
username: t.String(),
|
||||
password: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
@@ -99,6 +233,10 @@ export const UserSelect = t.Partial(
|
||||
id: t.Boolean(),
|
||||
email: t.Boolean(),
|
||||
username: t.Boolean(),
|
||||
password: t.Boolean(),
|
||||
createdAt: t.Boolean(),
|
||||
messages: t.Boolean(),
|
||||
conversationMemberships: t.Boolean(),
|
||||
_count: t.Boolean(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
@@ -106,7 +244,14 @@ export const UserSelect = t.Partial(
|
||||
);
|
||||
|
||||
export const UserInclude = t.Partial(
|
||||
t.Object({ _count: t.Boolean() }, { additionalProperties: false }),
|
||||
t.Object(
|
||||
{
|
||||
messages: t.Boolean(),
|
||||
conversationMemberships: t.Boolean(),
|
||||
_count: t.Boolean(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const UserOrderBy = t.Partial(
|
||||
@@ -121,6 +266,12 @@ export const UserOrderBy = t.Partial(
|
||||
username: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
password: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
createdAt: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user