This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { array, object, number, string, date, InferType } from "yup"; | |
import { Model } from "objection"; | |
// Shared | |
// Shared API data schema (objects shared between client and server) | |
export const sharedSchema = object({ | |
// none of these are required since not set until save (but they are also not nullable) | |
id: number() | |
.integer() | |
.notRequired(), |