Models

Typescript model structure

Typescript is used to define entity models in the frontend.

Here will be defined all the properties and their types for that model.

This model will be used in stores and in all components throughout the frontend.

Here's an example:

export default interface Thread {
    id: number
    slug: string
    name: string
    status: ThreadStatusEnum
    messages_count: number
    color: string
    channel_id: number
    channel: Channel
    description: string
    created_at?: string
    updated_at?: string
    deleted_at?: string
}

Last updated