19 lines
505 B
TypeScript
19 lines
505 B
TypeScript
import { type TypeOf, string } from 'zod'
|
|
import { AbstractSchema } from './abstract'
|
|
import { DateSchema } from './common/date'
|
|
import { IdSchema } from './common/id'
|
|
import { UserSchema } from './user'
|
|
|
|
|
|
export const TaskCommentSchema = AbstractSchema.extend({
|
|
id: IdSchema.default(0),
|
|
taskId: IdSchema.default(0),
|
|
comment: string().default(''),
|
|
author: UserSchema,
|
|
|
|
created: DateSchema.nullable(),
|
|
updated: DateSchema.nullable(),
|
|
})
|
|
|
|
export type TaskComment = TypeOf<typeof TaskCommentSchema>
|