14 lines
405 B
TypeScript
14 lines
405 B
TypeScript
import { Type } from 'typebox'
|
|
|
|
export const UserSchema = Type.Object({
|
|
id: Type.String(),
|
|
username: Type.String(),
|
|
displayName: Type.String(),
|
|
createdAt: Type.String({ format: 'date-time' }),
|
|
}, { title: 'User', description: 'User' })
|
|
|
|
export const CreateUserSchema = Type.Object({
|
|
username: Type.String({ minLength: 1 }),
|
|
password: Type.String({ minLength: 6 }),
|
|
}, { title: 'CreateUser' })
|