title: Models vs DTO in NestJS
body: <p>I am completely new to NestJS. I have seen that in NestJS, a model is created to specify the details of data, e.g. when creating a simple task manager, when we want to specify what a single task will look like, we specify it in the model (example below):</p>
  <pre><code>export interface Task {
    id: string;
    title: string;
    description: string;
    status: TaskStatus;
  }
  
  export enum TaskStatus {
    OPEN = 'OPEN',
    IN_PROGRESS = 'IN_PROGRESS',
    DONE = 'DONE',
  }
  </code></pre>
  <p>However, I later came across DTOs, where once again the shape of data is described. My understanding is that DTOs are used when transferring data, i.e. it describes the kind of data that you will post or get.</p>
  <p>My question is that when I am already using DTOs to describe the shape of data, why use Models at all?</p>
  <p>Also, I read that with DTOs we can have a single source of truth and in case we realise that the structure of data needs to change, we won't have to specify it separately in the controller and service files, however, this still means we will have to update the Model?</p>