@factor-wise/prisma-schema 1.0.0 → 1.0.2
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.
- package/README.md +69 -0
- package/package.json +23 -6
- package/prisma/schema.prisma +2448 -0
- package/tsconfig.json +25 -0
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,12 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factor-wise/prisma-schema",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Shared Prisma schema and generated client for Factor Wise projects",
|
|
5
|
+
"main": "generated/client/index.js",
|
|
6
|
+
"types": "generated/client/index.d.ts",
|
|
5
7
|
"scripts": {
|
|
6
|
-
"
|
|
8
|
+
"generate": "prisma generate",
|
|
9
|
+
"build": "npm run generate",
|
|
10
|
+
"prepublishOnly": "npm run build",
|
|
11
|
+
"test": "echo \"No tests configured\" && exit 0"
|
|
7
12
|
},
|
|
8
|
-
"keywords": [
|
|
9
|
-
|
|
13
|
+
"keywords": [
|
|
14
|
+
"prisma",
|
|
15
|
+
"schema",
|
|
16
|
+
"shared",
|
|
17
|
+
"nestjs",
|
|
18
|
+
"database",
|
|
19
|
+
"factor-wise"
|
|
20
|
+
],
|
|
21
|
+
"author": "Factor Wise",
|
|
10
22
|
"license": "ISC",
|
|
11
|
-
"
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@prisma/client": "^6.16.2"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"prisma": "^6.16.2"
|
|
28
|
+
}
|
|
12
29
|
}
|