-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added check stocked and consumed products (tickets.json)
- Loading branch information
1 parent
1225f86
commit 841d54a
Showing
4 changed files
with
154 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
unit Kernel.Ticket; | ||
|
||
{$mode DelphiUnicode} | ||
|
||
interface | ||
|
||
uses | ||
Classes, SysUtils, mormot.core.json; | ||
|
||
type | ||
|
||
{ TTicket } | ||
|
||
TTicket = class(TSynAutoCreateFields) | ||
private | ||
FConsumedProducts: TStrings; | ||
FId: string; | ||
FStockedProducts: TStrings; | ||
public | ||
constructor Create; override; | ||
destructor Destroy; override; | ||
published | ||
property Id: string read FId write FId; | ||
property StockedProducts: TStrings read FStockedProducts write FStockedProducts; | ||
property ConsumedProducts: TStrings read FConsumedProducts write FConsumedProducts; | ||
end; | ||
|
||
TTicketArray = array of TTicket; | ||
|
||
implementation | ||
|
||
{ TTicket } | ||
|
||
constructor TTicket.Create; | ||
begin | ||
inherited Create; | ||
|
||
FStockedProducts := TStringList.Create; | ||
FConsumedProducts := TStringList.Create; | ||
end; | ||
|
||
destructor TTicket.Destroy; | ||
begin | ||
FStockedProducts.Free; | ||
FConsumedProducts.Free; | ||
|
||
inherited Destroy; | ||
end; | ||
|
||
end. |