unit uClasse.json.autenticacao;

interface

uses
  uClasse.json.DTO, System.Generics.Collections, REST.json.Types;

// {$M+}

type
  TCreateTokenDTO = class
  private
    FToken: string;
  published
    property Token: string read FToken write FToken;
  end;

  TDataDTO = class
  private
    FCreateToken: TCreateTokenDTO;
  published
    property CreateToken: TCreateTokenDTO read FCreateToken write FCreateToken;
  public
    constructor Create;
    destructor Destroy; override;
  end;

  TJSONRootDTO = class(TJsonDTO)
  private
    FData: TDataDTO;
  published
    property Data: TDataDTO read FData write FData;
  public
    constructor Create; override;
    destructor Destroy; override;
  end;

implementation

{ TDataDTO }

constructor TDataDTO.Create;
begin
  inherited;
  FCreateToken := TCreateTokenDTO.Create;
end;

destructor TDataDTO.Destroy;
begin
  FCreateToken.Free;
  inherited;
end;

{ TRootDTO }

constructor TJSONRootDTO.Create;
begin
  inherited;
  FData := TDataDTO.Create;
end;

destructor TJSONRootDTO.Destroy;
begin
  FData.Free;
  inherited;
end;

end.
