create-nextjs-cms 0.9.20 → 0.9.22

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.
@@ -45,26 +45,10 @@ export const TestSectionTable = mysqlTable('test_section', {
45
45
 
46
46
 
47
47
  export const TestTagsTable = mysqlTable('test_tags', {
48
- testId: varchar('test_id', { length: 255 }).notNull(),
49
- tagName: varchar('tag_name', { length: 255 }).notNull(),
50
- locale: varchar('locale', { length: 255 }).notNull()
48
+ testId: int('test_id').notNull(),
49
+ tagName: varchar('tag_name', { length: 255 }).notNull()
51
50
  }, (table) => [
52
- primaryKey({ columns: [table.testId, table.tagName, table.locale] })
53
- ]);
54
-
55
-
56
- export const TestSectionLocalesTable = mysqlTable('test_section_locales', {
57
- id: int('id').autoincrement().notNull().primaryKey(),
58
- parentId: int('parent_id').notNull(),
59
- locale: varchar('locale', { length: 10 }).notNull(),
60
- contentType: mysqlEnum('content_type', ['ad', 'user']).notNull(),
61
- price: int('price'),
62
- appId: varchar('app_id', { length: 36 }).notNull(),
63
- title: varchar('title', { length: 255 }).notNull(),
64
- photo: varchar('photo', { length: 255 }),
65
- category: varchar('category', { length: 255 }).notNull()
66
- }, (table) => [
67
- unique('test_section_locales_parent_id_locale_unique').on(table.parentId, table.locale)
51
+ primaryKey({ columns: [table.testId, table.tagName] })
68
52
  ]);
69
53
 
70
54
 
@@ -110,7 +94,9 @@ export const ServicesTable = mysqlTable('services', {
110
94
  townId: int('town_id')
111
95
  }, (table) => [
112
96
  index('title_index').on(table.title),
113
- unique('title_unique').on(table.title)
97
+ unique('title_unique').on(table.title),
98
+ index('title_fulltext').on(table.title),
99
+ index('desc_fulltext').on(table.desc)
114
100
  ]);
115
101
 
116
102
 
@@ -153,10 +139,66 @@ export const RealestateTable = mysqlTable('realestate', {
153
139
  townId: int('town_id')
154
140
  }, (table) => [
155
141
  index('title_index').on(table.title),
156
- unique('title_unique').on(table.title)
142
+ unique('title_unique').on(table.title),
143
+ index('title_fulltext').on(table.title),
144
+ index('desc_fulltext').on(table.desc)
157
145
  ]);
158
146
 
159
147
 
148
+ export const RoomCountsTable = mysqlTable('room_counts', {
149
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
150
+ label: varchar('label', { length: 255 }).notNull()
151
+ });
152
+
153
+
154
+ export const BuildingAgesTable = mysqlTable('building_ages', {
155
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
156
+ label: varchar('label', { length: 255 }).notNull()
157
+ });
158
+
159
+
160
+ export const FloorCountsTable = mysqlTable('floor_counts', {
161
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
162
+ label: varchar('label', { length: 255 }).notNull()
163
+ });
164
+
165
+
166
+ export const BathroomCountsTable = mysqlTable('bathroom_counts', {
167
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
168
+ label: varchar('label', { length: 255 }).notNull()
169
+ });
170
+
171
+
172
+ export const FloorLocationsTable = mysqlTable('floor_locations', {
173
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
174
+ label: varchar('label', { length: 255 }).notNull()
175
+ });
176
+
177
+
178
+ export const HeatingTypesTable = mysqlTable('heating_types', {
179
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
180
+ label: varchar('label', { length: 255 }).notNull()
181
+ });
182
+
183
+
184
+ export const KitchenTypesTable = mysqlTable('kitchen_types', {
185
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
186
+ label: varchar('label', { length: 255 }).notNull()
187
+ });
188
+
189
+
190
+ export const ParkingTypesTable = mysqlTable('parking_types', {
191
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
192
+ label: varchar('label', { length: 255 }).notNull()
193
+ });
194
+
195
+
196
+ export const FromWhomTypesTable = mysqlTable('from_whom_types', {
197
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
198
+ label: varchar('label', { length: 255 }).notNull()
199
+ });
200
+
201
+
160
202
  export const HomepageSliderTable = mysqlTable('homepage_slider', {
161
203
  id: int('id').autoincrement().notNull().primaryKey(),
162
204
  titleEn: varchar('title_en', { length: 255 }).notNull(),
@@ -177,7 +219,7 @@ export const HomepageSliderTable = mysqlTable('homepage_slider', {
177
219
  export const ContestSubscribersTable = mysqlTable('contest_subscribers', {
178
220
  id: int('id').autoincrement().notNull().primaryKey(),
179
221
  userId: int('user_id').notNull(),
180
- contestId: varchar('contest_id', { length: 255 }).notNull()
222
+ contestId: int('contest_id').notNull()
181
223
  }, (table) => [
182
224
  unique('contest_subscriber_unique').on(table.contestId, table.userId)
183
225
  ]);
@@ -242,10 +284,30 @@ export const JobsTable = mysqlTable('jobs', {
242
284
  townId: int('town_id')
243
285
  }, (table) => [
244
286
  index('title_index').on(table.title),
245
- unique('title_unique').on(table.title)
287
+ unique('title_unique').on(table.title),
288
+ index('title_fulltext').on(table.title),
289
+ index('desc_fulltext').on(table.desc)
246
290
  ]);
247
291
 
248
292
 
293
+ export const JobWorkMethodTable = mysqlTable('job_work_method', {
294
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
295
+ label: varchar('label', { length: 255 }).notNull()
296
+ });
297
+
298
+
299
+ export const JobEducationLevelTable = mysqlTable('job_education_level', {
300
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
301
+ label: varchar('label', { length: 255 }).notNull()
302
+ });
303
+
304
+
305
+ export const JobExperienceLevelTable = mysqlTable('job_experience_level', {
306
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
307
+ label: varchar('label', { length: 255 }).notNull()
308
+ });
309
+
310
+
249
311
  export const FurnitureTable = mysqlTable('furniture', {
250
312
  id: int('id').autoincrement().notNull().primaryKey(),
251
313
  title: varchar('title', { length: 255 }).notNull(),
@@ -268,10 +330,24 @@ export const FurnitureTable = mysqlTable('furniture', {
268
330
  townId: int('town_id')
269
331
  }, (table) => [
270
332
  index('title_index').on(table.title),
271
- unique('title_unique').on(table.title)
333
+ unique('title_unique').on(table.title),
334
+ index('title_fulltext').on(table.title),
335
+ index('desc_fulltext').on(table.desc)
272
336
  ]);
273
337
 
274
338
 
339
+ export const ConditionTypesTable = mysqlTable('condition_types', {
340
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
341
+ label: varchar('label', { length: 255 }).notNull()
342
+ });
343
+
344
+
345
+ export const ClothesFromWhomTypesTable = mysqlTable('clothes_from_whom_types', {
346
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
347
+ label: varchar('label', { length: 255 }).notNull()
348
+ });
349
+
350
+
275
351
  export const FiltersTable = mysqlTable('filters', {
276
352
  id: int('id').autoincrement().notNull().primaryKey(),
277
353
  title: varchar('title', { length: 255 }).notNull(),
@@ -282,7 +358,8 @@ export const FiltersTable = mysqlTable('filters', {
282
358
  isMandatory: boolean('is_mandatory')
283
359
  }, (table) => [
284
360
  unique('title_unique').on(table.title),
285
- unique('key_unique').on(table.Key)
361
+ unique('key_unique').on(table.Key),
362
+ index('title_fulltext').on(table.title)
286
363
  ]);
287
364
 
288
365
 
@@ -297,7 +374,11 @@ export const FaqTable = mysqlTable('faq', {
297
374
  }, (table) => [
298
375
  unique('faq_q_en_unique').on(table.qEn),
299
376
  unique('title_ar_unique').on(table.qAr),
300
- unique('title_tr_unique').on(table.qTr)
377
+ unique('title_tr_unique').on(table.qTr),
378
+ index('titles_fulltext').on(table.qAr, table.qTr),
379
+ index('faq_a_en_fulltext').on(table.aEn),
380
+ index('faq_a_ar_fulltext').on(table.aAr),
381
+ index('faq_a_tr_fulltext').on(table.aTr)
301
382
  ]);
302
383
 
303
384
 
@@ -310,7 +391,9 @@ export const ErrorsTable = mysqlTable('errors', {
310
391
  desc: longtext('desc'),
311
392
  isResolved: boolean('is_resolved')
312
393
  }, (table) => [
313
- unique('key_unique').on(table.caseId)
394
+ unique('key_unique').on(table.caseId),
395
+ index('title_fulltext').on(table.title),
396
+ index('case_id_fulltext').on(table.caseId)
314
397
  ]);
315
398
 
316
399
 
@@ -337,10 +420,18 @@ export const ElectronicsTable = mysqlTable('electronics', {
337
420
  townId: int('town_id')
338
421
  }, (table) => [
339
422
  index('title_index').on(table.title),
340
- unique('title_unique').on(table.title)
423
+ unique('title_unique').on(table.title),
424
+ index('title_fulltext').on(table.title),
425
+ index('desc_fulltext').on(table.desc)
341
426
  ]);
342
427
 
343
428
 
429
+ export const ElectronicsFromWhomTypesTable = mysqlTable('electronics_from_whom_types', {
430
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
431
+ label: varchar('label', { length: 255 }).notNull()
432
+ });
433
+
434
+
344
435
  export const ClothesTable = mysqlTable('clothes', {
345
436
  id: int('id').autoincrement().notNull().primaryKey(),
346
437
  title: varchar('title', { length: 255 }).notNull(),
@@ -363,7 +454,9 @@ export const ClothesTable = mysqlTable('clothes', {
363
454
  townId: int('town_id')
364
455
  }, (table) => [
365
456
  index('title_index').on(table.title),
366
- unique('title_unique').on(table.title)
457
+ unique('title_unique').on(table.title),
458
+ index('title_fulltext').on(table.title),
459
+ index('desc_fulltext').on(table.desc)
367
460
  ]);
368
461
 
369
462
 
@@ -421,10 +514,54 @@ export const CarsTable = mysqlTable('cars', {
421
514
  viewCount: int('view_count'),
422
515
  status: mysqlEnum('status', ['pending_creation', 'active', 'pending_review', 'rejected', 'expired'])
423
516
  }, (table) => [
424
- index('title_index').on(table.title)
517
+ index('title_index').on(table.title),
518
+ index('title_fulltext').on(table.title),
519
+ index('desc_fulltext').on(table.desc)
425
520
  ]);
426
521
 
427
522
 
523
+ export const CarFromWhomTypesTable = mysqlTable('car_from_whom_types', {
524
+ Key: varchar('_key', { length: 255 }).notNull().primaryKey(),
525
+ label: varchar('label', { length: 255 }).notNull()
526
+ });
527
+
528
+
529
+ export const CarEngineCapacityTypesTable = mysqlTable('car_engine_capacity_types', {
530
+ Key: varchar('_key', { length: 255 }).notNull().primaryKey(),
531
+ label: varchar('label', { length: 255 }).notNull()
532
+ });
533
+
534
+
535
+ export const CarEnginePowerTypesTable = mysqlTable('car_engine_power_types', {
536
+ Key: varchar('_key', { length: 255 }).notNull().primaryKey(),
537
+ label: varchar('label', { length: 255 }).notNull()
538
+ });
539
+
540
+
541
+ export const CarTractionTypesTable = mysqlTable('car_traction_types', {
542
+ Key: varchar('_key', { length: 255 }).notNull().primaryKey(),
543
+ label: varchar('label', { length: 255 }).notNull()
544
+ });
545
+
546
+
547
+ export const CarBodyTypesTable = mysqlTable('car_body_types', {
548
+ Key: varchar('_key', { length: 255 }).notNull().primaryKey(),
549
+ label: varchar('label', { length: 255 }).notNull()
550
+ });
551
+
552
+
553
+ export const CarGearTypesTable = mysqlTable('car_gear_types', {
554
+ Key: varchar('_key', { length: 255 }).notNull().primaryKey(),
555
+ label: varchar('label', { length: 255 }).notNull()
556
+ });
557
+
558
+
559
+ export const CarFuelTypesTable = mysqlTable('car_fuel_types', {
560
+ Key: varchar('_key', { length: 255 }).notNull().primaryKey(),
561
+ label: varchar('label', { length: 255 }).notNull()
562
+ });
563
+
564
+
428
565
  export const CarsDbTable = mysqlTable('cars_db', {
429
566
  id: int('id').autoincrement().notNull().primaryKey(),
430
567
  name: varchar('name', { length: 255 }).notNull(),
@@ -457,10 +594,18 @@ export const BooksTable = mysqlTable('books', {
457
594
  townId: int('town_id')
458
595
  }, (table) => [
459
596
  index('title_index').on(table.title),
460
- unique('title_unique').on(table.title)
597
+ unique('title_unique').on(table.title),
598
+ index('title_fulltext').on(table.title),
599
+ index('desc_fulltext').on(table.desc)
461
600
  ]);
462
601
 
463
602
 
603
+ export const BookFromWhomTypesTable = mysqlTable('book_from_whom_types', {
604
+ id: varchar('id', { length: 255 }).notNull().primaryKey(),
605
+ label: varchar('label', { length: 255 }).notNull()
606
+ });
607
+
608
+
464
609
  export const AddressTable = mysqlTable('address', {
465
610
  id: int('id').autoincrement().notNull().primaryKey(),
466
611
  catOrder: int('cat_order').notNull(),
@@ -474,6 +619,32 @@ export const AddressTable = mysqlTable('address', {
474
619
  });
475
620
 
476
621
 
622
+ export const E2eOptionalFieldsTable = mysqlTable('e2e_optional_fields', {
623
+ id: int('id').autoincrement().notNull().primaryKey(),
624
+ title: varchar('title', { length: 255 }),
625
+ slug: varchar('slug', { length: 255 }),
626
+ subtitle: longtext('subtitle'),
627
+ secret: varchar('secret', { length: 255 }),
628
+ quantity: int('quantity'),
629
+ price: float('price'),
630
+ rating: double('rating'),
631
+ isPublished: boolean('is_published'),
632
+ status: mysqlEnum('status', ['draft', 'published', 'archived']),
633
+ categories: varchar('categories', { length: 255 }),
634
+ tags: varchar('tags', { length: 255 }),
635
+ coverPhoto: varchar('cover_photo', { length: 255 }),
636
+ videoClip: varchar('video_clip', { length: 255 }),
637
+ attachment: varchar('attachment', { length: 255 }),
638
+ bodyContent: longtext('body_content'),
639
+ publishDate: date('publish_date'),
640
+ startsAt: datetime('starts_at'),
641
+ availableFrom: date('available_from'),
642
+ availableUntil: date('available_until'),
643
+ brandColor: varchar('brand_color', { length: 7 }),
644
+ mapLocation: varchar('map_location', { length: 255 })
645
+ });
646
+
647
+
477
648
  export const E2eAllFieldsTable = mysqlTable('e2e_all_fields', {
478
649
  id: int('id').autoincrement().notNull().primaryKey(),
479
650
  title: varchar('title', { length: 255 }).notNull(),
@@ -70,7 +70,7 @@
70
70
  "nanoid": "^5.1.2",
71
71
  "next": "16.1.1",
72
72
  "next-themes": "^0.4.6",
73
- "nextjs-cms": "0.9.20",
73
+ "nextjs-cms": "0.9.22",
74
74
  "plaiceholder": "^3.0.0",
75
75
  "prettier-plugin-tailwindcss": "^0.7.2",
76
76
  "qrcode": "^1.5.4",