-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: BaseDBEntity now has all fields required (id/created/updated)
Same as what SavedDBEntity was before.
- Loading branch information
1 parent
a600a97
commit fcb1fac
Showing
8 changed files
with
38 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import type { BaseDBEntity, SavedDBEntity } from '../types' | ||
import type { BaseDBEntity } from '../types' | ||
import { jsonSchema } from './jsonSchemaBuilder' | ||
|
||
export const baseDBEntityJsonSchema = jsonSchema.object<BaseDBEntity>({ | ||
id: jsonSchema.string().optional(), | ||
created: jsonSchema.unixTimestamp2000().optional(), | ||
updated: jsonSchema.unixTimestamp2000().optional(), | ||
}) | ||
|
||
export const savedDBEntityJsonSchema = jsonSchema.object<SavedDBEntity>({ | ||
id: jsonSchema.string(), | ||
created: jsonSchema.unixTimestamp2000(), | ||
updated: jsonSchema.unixTimestamp2000(), | ||
}) | ||
|
||
// export const savedDBEntityJsonSchema = jsonSchema.object<SavedDBEntity>({ | ||
// id: jsonSchema.string(), | ||
// created: jsonSchema.unixTimestamp2000(), | ||
// updated: jsonSchema.unixTimestamp2000(), | ||
// }) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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