unit BancoDTO;

interface

uses
    SynCommons,
  mORMot;

type
  TBanco = class(TSQLRecord)
  private
    FCODIGO: RawUTF8;
    FNOME: RawUTF8;
    FURL: RawUTF8;

  published
    property Codigo: RawUTF8 index 100  read FCODIGO write FCODIGO;
    property Nome: RawUTF8 index 100  read FNOME write FNOME;
    property Url: RawUTF8 index 250  read FURL write FURL;

  end;

function DataModel: TSQLModel;

const
  SERVER_ROOT = 'root';
  SERVER_PORT = '888';

 
implementation

function DataModel: TSQLModel;
begin
  result := TSQLModel.Create([TBanco],SERVER_ROOT);
//  TBanco.AddFilterOrValidate('Nome',TSynValidateText.Create); // ensure exists
end;

end.
