proflores-db-model 0.1.13 → 0.1.15
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/dist/entities/ExpenseDetail.d.ts +10 -0
- package/dist/entities/ExpenseTransaction.d.ts +16 -0
- package/dist/entities/ExpenseType.d.ts +6 -0
- package/dist/entities/InventoryItem.d.ts +8 -0
- package/dist/entities/InventoryItem.js +39 -0
- package/dist/entities/ProjectOrder.d.ts +11 -0
- package/dist/entities/Transaction.d.ts +0 -0
- package/dist/entities/User.d.ts +15 -0
- package/dist/index.d.ts +6 -0
- package/dist/types/ExpenseDetailType.d.ts +9 -0
- package/dist/types/ExpenseTransactionType.d.ts +15 -0
- package/dist/types/ExpenseTypeType.d.ts +5 -0
- package/dist/types/ProjectOrderType.d.ts +10 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
- package/src/entities/InventoryItem.ts +19 -0
- package/tsconfig.json +2 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ObjectLiteral } from "typeorm";
|
|
2
|
+
import { ExpenseTransaction } from "./ExpenseTransaction";
|
|
3
|
+
export declare class ExpenseDetail implements ObjectLiteral {
|
|
4
|
+
expenseDetailId: number;
|
|
5
|
+
expenseTransaction: ExpenseTransaction;
|
|
6
|
+
concept: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
unitPrice: number;
|
|
9
|
+
purchaseDate: Date;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ObjectLiteral } from "typeorm";
|
|
2
|
+
import { ProjectOrder } from "./ProjectOrder";
|
|
3
|
+
import { ExpenseType } from "./ExpenseType";
|
|
4
|
+
import { ExpenseDetail } from "./ExpenseDetail";
|
|
5
|
+
export declare class ExpenseTransaction implements ObjectLiteral {
|
|
6
|
+
expenseTransactionId: number;
|
|
7
|
+
bankId: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
transactionDate: Date;
|
|
10
|
+
paymentMethod: string;
|
|
11
|
+
description: string;
|
|
12
|
+
mediaFile: string;
|
|
13
|
+
projectOrder: ProjectOrder;
|
|
14
|
+
expenseType: ExpenseType;
|
|
15
|
+
expenseDetails: ExpenseDetail[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.InventoryItem = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let InventoryItem = class InventoryItem {
|
|
15
|
+
};
|
|
16
|
+
__decorate([
|
|
17
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("increment"),
|
|
18
|
+
__metadata("design:type", Number)
|
|
19
|
+
], InventoryItem.prototype, "idInventoryItem", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.Column)("varchar", { nullable: false, length: 255 }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], InventoryItem.prototype, "concept", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)("varchar", { nullable: false, length: 100 }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], InventoryItem.prototype, "container", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)("decimal", { nullable: false }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], InventoryItem.prototype, "wholesalePrice", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)("decimal", { nullable: false }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], InventoryItem.prototype, "retailPrice", void 0);
|
|
36
|
+
InventoryItem = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)("inventory_items")
|
|
38
|
+
], InventoryItem);
|
|
39
|
+
exports.InventoryItem = InventoryItem;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ObjectLiteral } from "typeorm";
|
|
2
|
+
export declare class ProjectOrder implements ObjectLiteral {
|
|
3
|
+
projectId: number;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
location: string;
|
|
7
|
+
startDate: Date;
|
|
8
|
+
endDate: Date;
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
estimatedAmount: number;
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ObjectLiteral } from 'typeorm';
|
|
2
|
+
export declare class User implements ObjectLiteral {
|
|
3
|
+
userId: number;
|
|
4
|
+
email: string | null;
|
|
5
|
+
firstName: string | null;
|
|
6
|
+
lastName: string | null;
|
|
7
|
+
googleId: string | null;
|
|
8
|
+
facebookId: string | null;
|
|
9
|
+
appleId: string | null;
|
|
10
|
+
password: string | null;
|
|
11
|
+
picture: string | null;
|
|
12
|
+
isActive: boolean;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ExpenseDetail } from "./entities/ExpenseDetail";
|
|
2
|
+
export { ExpenseType } from "./entities/ExpenseType";
|
|
3
|
+
export { ProjectOrder } from "./entities/ProjectOrder";
|
|
4
|
+
export { User } from "./entities/User";
|
|
5
|
+
export { ExpenseTransaction } from "./entities/ExpenseTransaction";
|
|
6
|
+
export * from "./types";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ExpenseTransactionType } from "./ExpenseTransactionType";
|
|
2
|
+
export interface ExpenseDetailType {
|
|
3
|
+
expenseDetailId: number;
|
|
4
|
+
expenseTransaction?: ExpenseTransactionType;
|
|
5
|
+
concept: string;
|
|
6
|
+
quantity: number;
|
|
7
|
+
unitPrice: number;
|
|
8
|
+
purchaseDate: Date;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProjectOrderType } from "./ProjectOrderType";
|
|
2
|
+
import { ExpenseTypeType } from "./ExpenseTypeType";
|
|
3
|
+
import { ExpenseDetailType } from "./ExpenseDetailType";
|
|
4
|
+
export interface ExpenseTransactionType {
|
|
5
|
+
expenseTransactionId: number;
|
|
6
|
+
bankId: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
transactionDate: Date;
|
|
9
|
+
paymentMethod: string;
|
|
10
|
+
description: string;
|
|
11
|
+
mediaFile?: string;
|
|
12
|
+
projectOrder?: ProjectOrderType;
|
|
13
|
+
expenseType?: ExpenseTypeType;
|
|
14
|
+
expenseDetails?: ExpenseDetailType[];
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Entity, PrimaryGeneratedColumn, Column, ObjectLiteral } from "typeorm";
|
|
2
|
+
|
|
3
|
+
@Entity("inventory_items")
|
|
4
|
+
export class InventoryItem implements ObjectLiteral {
|
|
5
|
+
@PrimaryGeneratedColumn("increment")
|
|
6
|
+
idInventoryItem!: number;
|
|
7
|
+
|
|
8
|
+
@Column("varchar", { nullable: false, length: 255 })
|
|
9
|
+
concept!: string;
|
|
10
|
+
|
|
11
|
+
@Column("varchar", { nullable: false, length: 100 })
|
|
12
|
+
container!: string;
|
|
13
|
+
|
|
14
|
+
@Column("decimal", { nullable: false })
|
|
15
|
+
wholesalePrice!: number;
|
|
16
|
+
|
|
17
|
+
@Column("decimal", { nullable: false })
|
|
18
|
+
retailPrice!: number;
|
|
19
|
+
}
|