import type { ColumnType, Insertable, Selectable, Updateable } from "kysely"
import type { FormsId } from "./Forms"
import type { InvitesId } from "./Invites"
import type { MembershipType } from "./MembershipType"

import { z } from "zod"

import { formsIdSchema } from "./Forms"
import { invitesIdSchema } from "./Invites"
import { membershipTypeSchema } from "./MembershipType"

// @generated
// This file is automatically generated by Kanel. Do not modify manually.

/** Represents the table public.invite_to_forms */
export interface InviteToFormsTable {
	formId: ColumnType<FormsId, FormsId, FormsId>

	inviteId: ColumnType<InvitesId, InvitesId, InvitesId>

	/** The type of object that the form is to be associated with\ncan technically be Form, but that does not make sense */
	type: ColumnType<MembershipType, MembershipType, MembershipType>
}

export type InviteToForms = Selectable<InviteToFormsTable>

export type NewInviteToForms = Insertable<InviteToFormsTable>

export type InviteToFormsUpdate = Updateable<InviteToFormsTable>

export const inviteToFormsSchema = z.object({
	formId: formsIdSchema,
	inviteId: invitesIdSchema,
	type: membershipTypeSchema,
})

export const inviteToFormsInitializerSchema = z.object({
	formId: formsIdSchema,
	inviteId: invitesIdSchema,
	type: membershipTypeSchema,
})

export const inviteToFormsMutatorSchema = z.object({
	formId: formsIdSchema.optional(),
	inviteId: invitesIdSchema.optional(),
	type: membershipTypeSchema.optional(),
})
