import { createCrudRoutes } from '@/server/utils/generic-crud.routes';
import { DateNotes } from '@/server/modules/stock/date-notes.entity';
import { DateNotesSchema, CreateDateNotesDto, UpdateDateNotesDto } from '@/server/modules/stock/date-notes.schema';
import { authMiddleware } from '@/server/middleware/auth.middleware';

const dateNotesRoutes = createCrudRoutes({
  entity: DateNotes,
  createSchema: CreateDateNotesDto,
  updateSchema: UpdateDateNotesDto,
  getSchema: DateNotesSchema,
  listSchema: DateNotesSchema,
  searchFields: ['code', 'note'],
  middleware: [authMiddleware]
});

export default dateNotesRoutes;