19 lines
509 B
TypeScript
19 lines
509 B
TypeScript
import { type TypeOf, nativeEnum } from 'zod'
|
|
|
|
import { AbstractSchema } from './abstract'
|
|
|
|
import { DateSchema } from './common/date'
|
|
import { IdSchema } from './common/id'
|
|
|
|
import { RIGHTS } from '@/constants/rights'
|
|
|
|
export const TeamShareBaseSchema = AbstractSchema.extend({
|
|
teamId: IdSchema.default(0), // ITeam['id']
|
|
right: nativeEnum(RIGHTS).default(RIGHTS.READ),
|
|
|
|
created: DateSchema.nullable(),
|
|
updated: DateSchema.nullable(),
|
|
})
|
|
|
|
export type ITeamShareBase = TypeOf<typeof TeamShareBaseSchema>
|