@lcas58/esmi-api-types 1.0.7 → 1.0.9
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/src/routes/events/events.index.d.ts +4 -4
- package/dist/src/routes/leagues/leagues.handlers.js +2 -1
- package/dist/src/routes/marketing/marketing.index.d.ts +1 -1
- package/dist/src/routes/organizations/organizations.index.d.ts +6 -6
- package/dist/src/routes/webhooks/webhooks.handlers.d.ts +3 -0
- package/dist/src/routes/webhooks/webhooks.handlers.js +14 -0
- package/dist/src/routes/webhooks/webhooks.index.d.ts +32 -0
- package/dist/src/routes/webhooks/webhooks.index.js +6 -0
- package/dist/src/routes/webhooks/webhooks.routes.d.ts +64 -0
- package/dist/src/routes/webhooks/webhooks.routes.js +24 -0
- package/dist/src/shared/client-types.d.ts +2 -13
- package/dist/src/shared/client-types.js +0 -12
- package/package.json +25 -32
- package/dist/src/app.d.ts +0 -1158
- package/dist/src/app.js +0 -22
- package/dist/src/db/schema/event.d.ts +0 -264
- package/dist/src/db/schema/event.js +0 -38
- package/dist/src/db/schema/index.d.ts +0 -8
- package/dist/src/db/schema/index.js +0 -8
- package/dist/src/db/schema/league.d.ts +0 -261
- package/dist/src/db/schema/league.js +0 -27
- package/dist/src/db/schema/location.d.ts +0 -239
- package/dist/src/db/schema/location.js +0 -22
- package/dist/src/db/schema/marketing.d.ts +0 -77
- package/dist/src/db/schema/marketing.js +0 -16
- package/dist/src/db/schema/organization.d.ts +0 -882
- package/dist/src/db/schema/organization.js +0 -174
- package/dist/src/db/schema/pickup.d.ts +0 -417
- package/dist/src/db/schema/pickup.js +0 -42
- package/dist/src/db/schema/tag.d.ts +0 -261
- package/dist/src/db/schema/tag.js +0 -55
- package/dist/src/db/schema/user.d.ts +0 -597
- package/dist/src/db/schema/user.js +0 -45
- package/dist/src/lib/types.d.ts +0 -14
- package/dist/src/shared/index.d.ts +0 -7
- package/dist/src/shared/index.js +0 -28
package/dist/src/app.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import configureOpenAPI from "./lib/configure-open-api.js";
|
|
2
|
-
import createApp from "./lib/create-app.js";
|
|
3
|
-
import events from "./routes/events/events.index.js";
|
|
4
|
-
import index from "./routes/index.route.js";
|
|
5
|
-
import leagues from "./routes/leagues/leagues.index.js";
|
|
6
|
-
import marketing from "./routes/marketing/marketing.index.js";
|
|
7
|
-
import organizations from "./routes/organizations/organizations.index.js";
|
|
8
|
-
import tags from "./routes/tags/tags.index.js";
|
|
9
|
-
const app = createApp();
|
|
10
|
-
configureOpenAPI(app);
|
|
11
|
-
const routes = [
|
|
12
|
-
index,
|
|
13
|
-
organizations,
|
|
14
|
-
events,
|
|
15
|
-
leagues,
|
|
16
|
-
marketing,
|
|
17
|
-
tags,
|
|
18
|
-
];
|
|
19
|
-
routes.forEach((route) => {
|
|
20
|
-
app.route("/", route);
|
|
21
|
-
});
|
|
22
|
-
export default app;
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
declare const event: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
2
|
-
name: "event";
|
|
3
|
-
schema: undefined;
|
|
4
|
-
columns: {
|
|
5
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
6
|
-
name: "id";
|
|
7
|
-
tableName: "event";
|
|
8
|
-
dataType: "string";
|
|
9
|
-
columnType: "PgText";
|
|
10
|
-
data: string;
|
|
11
|
-
driverParam: string;
|
|
12
|
-
notNull: true;
|
|
13
|
-
hasDefault: true;
|
|
14
|
-
isPrimaryKey: true;
|
|
15
|
-
isAutoincrement: false;
|
|
16
|
-
hasRuntimeDefault: true;
|
|
17
|
-
enumValues: [string, ...string[]];
|
|
18
|
-
baseColumn: never;
|
|
19
|
-
generated: undefined;
|
|
20
|
-
}, {}, {}>;
|
|
21
|
-
name: import("drizzle-orm/pg-core").PgColumn<{
|
|
22
|
-
name: "name";
|
|
23
|
-
tableName: "event";
|
|
24
|
-
dataType: "string";
|
|
25
|
-
columnType: "PgVarchar";
|
|
26
|
-
data: string;
|
|
27
|
-
driverParam: string;
|
|
28
|
-
notNull: true;
|
|
29
|
-
hasDefault: false;
|
|
30
|
-
isPrimaryKey: false;
|
|
31
|
-
isAutoincrement: false;
|
|
32
|
-
hasRuntimeDefault: false;
|
|
33
|
-
enumValues: [string, ...string[]];
|
|
34
|
-
baseColumn: never;
|
|
35
|
-
generated: undefined;
|
|
36
|
-
}, {}, {}>;
|
|
37
|
-
description: import("drizzle-orm/pg-core").PgColumn<{
|
|
38
|
-
name: "description";
|
|
39
|
-
tableName: "event";
|
|
40
|
-
dataType: "string";
|
|
41
|
-
columnType: "PgText";
|
|
42
|
-
data: string;
|
|
43
|
-
driverParam: string;
|
|
44
|
-
notNull: false;
|
|
45
|
-
hasDefault: false;
|
|
46
|
-
isPrimaryKey: false;
|
|
47
|
-
isAutoincrement: false;
|
|
48
|
-
hasRuntimeDefault: false;
|
|
49
|
-
enumValues: [string, ...string[]];
|
|
50
|
-
baseColumn: never;
|
|
51
|
-
generated: undefined;
|
|
52
|
-
}, {}, {}>;
|
|
53
|
-
locationId: import("drizzle-orm/pg-core").PgColumn<{
|
|
54
|
-
name: "location_id";
|
|
55
|
-
tableName: "event";
|
|
56
|
-
dataType: "string";
|
|
57
|
-
columnType: "PgVarchar";
|
|
58
|
-
data: string;
|
|
59
|
-
driverParam: string;
|
|
60
|
-
notNull: false;
|
|
61
|
-
hasDefault: false;
|
|
62
|
-
isPrimaryKey: false;
|
|
63
|
-
isAutoincrement: false;
|
|
64
|
-
hasRuntimeDefault: false;
|
|
65
|
-
enumValues: [string, ...string[]];
|
|
66
|
-
baseColumn: never;
|
|
67
|
-
generated: undefined;
|
|
68
|
-
}, {}, {}>;
|
|
69
|
-
type: import("drizzle-orm/pg-core").PgColumn<{
|
|
70
|
-
name: "type";
|
|
71
|
-
tableName: "event";
|
|
72
|
-
dataType: "string";
|
|
73
|
-
columnType: "PgVarchar";
|
|
74
|
-
data: string;
|
|
75
|
-
driverParam: string;
|
|
76
|
-
notNull: true;
|
|
77
|
-
hasDefault: false;
|
|
78
|
-
isPrimaryKey: false;
|
|
79
|
-
isAutoincrement: false;
|
|
80
|
-
hasRuntimeDefault: false;
|
|
81
|
-
enumValues: [string, ...string[]];
|
|
82
|
-
baseColumn: never;
|
|
83
|
-
generated: undefined;
|
|
84
|
-
}, {}, {}>;
|
|
85
|
-
organizationId: import("drizzle-orm/pg-core").PgColumn<{
|
|
86
|
-
name: "organizationId";
|
|
87
|
-
tableName: "event";
|
|
88
|
-
dataType: "string";
|
|
89
|
-
columnType: "PgText";
|
|
90
|
-
data: string;
|
|
91
|
-
driverParam: string;
|
|
92
|
-
notNull: true;
|
|
93
|
-
hasDefault: false;
|
|
94
|
-
isPrimaryKey: false;
|
|
95
|
-
isAutoincrement: false;
|
|
96
|
-
hasRuntimeDefault: false;
|
|
97
|
-
enumValues: [string, ...string[]];
|
|
98
|
-
baseColumn: never;
|
|
99
|
-
generated: undefined;
|
|
100
|
-
}, {}, {}>;
|
|
101
|
-
creatorId: import("drizzle-orm/pg-core").PgColumn<{
|
|
102
|
-
name: "creatorId";
|
|
103
|
-
tableName: "event";
|
|
104
|
-
dataType: "string";
|
|
105
|
-
columnType: "PgText";
|
|
106
|
-
data: string;
|
|
107
|
-
driverParam: string;
|
|
108
|
-
notNull: false;
|
|
109
|
-
hasDefault: false;
|
|
110
|
-
isPrimaryKey: false;
|
|
111
|
-
isAutoincrement: false;
|
|
112
|
-
hasRuntimeDefault: false;
|
|
113
|
-
enumValues: [string, ...string[]];
|
|
114
|
-
baseColumn: never;
|
|
115
|
-
generated: undefined;
|
|
116
|
-
}, {}, {}>;
|
|
117
|
-
mode: import("drizzle-orm/pg-core").PgColumn<{
|
|
118
|
-
name: "mode";
|
|
119
|
-
tableName: "event";
|
|
120
|
-
dataType: "string";
|
|
121
|
-
columnType: "PgVarchar";
|
|
122
|
-
data: string;
|
|
123
|
-
driverParam: string;
|
|
124
|
-
notNull: true;
|
|
125
|
-
hasDefault: false;
|
|
126
|
-
isPrimaryKey: false;
|
|
127
|
-
isAutoincrement: false;
|
|
128
|
-
hasRuntimeDefault: false;
|
|
129
|
-
enumValues: [string, ...string[]];
|
|
130
|
-
baseColumn: never;
|
|
131
|
-
generated: undefined;
|
|
132
|
-
}, {}, {}>;
|
|
133
|
-
ageGroup: import("drizzle-orm/pg-core").PgColumn<{
|
|
134
|
-
name: "age_group";
|
|
135
|
-
tableName: "event";
|
|
136
|
-
dataType: "string";
|
|
137
|
-
columnType: "PgVarchar";
|
|
138
|
-
data: string;
|
|
139
|
-
driverParam: string;
|
|
140
|
-
notNull: true;
|
|
141
|
-
hasDefault: false;
|
|
142
|
-
isPrimaryKey: false;
|
|
143
|
-
isAutoincrement: false;
|
|
144
|
-
hasRuntimeDefault: false;
|
|
145
|
-
enumValues: [string, ...string[]];
|
|
146
|
-
baseColumn: never;
|
|
147
|
-
generated: undefined;
|
|
148
|
-
}, {}, {}>;
|
|
149
|
-
gender: import("drizzle-orm/pg-core").PgColumn<{
|
|
150
|
-
name: "gender";
|
|
151
|
-
tableName: "event";
|
|
152
|
-
dataType: "string";
|
|
153
|
-
columnType: "PgVarchar";
|
|
154
|
-
data: string;
|
|
155
|
-
driverParam: string;
|
|
156
|
-
notNull: true;
|
|
157
|
-
hasDefault: false;
|
|
158
|
-
isPrimaryKey: false;
|
|
159
|
-
isAutoincrement: false;
|
|
160
|
-
hasRuntimeDefault: false;
|
|
161
|
-
enumValues: [string, ...string[]];
|
|
162
|
-
baseColumn: never;
|
|
163
|
-
generated: undefined;
|
|
164
|
-
}, {}, {}>;
|
|
165
|
-
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
166
|
-
name: "status";
|
|
167
|
-
tableName: "event";
|
|
168
|
-
dataType: "string";
|
|
169
|
-
columnType: "PgVarchar";
|
|
170
|
-
data: string;
|
|
171
|
-
driverParam: string;
|
|
172
|
-
notNull: true;
|
|
173
|
-
hasDefault: false;
|
|
174
|
-
isPrimaryKey: false;
|
|
175
|
-
isAutoincrement: false;
|
|
176
|
-
hasRuntimeDefault: false;
|
|
177
|
-
enumValues: [string, ...string[]];
|
|
178
|
-
baseColumn: never;
|
|
179
|
-
generated: undefined;
|
|
180
|
-
}, {}, {}>;
|
|
181
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
182
|
-
name: "created_at";
|
|
183
|
-
tableName: "event";
|
|
184
|
-
dataType: "date";
|
|
185
|
-
columnType: "PgTimestamp";
|
|
186
|
-
data: Date;
|
|
187
|
-
driverParam: string;
|
|
188
|
-
notNull: true;
|
|
189
|
-
hasDefault: true;
|
|
190
|
-
isPrimaryKey: false;
|
|
191
|
-
isAutoincrement: false;
|
|
192
|
-
hasRuntimeDefault: false;
|
|
193
|
-
enumValues: undefined;
|
|
194
|
-
baseColumn: never;
|
|
195
|
-
generated: undefined;
|
|
196
|
-
}, {}, {}>;
|
|
197
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
198
|
-
name: "updated_at";
|
|
199
|
-
tableName: "event";
|
|
200
|
-
dataType: "date";
|
|
201
|
-
columnType: "PgTimestamp";
|
|
202
|
-
data: Date;
|
|
203
|
-
driverParam: string;
|
|
204
|
-
notNull: true;
|
|
205
|
-
hasDefault: true;
|
|
206
|
-
isPrimaryKey: false;
|
|
207
|
-
isAutoincrement: false;
|
|
208
|
-
hasRuntimeDefault: false;
|
|
209
|
-
enumValues: undefined;
|
|
210
|
-
baseColumn: never;
|
|
211
|
-
generated: undefined;
|
|
212
|
-
}, {}, {}>;
|
|
213
|
-
};
|
|
214
|
-
dialect: "pg";
|
|
215
|
-
}>;
|
|
216
|
-
export declare const eventRelations: import("drizzle-orm").Relations<"event", {
|
|
217
|
-
creator: import("drizzle-orm").One<"user", false>;
|
|
218
|
-
organization: import("drizzle-orm").One<"organization", true>;
|
|
219
|
-
location: import("drizzle-orm").One<"location", false>;
|
|
220
|
-
}>;
|
|
221
|
-
export declare const selectEventSchema: import("zod").ZodObject<{
|
|
222
|
-
id: import("zod").ZodString;
|
|
223
|
-
name: import("zod").ZodString;
|
|
224
|
-
description: import("zod").ZodNullable<import("zod").ZodString>;
|
|
225
|
-
locationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
226
|
-
type: import("zod").ZodString;
|
|
227
|
-
organizationId: import("zod").ZodString;
|
|
228
|
-
creatorId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
229
|
-
mode: import("zod").ZodString;
|
|
230
|
-
ageGroup: import("zod").ZodString;
|
|
231
|
-
gender: import("zod").ZodString;
|
|
232
|
-
status: import("zod").ZodString;
|
|
233
|
-
createdAt: import("zod").ZodDate;
|
|
234
|
-
updatedAt: import("zod").ZodDate;
|
|
235
|
-
}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
|
|
236
|
-
id: string;
|
|
237
|
-
status: string;
|
|
238
|
-
type: string;
|
|
239
|
-
description: string | null;
|
|
240
|
-
name: string;
|
|
241
|
-
locationId: string | null;
|
|
242
|
-
organizationId: string;
|
|
243
|
-
mode: string;
|
|
244
|
-
createdAt: Date;
|
|
245
|
-
updatedAt: Date;
|
|
246
|
-
creatorId: string | null;
|
|
247
|
-
ageGroup: string;
|
|
248
|
-
gender: string;
|
|
249
|
-
}, {
|
|
250
|
-
id: string;
|
|
251
|
-
status: string;
|
|
252
|
-
type: string;
|
|
253
|
-
description: string | null;
|
|
254
|
-
name: string;
|
|
255
|
-
locationId: string | null;
|
|
256
|
-
organizationId: string;
|
|
257
|
-
mode: string;
|
|
258
|
-
createdAt: Date;
|
|
259
|
-
updatedAt: Date;
|
|
260
|
-
creatorId: string | null;
|
|
261
|
-
ageGroup: string;
|
|
262
|
-
gender: string;
|
|
263
|
-
}>;
|
|
264
|
-
export default event;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { relations } from "drizzle-orm";
|
|
2
|
-
import { pgTable, text, timestamp, varchar } from "drizzle-orm/pg-core";
|
|
3
|
-
import { createSelectSchema } from "drizzle-zod";
|
|
4
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
-
import location from "./location.js";
|
|
6
|
-
import organization from "./organization.js";
|
|
7
|
-
import { user } from "./user.js";
|
|
8
|
-
const event = pgTable("event", {
|
|
9
|
-
id: text("id").primaryKey().$defaultFn(() => randomUUID()),
|
|
10
|
-
name: varchar("name", { length: 255 }).notNull(),
|
|
11
|
-
description: text("description"),
|
|
12
|
-
locationId: varchar("location_id").references(() => location.id),
|
|
13
|
-
type: varchar("type").notNull(),
|
|
14
|
-
organizationId: text("organizationId").references(() => organization.id, { onDelete: "cascade" }).notNull(),
|
|
15
|
-
creatorId: text("creatorId").references(() => user.id, { onDelete: "set null" }),
|
|
16
|
-
mode: varchar("mode").notNull(), // Adult, Youth
|
|
17
|
-
ageGroup: varchar("age_group").notNull(),
|
|
18
|
-
gender: varchar("gender").notNull(),
|
|
19
|
-
status: varchar("status").notNull(), // IN_PROGRESS, COMPLETED, CANCELLED
|
|
20
|
-
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
21
|
-
updatedAt: timestamp("updated_at").defaultNow().notNull(),
|
|
22
|
-
});
|
|
23
|
-
export const eventRelations = relations(event, ({ one }) => ({
|
|
24
|
-
creator: one(user, {
|
|
25
|
-
fields: [event.creatorId],
|
|
26
|
-
references: [user.id],
|
|
27
|
-
}),
|
|
28
|
-
organization: one(organization, {
|
|
29
|
-
fields: [event.organizationId],
|
|
30
|
-
references: [organization.id],
|
|
31
|
-
}),
|
|
32
|
-
location: one(location, {
|
|
33
|
-
fields: [event.locationId],
|
|
34
|
-
references: [location.id],
|
|
35
|
-
}),
|
|
36
|
-
}));
|
|
37
|
-
export const selectEventSchema = createSelectSchema(event);
|
|
38
|
-
export default event;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as event, eventRelations, selectEventSchema } from "./event.js";
|
|
2
|
-
export { default as leagues, insertLeaguesSchema, leagueRelations, selectLeaguesSchema } from "./league.js";
|
|
3
|
-
export { default as location, insertLocationSchema, locationRelations, selectLocationSchema } from "./location.js";
|
|
4
|
-
export { emailCampaign, insertEmailCampaignSchema, selectEmailCampaignSchema } from "./marketing.js";
|
|
5
|
-
export { createOrganizationWithDetailsSchema, default as organization, generateSocialMediaUrl, getOrganizationWithDetailsSchema, insertOrganizationSchema, insertOrganizationSocialMediaSchema, insertOrganizationTagSchema, insertOrganizationWebsiteSchema, organizationRelations, organizationSocialMedia, organizationSocialMediaRelations, organizationTagsRelations, organizationWebsites, organizationWebsitesRelations, patchOrganizationSchema, selectOrganizationSchema, SOCIAL_MEDIA_PLATFORMS, type SocialMediaPlatform } from "./organization.js";
|
|
6
|
-
export { default as pickup, eventPickupRelations, pickupRelations, selectPickupSchema } from "./pickup.js";
|
|
7
|
-
export { default as tags, eventTags, organizationTags, selectTagsSchema } from "./tag.js";
|
|
8
|
-
export { account, selectUserSchema, session, user, verification } from "./user.js";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as event, eventRelations, selectEventSchema } from "./event.js";
|
|
2
|
-
export { default as leagues, insertLeaguesSchema, leagueRelations, selectLeaguesSchema } from "./league.js";
|
|
3
|
-
export { default as location, insertLocationSchema, locationRelations, selectLocationSchema } from "./location.js";
|
|
4
|
-
export { emailCampaign, insertEmailCampaignSchema, selectEmailCampaignSchema } from "./marketing.js";
|
|
5
|
-
export { createOrganizationWithDetailsSchema, default as organization, generateSocialMediaUrl, getOrganizationWithDetailsSchema, insertOrganizationSchema, insertOrganizationSocialMediaSchema, insertOrganizationTagSchema, insertOrganizationWebsiteSchema, organizationRelations, organizationSocialMedia, organizationSocialMediaRelations, organizationTagsRelations, organizationWebsites, organizationWebsitesRelations, patchOrganizationSchema, selectOrganizationSchema, SOCIAL_MEDIA_PLATFORMS } from "./organization.js";
|
|
6
|
-
export { default as pickup, eventPickupRelations, pickupRelations, selectPickupSchema } from "./pickup.js";
|
|
7
|
-
export { default as tags, eventTags, organizationTags, selectTagsSchema } from "./tag.js";
|
|
8
|
-
export { account, selectUserSchema, session, user, verification } from "./user.js";
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
declare const leagues: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
2
|
-
name: "league";
|
|
3
|
-
schema: undefined;
|
|
4
|
-
columns: {
|
|
5
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
6
|
-
name: "id";
|
|
7
|
-
tableName: "league";
|
|
8
|
-
dataType: "string";
|
|
9
|
-
columnType: "PgText";
|
|
10
|
-
data: string;
|
|
11
|
-
driverParam: string;
|
|
12
|
-
notNull: true;
|
|
13
|
-
hasDefault: true;
|
|
14
|
-
isPrimaryKey: true;
|
|
15
|
-
isAutoincrement: false;
|
|
16
|
-
hasRuntimeDefault: true;
|
|
17
|
-
enumValues: [string, ...string[]];
|
|
18
|
-
baseColumn: never;
|
|
19
|
-
generated: undefined;
|
|
20
|
-
}, {}, {}>;
|
|
21
|
-
eventId: import("drizzle-orm/pg-core").PgColumn<{
|
|
22
|
-
name: "eventId";
|
|
23
|
-
tableName: "league";
|
|
24
|
-
dataType: "string";
|
|
25
|
-
columnType: "PgText";
|
|
26
|
-
data: string;
|
|
27
|
-
driverParam: string;
|
|
28
|
-
notNull: true;
|
|
29
|
-
hasDefault: false;
|
|
30
|
-
isPrimaryKey: false;
|
|
31
|
-
isAutoincrement: false;
|
|
32
|
-
hasRuntimeDefault: false;
|
|
33
|
-
enumValues: [string, ...string[]];
|
|
34
|
-
baseColumn: never;
|
|
35
|
-
generated: undefined;
|
|
36
|
-
}, {}, {}>;
|
|
37
|
-
numberOfTeams: import("drizzle-orm/pg-core").PgColumn<{
|
|
38
|
-
name: "numberOfTeams";
|
|
39
|
-
tableName: "league";
|
|
40
|
-
dataType: "number";
|
|
41
|
-
columnType: "PgInteger";
|
|
42
|
-
data: number;
|
|
43
|
-
driverParam: string | number;
|
|
44
|
-
notNull: true;
|
|
45
|
-
hasDefault: false;
|
|
46
|
-
isPrimaryKey: false;
|
|
47
|
-
isAutoincrement: false;
|
|
48
|
-
hasRuntimeDefault: false;
|
|
49
|
-
enumValues: undefined;
|
|
50
|
-
baseColumn: never;
|
|
51
|
-
generated: undefined;
|
|
52
|
-
}, {}, {}>;
|
|
53
|
-
scheduleDays: import("drizzle-orm/pg-core").PgColumn<{
|
|
54
|
-
name: "scheduleDays";
|
|
55
|
-
tableName: "league";
|
|
56
|
-
dataType: "string";
|
|
57
|
-
columnType: "PgVarchar";
|
|
58
|
-
data: string;
|
|
59
|
-
driverParam: string;
|
|
60
|
-
notNull: false;
|
|
61
|
-
hasDefault: false;
|
|
62
|
-
isPrimaryKey: false;
|
|
63
|
-
isAutoincrement: false;
|
|
64
|
-
hasRuntimeDefault: false;
|
|
65
|
-
enumValues: [string, ...string[]];
|
|
66
|
-
baseColumn: never;
|
|
67
|
-
generated: undefined;
|
|
68
|
-
}, {}, {}>;
|
|
69
|
-
scheduleTimes: import("drizzle-orm/pg-core").PgColumn<{
|
|
70
|
-
name: "scheduleTimes";
|
|
71
|
-
tableName: "league";
|
|
72
|
-
dataType: "string";
|
|
73
|
-
columnType: "PgVarchar";
|
|
74
|
-
data: string;
|
|
75
|
-
driverParam: string;
|
|
76
|
-
notNull: false;
|
|
77
|
-
hasDefault: false;
|
|
78
|
-
isPrimaryKey: false;
|
|
79
|
-
isAutoincrement: false;
|
|
80
|
-
hasRuntimeDefault: false;
|
|
81
|
-
enumValues: [string, ...string[]];
|
|
82
|
-
baseColumn: never;
|
|
83
|
-
generated: undefined;
|
|
84
|
-
}, {}, {}>;
|
|
85
|
-
startDate: import("drizzle-orm/pg-core").PgColumn<{
|
|
86
|
-
name: "startDate";
|
|
87
|
-
tableName: "league";
|
|
88
|
-
dataType: "date";
|
|
89
|
-
columnType: "PgTimestamp";
|
|
90
|
-
data: Date;
|
|
91
|
-
driverParam: string;
|
|
92
|
-
notNull: true;
|
|
93
|
-
hasDefault: false;
|
|
94
|
-
isPrimaryKey: false;
|
|
95
|
-
isAutoincrement: false;
|
|
96
|
-
hasRuntimeDefault: false;
|
|
97
|
-
enumValues: undefined;
|
|
98
|
-
baseColumn: never;
|
|
99
|
-
generated: undefined;
|
|
100
|
-
}, {}, {}>;
|
|
101
|
-
endDate: import("drizzle-orm/pg-core").PgColumn<{
|
|
102
|
-
name: "endDate";
|
|
103
|
-
tableName: "league";
|
|
104
|
-
dataType: "date";
|
|
105
|
-
columnType: "PgTimestamp";
|
|
106
|
-
data: Date;
|
|
107
|
-
driverParam: string;
|
|
108
|
-
notNull: true;
|
|
109
|
-
hasDefault: false;
|
|
110
|
-
isPrimaryKey: false;
|
|
111
|
-
isAutoincrement: false;
|
|
112
|
-
hasRuntimeDefault: false;
|
|
113
|
-
enumValues: undefined;
|
|
114
|
-
baseColumn: never;
|
|
115
|
-
generated: undefined;
|
|
116
|
-
}, {}, {}>;
|
|
117
|
-
season: import("drizzle-orm/pg-core").PgColumn<{
|
|
118
|
-
name: "season";
|
|
119
|
-
tableName: "league";
|
|
120
|
-
dataType: "string";
|
|
121
|
-
columnType: "PgVarchar";
|
|
122
|
-
data: string;
|
|
123
|
-
driverParam: string;
|
|
124
|
-
notNull: false;
|
|
125
|
-
hasDefault: false;
|
|
126
|
-
isPrimaryKey: false;
|
|
127
|
-
isAutoincrement: false;
|
|
128
|
-
hasRuntimeDefault: false;
|
|
129
|
-
enumValues: [string, ...string[]];
|
|
130
|
-
baseColumn: never;
|
|
131
|
-
generated: undefined;
|
|
132
|
-
}, {}, {}>;
|
|
133
|
-
registrationStart: import("drizzle-orm/pg-core").PgColumn<{
|
|
134
|
-
name: "registrationStart";
|
|
135
|
-
tableName: "league";
|
|
136
|
-
dataType: "date";
|
|
137
|
-
columnType: "PgTimestamp";
|
|
138
|
-
data: Date;
|
|
139
|
-
driverParam: string;
|
|
140
|
-
notNull: false;
|
|
141
|
-
hasDefault: false;
|
|
142
|
-
isPrimaryKey: false;
|
|
143
|
-
isAutoincrement: false;
|
|
144
|
-
hasRuntimeDefault: false;
|
|
145
|
-
enumValues: undefined;
|
|
146
|
-
baseColumn: never;
|
|
147
|
-
generated: undefined;
|
|
148
|
-
}, {}, {}>;
|
|
149
|
-
registrationEnd: import("drizzle-orm/pg-core").PgColumn<{
|
|
150
|
-
name: "registrationEnd";
|
|
151
|
-
tableName: "league";
|
|
152
|
-
dataType: "date";
|
|
153
|
-
columnType: "PgTimestamp";
|
|
154
|
-
data: Date;
|
|
155
|
-
driverParam: string;
|
|
156
|
-
notNull: false;
|
|
157
|
-
hasDefault: false;
|
|
158
|
-
isPrimaryKey: false;
|
|
159
|
-
isAutoincrement: false;
|
|
160
|
-
hasRuntimeDefault: false;
|
|
161
|
-
enumValues: undefined;
|
|
162
|
-
baseColumn: never;
|
|
163
|
-
generated: undefined;
|
|
164
|
-
}, {}, {}>;
|
|
165
|
-
teamFee: import("drizzle-orm/pg-core").PgColumn<{
|
|
166
|
-
name: "teamFee";
|
|
167
|
-
tableName: "league";
|
|
168
|
-
dataType: "number";
|
|
169
|
-
columnType: "PgInteger";
|
|
170
|
-
data: number;
|
|
171
|
-
driverParam: string | number;
|
|
172
|
-
notNull: false;
|
|
173
|
-
hasDefault: false;
|
|
174
|
-
isPrimaryKey: false;
|
|
175
|
-
isAutoincrement: false;
|
|
176
|
-
hasRuntimeDefault: false;
|
|
177
|
-
enumValues: undefined;
|
|
178
|
-
baseColumn: never;
|
|
179
|
-
generated: undefined;
|
|
180
|
-
}, {}, {}>;
|
|
181
|
-
};
|
|
182
|
-
dialect: "pg";
|
|
183
|
-
}>;
|
|
184
|
-
export declare const leagueRelations: import("drizzle-orm").Relations<"league", {
|
|
185
|
-
event: import("drizzle-orm").One<"event", true>;
|
|
186
|
-
}>;
|
|
187
|
-
export declare const selectLeaguesSchema: import("zod").ZodObject<{
|
|
188
|
-
id: import("zod").ZodString;
|
|
189
|
-
eventId: import("zod").ZodString;
|
|
190
|
-
numberOfTeams: import("zod").ZodNumber;
|
|
191
|
-
scheduleDays: import("zod").ZodNullable<import("zod").ZodString>;
|
|
192
|
-
scheduleTimes: import("zod").ZodNullable<import("zod").ZodString>;
|
|
193
|
-
startDate: import("zod").ZodDate;
|
|
194
|
-
endDate: import("zod").ZodDate;
|
|
195
|
-
season: import("zod").ZodNullable<import("zod").ZodString>;
|
|
196
|
-
registrationStart: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
197
|
-
registrationEnd: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
198
|
-
teamFee: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
199
|
-
}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
|
|
200
|
-
id: string;
|
|
201
|
-
eventId: string;
|
|
202
|
-
numberOfTeams: number;
|
|
203
|
-
scheduleDays: string | null;
|
|
204
|
-
scheduleTimes: string | null;
|
|
205
|
-
startDate: Date;
|
|
206
|
-
endDate: Date;
|
|
207
|
-
season: string | null;
|
|
208
|
-
registrationStart: Date | null;
|
|
209
|
-
registrationEnd: Date | null;
|
|
210
|
-
teamFee: number | null;
|
|
211
|
-
}, {
|
|
212
|
-
id: string;
|
|
213
|
-
eventId: string;
|
|
214
|
-
numberOfTeams: number;
|
|
215
|
-
scheduleDays: string | null;
|
|
216
|
-
scheduleTimes: string | null;
|
|
217
|
-
startDate: Date;
|
|
218
|
-
endDate: Date;
|
|
219
|
-
season: string | null;
|
|
220
|
-
registrationStart: Date | null;
|
|
221
|
-
registrationEnd: Date | null;
|
|
222
|
-
teamFee: number | null;
|
|
223
|
-
}>;
|
|
224
|
-
export declare const insertLeaguesSchema: import("zod").ZodObject<{
|
|
225
|
-
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
226
|
-
eventId: import("zod").ZodString;
|
|
227
|
-
numberOfTeams: import("zod").ZodNumber;
|
|
228
|
-
scheduleDays: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
229
|
-
scheduleTimes: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
230
|
-
startDate: import("zod").ZodDate;
|
|
231
|
-
endDate: import("zod").ZodDate;
|
|
232
|
-
season: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
233
|
-
registrationStart: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodDate>>;
|
|
234
|
-
registrationEnd: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodDate>>;
|
|
235
|
-
teamFee: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
236
|
-
}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
|
|
237
|
-
eventId: string;
|
|
238
|
-
numberOfTeams: number;
|
|
239
|
-
startDate: Date;
|
|
240
|
-
endDate: Date;
|
|
241
|
-
id?: string | undefined;
|
|
242
|
-
scheduleDays?: string | null | undefined;
|
|
243
|
-
scheduleTimes?: string | null | undefined;
|
|
244
|
-
season?: string | null | undefined;
|
|
245
|
-
registrationStart?: Date | null | undefined;
|
|
246
|
-
registrationEnd?: Date | null | undefined;
|
|
247
|
-
teamFee?: number | null | undefined;
|
|
248
|
-
}, {
|
|
249
|
-
eventId: string;
|
|
250
|
-
numberOfTeams: number;
|
|
251
|
-
startDate: Date;
|
|
252
|
-
endDate: Date;
|
|
253
|
-
id?: string | undefined;
|
|
254
|
-
scheduleDays?: string | null | undefined;
|
|
255
|
-
scheduleTimes?: string | null | undefined;
|
|
256
|
-
season?: string | null | undefined;
|
|
257
|
-
registrationStart?: Date | null | undefined;
|
|
258
|
-
registrationEnd?: Date | null | undefined;
|
|
259
|
-
teamFee?: number | null | undefined;
|
|
260
|
-
}>;
|
|
261
|
-
export default leagues;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { relations } from "drizzle-orm";
|
|
2
|
-
import { integer, pgTable, text, timestamp, varchar } from "drizzle-orm/pg-core";
|
|
3
|
-
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
|
|
4
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
-
import event from "./event.js";
|
|
6
|
-
const leagues = pgTable("league", {
|
|
7
|
-
id: text("id").primaryKey().$defaultFn(() => randomUUID()),
|
|
8
|
-
eventId: text("eventId").references(() => event.id, { onDelete: "cascade" }).notNull(),
|
|
9
|
-
numberOfTeams: integer("numberOfTeams").notNull(),
|
|
10
|
-
scheduleDays: varchar("scheduleDays"),
|
|
11
|
-
scheduleTimes: varchar("scheduleTimes"),
|
|
12
|
-
startDate: timestamp("startDate").notNull(),
|
|
13
|
-
endDate: timestamp("endDate").notNull(),
|
|
14
|
-
season: varchar("season"),
|
|
15
|
-
registrationStart: timestamp("registrationStart"),
|
|
16
|
-
registrationEnd: timestamp("registrationEnd"),
|
|
17
|
-
teamFee: integer("teamFee"),
|
|
18
|
-
});
|
|
19
|
-
export const leagueRelations = relations(leagues, ({ one }) => ({
|
|
20
|
-
event: one(event, {
|
|
21
|
-
fields: [leagues.eventId],
|
|
22
|
-
references: [event.id],
|
|
23
|
-
}),
|
|
24
|
-
}));
|
|
25
|
-
export const selectLeaguesSchema = createSelectSchema(leagues);
|
|
26
|
-
export const insertLeaguesSchema = createInsertSchema(leagues);
|
|
27
|
-
export default leagues;
|