unit BancoDTO;

interface

uses
    SynCommons,
  mORMot, Classes,

  Atributos;

type
{$IFDEF Servidor_mORMot}
  TBanco = class(TPersistent)
{$ELSE}
  TBanco = class(TSQLRecord)
{$ENDIF}

  private
    FPK: Integer;
    FCODIGO: RawUTF8;
    FNOME: RawUTF8;
    FURL: RawUTF8;

  public
    [TPK('ID', [ldGrid, ldLookup, ldComboBox])]
    property PK: Integer  read FPK write FPK;

  published
    [TColumn('CODIGO', 'Codigo', 80, [ldGrid, ldLookup, ldCombobox], False)]
    property Codigo: RawUTF8  read FCODIGO write FCODIGO;
    [TColumn('NOME', 'Nome', 450, [ldGrid, ldLookup, ldCombobox], False)]
    property Nome: RawUTF8  read FNOME write FNOME;
    [TColumn('URL', 'Url', 450, [ldGrid, ldLookup, ldCombobox], False)]
    property Url: RawUTF8 read FURL write FURL;
  end;

implementation

{$IFDEF Servidor_mORMot}
initialization
  Classes.RegisterClass(TBanco);

finalization
  Classes.UnRegisterClass(TBanco);
{$ELSE}
{$ENDIF}

end.
