mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
40 lines
1.1 KiB
ObjectPascal
40 lines
1.1 KiB
ObjectPascal
unit CustomerEntityU;
|
|
|
|
interface
|
|
|
|
uses
|
|
MVCFramework.ActiveRecord, MVCFramework.Nullables;
|
|
|
|
type
|
|
[MVCTable('customers')]
|
|
TCustomer = class(TMVCActiveRecord)
|
|
private
|
|
[MVCTableField('id', [foPrimaryKey, foAutoGenerated])]
|
|
fID: NullableInt64;
|
|
[MVCTableField('code')]
|
|
fCode: NullableString;
|
|
[MVCTableField('description')]
|
|
fCompanyName: NullableString;
|
|
[MVCTableField('city')]
|
|
fCity: string;
|
|
[MVCTableField('last_contact_timestamp')]
|
|
fLastContact: NullableTDateTime;
|
|
[MVCTableField('rating')]
|
|
fRating: NullableInt32;
|
|
[MVCTableField('note')]
|
|
fNote: string;
|
|
public
|
|
property ID: NullableInt64 read fID write fID;
|
|
property Code: NullableString read fCode write fCode;
|
|
property CompanyName: NullableString read fCompanyName write fCompanyName;
|
|
property City: string read fCity write fCity;
|
|
property LastContact: NullableTDateTime read fLastContact write fLastContact;
|
|
property Rating: NullableInt32 read fRating write fRating;
|
|
property Note: string read fNote write fNote;
|
|
end;
|
|
|
|
|
|
implementation
|
|
|
|
end.
|