Skip to content

Instantly share code, notes, and snippets.

@tporto
Created May 1, 2018 20:58
Show Gist options
  • Select an option

  • Save tporto/f72765563d518b0e2b3cf21e129b1809 to your computer and use it in GitHub Desktop.

Select an option

Save tporto/f72765563d518b0e2b3cf21e129b1809 to your computer and use it in GitHub Desktop.
Classe free pascal
unit vo;
{$mode objfpc}{$H+}
interface
uses
TypInfo, SysUtils, Classes, FPJSON, FGL, fpjsonrtti, DOM, XMLRead;
type
{ TVO }
TVO = class(TPersistent)
published
constructor Create; overload; virtual;
end;
TClassVO = class of TVO;
TListaVO = specialize TFPGObjectList<TVO>;
implementation
{ TVO }
constructor TVO.Create;
begin
inherited Create;
end;
===============================================
Essa classe abaixo herda de TVO
unit model.almoxarifados;
{$mode objfpc}{$H+}
interface
uses
Classes,
SysUtils,
fgl,
vo;
type
TAlmoxarifados = class(TVO)
private
fId: Integer;
fId_empresa: Integer;
fNome: String;
fCriado_em: TDateTime;
fEditado_em: TDateTime;
fExcluido_em: TDateTime;
fCriado_por: Integer;
fEditado_por: Integer;
fExcluido_por: Integer;
published
property ID: Integer read fId write fId;
property ID_EMPRESA: Integer read fId_empresa write fId_empresa;
property NOME: String read fNome write fNome;
property CRIADO_EM: TDateTime read fCriado_em write fCriado_em;
property EDITADO_EM: TDateTime read fEditado_em write fEditado_em;
property EXCLUIDO_EM: TDateTime read fExcluido_em write fExcluido_em;
property CRIADO_POR: Integer read fCriado_por write fCriado_por;
property EDITADO_POR: Integer read fEditado_por write fEditado_por;
property EXCLUIDO_POR: Integer read fExcluido_por write fExcluido_por;
end;
TListAlmoxarifados = specialize TFPGObjectList<TAlmoxarifados>;
implementation
initialization
Classes.RegisterClass(TAlmoxarifados);
finalization
Classes.UnRegisterClass(TAlmoxarifados);
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment