m
This commit is contained in:
250
backend/app/generated/prismabox/Conversation.ts
Normal file
250
backend/app/generated/prismabox/Conversation.ts
Normal file
@@ -0,0 +1,250 @@
|
||||
import { t } from "elysia";
|
||||
|
||||
import { __transformDate__ } from "./__transformDate__";
|
||||
|
||||
import { __nullable__ } from "./__nullable__";
|
||||
|
||||
export const ConversationPlain = t.Object(
|
||||
{ id: t.String(), createdAt: t.Date() },
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationRelations = t.Object(
|
||||
{
|
||||
participants: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String(),
|
||||
conversationId: t.String(),
|
||||
userId: t.String(),
|
||||
lastReadAt: __nullable__(t.Date()),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
messages: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String(),
|
||||
conversationId: t.String(),
|
||||
senderId: t.String(),
|
||||
content: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationPlainInputCreate = t.Object(
|
||||
{},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationPlainInputUpdate = t.Object(
|
||||
{},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationRelationsInputCreate = t.Object(
|
||||
{
|
||||
participants: t.Optional(
|
||||
t.Object(
|
||||
{
|
||||
connect: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
messages: t.Optional(
|
||||
t.Object(
|
||||
{
|
||||
connect: t.Array(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationRelationsInputUpdate = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
participants: 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 },
|
||||
),
|
||||
),
|
||||
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 },
|
||||
),
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const ConversationWhere = 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(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ $id: "Conversation" },
|
||||
),
|
||||
);
|
||||
|
||||
export const ConversationWhereUnique = t.Recursive(
|
||||
(Self) =>
|
||||
t.Intersect(
|
||||
[
|
||||
t.Partial(
|
||||
t.Object({ id: t.String() }, { additionalProperties: false }),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
t.Union([t.Object({ id: 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(), createdAt: t.Date() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
],
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ $id: "Conversation" },
|
||||
);
|
||||
|
||||
export const ConversationSelect = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
id: t.Boolean(),
|
||||
createdAt: t.Boolean(),
|
||||
participants: t.Boolean(),
|
||||
messages: t.Boolean(),
|
||||
_count: t.Boolean(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const ConversationInclude = t.Partial(
|
||||
t.Object(
|
||||
{ participants: t.Boolean(), messages: t.Boolean(), _count: t.Boolean() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const ConversationOrderBy = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
id: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
createdAt: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const Conversation = t.Composite(
|
||||
[ConversationPlain, ConversationRelations],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationInputCreate = t.Composite(
|
||||
[ConversationPlainInputCreate, ConversationRelationsInputCreate],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationInputUpdate = t.Composite(
|
||||
[ConversationPlainInputUpdate, ConversationRelationsInputUpdate],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
245
backend/app/generated/prismabox/ConversationParticipant.ts
Normal file
245
backend/app/generated/prismabox/ConversationParticipant.ts
Normal file
@@ -0,0 +1,245 @@
|
||||
import { t } from "elysia";
|
||||
|
||||
import { __transformDate__ } from "./__transformDate__";
|
||||
|
||||
import { __nullable__ } from "./__nullable__";
|
||||
|
||||
export const ConversationParticipantPlain = t.Object(
|
||||
{
|
||||
id: t.String(),
|
||||
conversationId: t.String(),
|
||||
userId: t.String(),
|
||||
lastReadAt: __nullable__(t.Date()),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationParticipantRelations = t.Object(
|
||||
{
|
||||
conversation: t.Object(
|
||||
{ id: t.String(), createdAt: t.Date() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
user: t.Object(
|
||||
{
|
||||
id: t.String(),
|
||||
email: t.String(),
|
||||
username: t.String(),
|
||||
password: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationParticipantPlainInputCreate = t.Object(
|
||||
{ lastReadAt: t.Optional(__nullable__(t.Date())) },
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationParticipantPlainInputUpdate = t.Object(
|
||||
{ lastReadAt: t.Optional(__nullable__(t.Date())) },
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationParticipantRelationsInputCreate = t.Object(
|
||||
{
|
||||
conversation: t.Object(
|
||||
{
|
||||
connect: t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
user: t.Object(
|
||||
{
|
||||
connect: t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationParticipantRelationsInputUpdate = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
conversation: t.Object(
|
||||
{
|
||||
connect: t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
user: t.Object(
|
||||
{
|
||||
connect: t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const ConversationParticipantWhere = 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(),
|
||||
conversationId: t.String(),
|
||||
userId: t.String(),
|
||||
lastReadAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ $id: "ConversationParticipant" },
|
||||
),
|
||||
);
|
||||
|
||||
export const ConversationParticipantWhereUnique = t.Recursive(
|
||||
(Self) =>
|
||||
t.Intersect(
|
||||
[
|
||||
t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
id: t.String(),
|
||||
conversationId_userId: t.Object(
|
||||
{ conversationId: t.String(), userId: t.String() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
t.Union(
|
||||
[
|
||||
t.Object({ id: t.String() }),
|
||||
t.Object({
|
||||
conversationId_userId: t.Object(
|
||||
{ conversationId: t.String(), userId: t.String() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
}),
|
||||
],
|
||||
{ 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(),
|
||||
conversationId: t.String(),
|
||||
userId: t.String(),
|
||||
lastReadAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
],
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ $id: "ConversationParticipant" },
|
||||
);
|
||||
|
||||
export const ConversationParticipantSelect = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
id: t.Boolean(),
|
||||
conversationId: t.Boolean(),
|
||||
userId: t.Boolean(),
|
||||
conversation: t.Boolean(),
|
||||
user: t.Boolean(),
|
||||
lastReadAt: t.Boolean(),
|
||||
_count: t.Boolean(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const ConversationParticipantInclude = t.Partial(
|
||||
t.Object(
|
||||
{ conversation: t.Boolean(), user: t.Boolean(), _count: t.Boolean() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const ConversationParticipantOrderBy = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
id: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
conversationId: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
userId: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
lastReadAt: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const ConversationParticipant = t.Composite(
|
||||
[ConversationParticipantPlain, ConversationParticipantRelations],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationParticipantInputCreate = t.Composite(
|
||||
[
|
||||
ConversationParticipantPlainInputCreate,
|
||||
ConversationParticipantRelationsInputCreate,
|
||||
],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConversationParticipantInputUpdate = t.Composite(
|
||||
[
|
||||
ConversationParticipantPlainInputUpdate,
|
||||
ConversationParticipantRelationsInputUpdate,
|
||||
],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
227
backend/app/generated/prismabox/Message.ts
Normal file
227
backend/app/generated/prismabox/Message.ts
Normal file
@@ -0,0 +1,227 @@
|
||||
import { t } from "elysia";
|
||||
|
||||
import { __transformDate__ } from "./__transformDate__";
|
||||
|
||||
import { __nullable__ } from "./__nullable__";
|
||||
|
||||
export const MessagePlain = t.Object(
|
||||
{
|
||||
id: t.String(),
|
||||
conversationId: t.String(),
|
||||
senderId: t.String(),
|
||||
content: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const MessageRelations = t.Object(
|
||||
{
|
||||
conversation: t.Object(
|
||||
{ id: t.String(), createdAt: t.Date() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
sender: t.Object(
|
||||
{
|
||||
id: t.String(),
|
||||
email: t.String(),
|
||||
username: t.String(),
|
||||
password: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const MessagePlainInputCreate = t.Object(
|
||||
{ content: t.String() },
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const MessagePlainInputUpdate = t.Object(
|
||||
{ content: t.Optional(t.String()) },
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const MessageRelationsInputCreate = t.Object(
|
||||
{
|
||||
conversation: t.Object(
|
||||
{
|
||||
connect: t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
sender: t.Object(
|
||||
{
|
||||
connect: t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const MessageRelationsInputUpdate = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
conversation: t.Object(
|
||||
{
|
||||
connect: t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
sender: t.Object(
|
||||
{
|
||||
connect: t.Object(
|
||||
{
|
||||
id: t.String({ additionalProperties: false }),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const MessageWhere = 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(),
|
||||
conversationId: t.String(),
|
||||
senderId: t.String(),
|
||||
content: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ $id: "Message" },
|
||||
),
|
||||
);
|
||||
|
||||
export const MessageWhereUnique = t.Recursive(
|
||||
(Self) =>
|
||||
t.Intersect(
|
||||
[
|
||||
t.Partial(
|
||||
t.Object({ id: t.String() }, { additionalProperties: false }),
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
t.Union([t.Object({ id: 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(),
|
||||
conversationId: t.String(),
|
||||
senderId: t.String(),
|
||||
content: t.String(),
|
||||
createdAt: t.Date(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
),
|
||||
],
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
{ $id: "Message" },
|
||||
);
|
||||
|
||||
export const MessageSelect = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
id: t.Boolean(),
|
||||
conversationId: t.Boolean(),
|
||||
senderId: t.Boolean(),
|
||||
content: t.Boolean(),
|
||||
createdAt: t.Boolean(),
|
||||
conversation: t.Boolean(),
|
||||
sender: t.Boolean(),
|
||||
_count: t.Boolean(),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const MessageInclude = t.Partial(
|
||||
t.Object(
|
||||
{ conversation: t.Boolean(), sender: t.Boolean(), _count: t.Boolean() },
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const MessageOrderBy = t.Partial(
|
||||
t.Object(
|
||||
{
|
||||
id: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
conversationId: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
senderId: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
content: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
createdAt: t.Union([t.Literal("asc"), t.Literal("desc")], {
|
||||
additionalProperties: false,
|
||||
}),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
),
|
||||
);
|
||||
|
||||
export const Message = t.Composite([MessagePlain, MessageRelations], {
|
||||
additionalProperties: false,
|
||||
});
|
||||
|
||||
export const MessageInputCreate = t.Composite(
|
||||
[MessagePlainInputCreate, MessageRelationsInputCreate],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const MessageInputUpdate = t.Composite(
|
||||
[MessagePlainInputUpdate, MessageRelationsInputUpdate],
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
@@ -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 },
|
||||
),
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
export * from "./User";
|
||||
export * from "./Conversation";
|
||||
export * from "./ConversationParticipant";
|
||||
export * from "./Message";
|
||||
export * from "./__nullable__";
|
||||
export * from "./__transformDate__";
|
||||
|
||||
Reference in New Issue
Block a user