@cnae-hrms/shared-schemas

v1.0.10

Published

Shared database schemas and types for NASTP CNAE HRMS application

Readme

@cnae-hrms/shared-schemas

Shared database schemas and types for the CNAE HRMS application. This package provides TypeScript types and Drizzle ORM schemas that are used by both the frontend and backend applications.

Installation

npm install @cnae-hrms/shared-schemas

Usage

Importing Schemas

import { users, candidates, jobs, applications } from '@cnae-hrms/shared-schemas';

Importing Types

import type { User, Candidate, Job, Application } from '@cnae-hrms/shared-schemas';

Importing Insert Schemas

import type { InsertUser, InsertCandidate } from '@cnae-hrms/shared-schemas';

Available Schemas

Core Tables

  • users - User accounts and authentication
  • candidates - Candidate profiles and information
  • education - Educational background
  • experience - Work experience
  • jobs - Job postings
  • applications - Job applications
  • skills - Candidate skills
  • projects - Candidate projects

Assessment Tables

  • assessmentTemplates - Assessment templates
  • assessmentQuestions - Assessment questions
  • assessmentAttempts - Assessment attempts
  • assessmentAnswers - Assessment answers

Email & Communication

  • emailTemplates - Email templates
  • sentEmails - Sent email records

Scoring & Merit

  • jobEducationWeights - Education weightage for jobs
  • jobTestWeights - Test weightage for jobs
  • jobInterviewWeights - Interview weightage for jobs
  • jobExecutiveInterviewWeights - Executive interview weightage

Other Tables

  • candidateNotes - Admin notes on candidates
  • candidateReviews - Candidate reviews
  • aiScoringJobs - AI scoring batch jobs
  • aiScoringBatches - AI scoring batches
  • searchQueries - Search query logs
  • offers - Job offers
  • jobCosts - Job-related costs
  • companyInfo - Company information
  • uniRanking - University rankings

Available Types

Select Types

  • User, Candidate, Education, Experience, Job, Application, etc.

Insert Types

  • InsertUser, InsertCandidate, InsertEducation, etc.

Custom Types

  • SearchFilters - Search filter interface
  • SearchResult - Search result interface

Development

Building the Package

npm run build

Development Mode

npm run dev

Publishing

npm publish

Dependencies

  • drizzle-orm - Database ORM
  • zod - Schema validation

License

MIT