feat: design applications and first api calls
Co-authored-by: Walid <87608619+WalidKorchi@users.noreply.github.com>
This commit is contained in:
20
models/Message.ts
Normal file
20
models/Message.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { Type } from '@sinclair/typebox'
|
||||
|
||||
import { date, id } from './utils'
|
||||
|
||||
export const types = [Type.Literal('text'), Type.Literal('file')]
|
||||
|
||||
export const messageSchema = {
|
||||
id,
|
||||
value: Type.String(),
|
||||
type: Type.Union(types, { default: 'text' }),
|
||||
mimetype: Type.String({
|
||||
maxLength: 255,
|
||||
default: 'text/plain',
|
||||
format: 'mimetype'
|
||||
}),
|
||||
createdAt: date.createdAt,
|
||||
updatedAt: date.updatedAt,
|
||||
memberId: id,
|
||||
channelId: id
|
||||
}
|
Reference in New Issue
Block a user