export const phoneCallRelations = relations(schema.phone_call, ({ one, many }) => ({
owner: one(schema.user, {
fields: [schema.phone_call.owner_id],
references: [schema.user.id],
}),
parent: one(schema.phone_call, {
fields: [schema.phone_call.parent_id],
references: [schema.phone_call.id],
}),
children: many(schema.phone_call),
}));
export const phoneCallRelations = relations(schema.phone_call, ({ one, many }) => ({
owner: one(schema.user, {
fields: [schema.phone_call.owner_id],
references: [schema.user.id],
}),
parent: one(schema.phone_call, {
fields: [schema.phone_call.parent_id],
references: [schema.phone_call.id],
}),
children: many(schema.phone_call),
}));