@factor-wise/prisma-schema 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,45 @@
1
+ name: 🚀 Publish to NPM
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ publish:
10
+ name: 📦 Publish Prisma Schema Package
11
+ runs-on: ubuntu-latest
12
+
13
+ permissions:
14
+ contents: write # allow pushing tags/commits back
15
+
16
+ steps:
17
+ - name: 🛎️ Checkout repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: 🧰 Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: 20
24
+ registry-url: "https://registry.npmjs.org"
25
+
26
+ - name: 📥 Install dependencies
27
+ run: npm install # use install instead of ci if package-lock.json is missing
28
+
29
+ - name: 📝 Configure Git user
30
+ run: |
31
+ git config --global user.name "github-actions[bot]"
32
+ git config --global user.email "actions@github.com"
33
+
34
+ - name: 📝 Bump version
35
+ run: npm version patch -m "🔖 Bump version to %s [skip ci]"
36
+
37
+ - name: 🚀 Publish to NPM
38
+ env:
39
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40
+ run: npm publish --access public
41
+
42
+ - name: 🧠 Push version bump & tags to GitHub
43
+ env:
44
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45
+ run: git push origin main --follow-tags
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # 🏗️ Factorwise Project — Prisma Schema
2
+
3
+ Welcome to the **Factorwise Project Schema Repository**.
4
+ This repository contains the **official Prisma schema**, migrations, and related setup for the Factorwise backend system. It is designed specifically for **Factorwise** and **must not** be reused or modified for any other projects.
5
+
6
+ > ⚠️ **Important:**
7
+ > This is a **private schema**. Usage of this schema outside of the Factorwise environment is strictly prohibited.
8
+
9
+ ---
10
+
11
+ ## 📚 Table of Contents
12
+
13
+ - [📌 Project Overview](#-project-overview)
14
+ - [🛠️ Tech Stack](#️-tech-stack)
15
+ - [📂 Project Structure](#-project-structure)
16
+ - [🚀 Getting Started](#-getting-started)
17
+ - [🧭 Development Workflow](#-development-workflow)
18
+ - [⚡ Common Commands](#-common-commands)
19
+ - [🔒 Important Notes](#-important-notes)
20
+ - [📄 License](#-license)
21
+
22
+ ---
23
+
24
+ ## 📌 Project Overview
25
+
26
+ This schema serves as the **single source of truth** for the Factorwise backend database.
27
+ It defines the models, relations, enums, and constraints required for all services interacting with the Factorwise data layer.
28
+
29
+ - ✅ Centralized schema for all DB models
30
+ - ✅ Managed migrations with Prisma
31
+ - ✅ Enums and mappings aligned with business logic
32
+ - ✅ Designed for multi-tenant setups using Prisma Client
33
+
34
+ ---
35
+
36
+ ## 🛠️ Tech Stack
37
+
38
+ - **[Prisma ORM](https://www.prisma.io/)** — Database modeling & migrations
39
+ - **TypeScript** — Type-safe schema and client code
40
+ - **MySQL** — Primary database engine
41
+ - **Node.js / NestJS** — For backend integration
42
+
43
+ ---
44
+
45
+ ## 📂 Project Structure
46
+
47
+ - `prisma/schema.prisma` → Core database models and enums for Factorwise.
48
+ - `migrations/` → Auto-generated by Prisma when pushing changes.
49
+ - `package.json` → Used for managing versioning and publishing the schema internally.
50
+ - `README.md` → Project documentation.
51
+
52
+ ---
53
+
54
+ ## 🚀 Getting Started
55
+
56
+ ```bash
57
+
58
+ npm install
59
+
60
+
61
+ npx prisma generate
62
+
63
+
64
+ npx prisma db push
65
+ ```
66
+
67
+ ---
68
+
69
+ _Built and maintained with ❤️ by the **Factorwise Development Team**._
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factor-wise/prisma-schema",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Shared Prisma schema and generated client for Factor Wise projects",
5
5
  "main": "generated/client/index.js",
6
6
  "types": "generated/client/index.d.ts",