import type {
	Staff,
	Department,
	Term,
	Message,
	Post,
	RoleMap,
	// Section,
	// Lecture,
	// Course,
	Enrollment,
} from "@prisma/client";
import { SocketMsgType, RolePerms } from "./enum";
import { RowRequestSchema } from "./schema";
import { z, string } from "zod";
import { StaffDto } from "./models/staff";
// import { MessageWithRelations, PostWithRelations, TroubleWithRelations } from "./generated";
export interface SocketMessage<T = any> {
	type: SocketMsgType;
	payload?: T;
}
export type AppLocalSettings = {
	urgent?: number;
	important?: number;
	exploreTime?: Date;
};
export interface DataNode {
	title: any;
	key: string;
	value: string;
	data?: any;
	order?: string;
	id?: string;
}
export interface TreeDataNode extends DataNode {
	hasChildren?: boolean;
	children?: TreeDataNode[];
	isLeaf?: boolean;
	pId?: string;
}

export interface BaseSetting {
	appConfig?: {
		splashScreen?: string;
		devDept?: string;
		slides?: string[];
		slideLinks?: string[];
		statistics?: {
			reads?: number;
			courses?: number;
			lectures?: number;
			staffs?: number;
		};
	};
}
export type RowModelResult = {
	rowData: any[];
	rowCount: number;
};
export type RowModelRequest = z.infer<typeof RowRequestSchema>;
