test-entity-library-asm 3.4.6 → 3.4.7
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.
|
@@ -97,6 +97,13 @@ var LocalTable = /** @class */ (function () {
|
|
|
97
97
|
}),
|
|
98
98
|
__metadata("design:type", Object)
|
|
99
99
|
], LocalTable.prototype, "description", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({
|
|
102
|
+
type: "int",
|
|
103
|
+
comment: "Número consecutivo de cada mesa.",
|
|
104
|
+
}),
|
|
105
|
+
__metadata("design:type", Number)
|
|
106
|
+
], LocalTable.prototype, "number", void 0);
|
|
100
107
|
__decorate([
|
|
101
108
|
(0, typeorm_1.Column)({
|
|
102
109
|
type: "datetime",
|
|
@@ -145,7 +152,8 @@ var LocalTable = /** @class */ (function () {
|
|
|
145
152
|
(0, typeorm_1.Entity)({
|
|
146
153
|
comment: "Mesas qué se encuentran en el local.",
|
|
147
154
|
name: "local_table",
|
|
148
|
-
})
|
|
155
|
+
}),
|
|
156
|
+
(0, typeorm_1.Unique)("uq_zone_number", ["zone", "number"])
|
|
149
157
|
], LocalTable);
|
|
150
158
|
return LocalTable;
|
|
151
159
|
}());
|
package/package.json
CHANGED
|
@@ -5,14 +5,22 @@ import {
|
|
|
5
5
|
ManyToOne,
|
|
6
6
|
OneToMany,
|
|
7
7
|
PrimaryGeneratedColumn,
|
|
8
|
+
Unique,
|
|
8
9
|
} from "typeorm";
|
|
9
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Local,
|
|
12
|
+
LocalTableReserve,
|
|
13
|
+
LocalTableZone,
|
|
14
|
+
Partner,
|
|
15
|
+
RequestLocal,
|
|
16
|
+
} from "..";
|
|
10
17
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
11
18
|
|
|
12
19
|
@Entity({
|
|
13
20
|
comment: "Mesas qué se encuentran en el local.",
|
|
14
21
|
name: "local_table",
|
|
15
22
|
})
|
|
23
|
+
@Unique("uq_zone_number", ["zone", "number"])
|
|
16
24
|
export class LocalTable {
|
|
17
25
|
@PrimaryGeneratedColumn({
|
|
18
26
|
type: "int",
|
|
@@ -90,6 +98,12 @@ export class LocalTable {
|
|
|
90
98
|
})
|
|
91
99
|
description: string | null;
|
|
92
100
|
|
|
101
|
+
@Column({
|
|
102
|
+
type: "int",
|
|
103
|
+
comment: "Número consecutivo de cada mesa.",
|
|
104
|
+
})
|
|
105
|
+
number: number;
|
|
106
|
+
|
|
93
107
|
@Column({
|
|
94
108
|
type: "datetime",
|
|
95
109
|
comment: "Fecha creación del registro.",
|
|
@@ -125,6 +139,9 @@ export class LocalTable {
|
|
|
125
139
|
@OneToMany(() => RequestLocal, (requestLocal) => requestLocal.local_table)
|
|
126
140
|
request_locals: RequestLocal[];
|
|
127
141
|
|
|
128
|
-
@OneToMany(
|
|
142
|
+
@OneToMany(
|
|
143
|
+
() => LocalTableReserve,
|
|
144
|
+
(localTableReserve) => localTableReserve.local_table
|
|
145
|
+
)
|
|
129
146
|
local_table_reserves: LocalTableReserve[];
|
|
130
147
|
}
|