This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/modelSchema/attachment.ts

19 lines
509 B
TypeScript

import type { TypeOf } from 'zod'
import { DateSchema } from './common/date'
import { IdSchema } from './common/id'
import { AbstractSchema } from './abstract'
import { UserSchema } from './user'
import { FileSchema } from './file'
export const AttachmentSchema = AbstractSchema.extend({
id: IdSchema.default(0),
taskId: IdSchema.default(0), // iTaskSchema.shape.id
createdBy: UserSchema,
file: FileSchema,
created: DateSchema.nullable(),
})
export type IAttachment = TypeOf<typeof AttachmentSchema>