@oaknational/oak-curriculum-schema-v2 0.0.3-alpha → 0.0.4-alpha

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/README.md CHANGED
@@ -33,6 +33,23 @@ const newLesson = lessonInsertSchema.parse(payload);
33
33
  const publishedLesson = lessonPublishedSchema.parse(row);
34
34
  ```
35
35
 
36
+ ## Row types
37
+
38
+ The schema declarations in `types.d.ts` are built by `drizzle-zod` and are
39
+ hard to read. To see a table's fields, hover (or go to definition on) the
40
+ matching row type, which is `z.infer` of the schema and resolves to a flat
41
+ list of columns.
42
+
43
+ | Schema | Select type | Insert type |
44
+ | --- | --- | --- |
45
+ | `lessonSelectSchema` | `Lesson` | `LessonInsert` |
46
+ | `documentSelectSchema` | `Document` | `DocumentInsert` |
47
+ | `gdriveFileSelectSchema` | `GdriveFile` | `GdriveFileInsert` |
48
+ | `lessonComponentStatusSelectSchema` | `LessonComponentStatus` | `LessonComponentStatusInsert` |
49
+ | `mediaStatusSelectSchema` | `MediaStatus` | `MediaStatusInsert` |
50
+ | `contentGuidanceSelectSchema` | `ContentGuidance` | `ContentGuidanceInsert` |
51
+ | `draftLessonWithStatusSelectSchema` | `DraftLessonWithStatus` | n/a (view) |
52
+
36
53
  ## Links
37
54
 
38
55
  - [npm package](https://www.npmjs.com/package/@oaknational/oak-curriculum-schema-v2)