test-entity-library-asm 3.4.6 → 3.4.8
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.
|
@@ -44,7 +44,6 @@ var LocalTable = /** @class */ (function () {
|
|
|
44
44
|
(0, typeorm_1.Column)({
|
|
45
45
|
type: "varchar",
|
|
46
46
|
length: 40,
|
|
47
|
-
unique: true,
|
|
48
47
|
comment: "Nombre de la mesa.",
|
|
49
48
|
}),
|
|
50
49
|
__metadata("design:type", String)
|
|
@@ -97,6 +96,13 @@ var LocalTable = /** @class */ (function () {
|
|
|
97
96
|
}),
|
|
98
97
|
__metadata("design:type", Object)
|
|
99
98
|
], LocalTable.prototype, "description", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({
|
|
101
|
+
type: "int",
|
|
102
|
+
comment: "Número consecutivo de cada mesa.",
|
|
103
|
+
}),
|
|
104
|
+
__metadata("design:type", Number)
|
|
105
|
+
], LocalTable.prototype, "number", void 0);
|
|
100
106
|
__decorate([
|
|
101
107
|
(0, typeorm_1.Column)({
|
|
102
108
|
type: "datetime",
|
|
@@ -145,7 +151,8 @@ var LocalTable = /** @class */ (function () {
|
|
|
145
151
|
(0, typeorm_1.Entity)({
|
|
146
152
|
comment: "Mesas qué se encuentran en el local.",
|
|
147
153
|
name: "local_table",
|
|
148
|
-
})
|
|
154
|
+
}),
|
|
155
|
+
(0, typeorm_1.Unique)("uq_zone_number", ["zone", "number"])
|
|
149
156
|
], LocalTable);
|
|
150
157
|
return LocalTable;
|
|
151
158
|
}());
|
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",
|
|
@@ -38,7 +46,6 @@ export class LocalTable {
|
|
|
38
46
|
@Column({
|
|
39
47
|
type: "varchar",
|
|
40
48
|
length: 40,
|
|
41
|
-
unique: true,
|
|
42
49
|
comment: "Nombre de la mesa.",
|
|
43
50
|
})
|
|
44
51
|
name: string;
|
|
@@ -90,6 +97,12 @@ export class LocalTable {
|
|
|
90
97
|
})
|
|
91
98
|
description: string | null;
|
|
92
99
|
|
|
100
|
+
@Column({
|
|
101
|
+
type: "int",
|
|
102
|
+
comment: "Número consecutivo de cada mesa.",
|
|
103
|
+
})
|
|
104
|
+
number: number;
|
|
105
|
+
|
|
93
106
|
@Column({
|
|
94
107
|
type: "datetime",
|
|
95
108
|
comment: "Fecha creación del registro.",
|
|
@@ -125,6 +138,9 @@ export class LocalTable {
|
|
|
125
138
|
@OneToMany(() => RequestLocal, (requestLocal) => requestLocal.local_table)
|
|
126
139
|
request_locals: RequestLocal[];
|
|
127
140
|
|
|
128
|
-
@OneToMany(
|
|
141
|
+
@OneToMany(
|
|
142
|
+
() => LocalTableReserve,
|
|
143
|
+
(localTableReserve) => localTableReserve.local_table
|
|
144
|
+
)
|
|
129
145
|
local_table_reserves: LocalTableReserve[];
|
|
130
146
|
}
|