import { Prisma } from "prisma/postgres/generated/prisma/client/postgres/client";


export const expense_select = {
	id: true,
	timesheet_id: true,
	bank_code: {
		select: { type: true, id: true }
	},
	attachment: true,
	date: true,
	amount: true,
	mileage: true,
	comment: true,
	supervisor_comment: true,
	is_approved: true,

} satisfies Prisma.ExpensesSelect;

export const shift_select = {
	id: true,
	timesheet_id: true,
	bank_code_id: true,
	bank_code: {
		select: { type: true },
	},
	date: true,
	start_time: true,
	end_time: true,
	is_remote: true,
	is_approved: true,
	comment: true,
} satisfies Prisma.ShiftsSelect;

export const leave_requests_select = {
	id: true,
	bank_code_id: true,
	leave_type: true,
	dates: true,
	payable_hours: true,
	requested_hours: true,
	comment: true,
	approval_status: true,
	employee: {
		select: {
			id: true,
			user: {
				select: {
					email: true,
					first_name: true,
					last_name: true,
				},
			},
		}
	},
} satisfies Prisma.LeaveRequestsSelect;

export const timesheet_select = {
	id: true,
	employee_id: true,
	shift: true,
	expense: true,
	start_date: true,
	is_approved: true,
} satisfies Prisma.TimesheetsSelect;

export const select_employee_timesheet = {
	timesheet: {
		select: {
			id: true,
			is_approved: true,
			employee: {
				select: {
					id: true,
					user: {
						select: {
							first_name: true,
							last_name: true,
							email: true,
						},
					},
				},
			},
		},
	},
};