mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-16 01:32:02 +10:00
refactor(v4.0.0-alpha): beginning of a new era
This commit is contained in:
25
libs/schema/src/sections/publication.ts
Normal file
25
libs/schema/src/sections/publication.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { defaultItem, defaultUrl, itemSchema, urlSchema } from "../shared";
|
||||
|
||||
// Schema
|
||||
export const publicationSchema = itemSchema.extend({
|
||||
name: z.string().min(1),
|
||||
publisher: z.string(),
|
||||
date: z.string(),
|
||||
summary: z.string(),
|
||||
url: urlSchema,
|
||||
});
|
||||
|
||||
// Type
|
||||
export type Publication = z.infer<typeof publicationSchema>;
|
||||
|
||||
// Defaults
|
||||
export const defaultPublication: Publication = {
|
||||
...defaultItem,
|
||||
name: "",
|
||||
publisher: "",
|
||||
date: "",
|
||||
summary: "",
|
||||
url: defaultUrl,
|
||||
};
|
||||
Reference in New Issue
Block a user