mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-13 00:32:35 +02:00
269 lines
8.6 KiB
Plaintext
269 lines
8.6 KiB
Plaintext
object RestDataModule: TRestDataModule
|
|
OnCreate = DataModuleCreate
|
|
OldCreateOrder = False
|
|
Height = 294
|
|
HorizontalOffset = 465
|
|
VerticalOffset = 319
|
|
Width = 407
|
|
PPI = 96
|
|
object Dispatcher: TSQLDBRestDispatcher
|
|
Active = False
|
|
Connections = <
|
|
item
|
|
ConnectionType = 'PostgreSQL'
|
|
Name = 'Expenses'
|
|
Password = 'Secret'
|
|
UserName = 'Me'
|
|
CharSet = 'UTF8'
|
|
HostName = 'localhost'
|
|
DatabaseName = 'expensetracker'
|
|
Port = 0
|
|
end>
|
|
Schemas = <
|
|
item
|
|
Schema = ExpensesSchema
|
|
end>
|
|
DefaultConnection = 'Expenses'
|
|
DispatchOptions = [rdoConnectionInURL, rdoExposeMetadata, rdoCustomView, rdoAccessCheckNeedsDB, rdoConnectionResource]
|
|
Authenticator = AuthBasic
|
|
EnforceLimit = 0
|
|
CORSMaxAge = 86400
|
|
CORSAllowCredentials = True
|
|
LogOptions = [rloUser, rtloHTTP, rloResource, rloConnection, rloAuthentication, rloResultStatus]
|
|
LogSQLOptions = [detCustom, detPrepare, detExecute, detFetch, detCommit, detRollBack, detActualSQL]
|
|
OnLog = DispatcherLog
|
|
left = 72
|
|
top = 32
|
|
end
|
|
object ExpensesSchema: TSQLDBRestSchema
|
|
Resources = <
|
|
item
|
|
Fields = <
|
|
item
|
|
FieldName = 'eid'
|
|
PublicName = 'eid'
|
|
GeneratorName = 'seqExpenseID'
|
|
FieldType = rftLargeInt
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInKey, foInInsert, foInUpdate, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'euserfk'
|
|
PublicName = 'euserfk'
|
|
FieldType = rftLargeInt
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'eprojectfk'
|
|
PublicName = 'eprojectfk'
|
|
FieldType = rftLargeInt
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'etypefk'
|
|
PublicName = 'etypefk'
|
|
FieldType = rftLargeInt
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'eamount'
|
|
PublicName = 'eamount'
|
|
FieldType = rftFloat
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'edate'
|
|
PublicName = 'edate'
|
|
FieldType = rftDate
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'ecomment'
|
|
PublicName = 'ecomment'
|
|
FieldType = rftString
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 1024
|
|
end>
|
|
TableName = 'expenses'
|
|
ResourceName = 'expenses'
|
|
AllowedOperations = [roGet, roPost, roPut, roDelete, roOptions, roHead]
|
|
end
|
|
item
|
|
Fields = <
|
|
item
|
|
FieldName = 'etid'
|
|
PublicName = 'etid'
|
|
GeneratorName = 'seqExpenseTypesID'
|
|
FieldType = rftLargeInt
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInKey, foInInsert, foInUpdate, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'etname'
|
|
PublicName = 'etname'
|
|
FieldType = rftString
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 50
|
|
end
|
|
item
|
|
FieldName = 'etdescription'
|
|
PublicName = 'etdescription'
|
|
FieldType = rftString
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 100
|
|
end
|
|
item
|
|
FieldName = 'etmaxamount'
|
|
PublicName = 'etmaxamount'
|
|
FieldType = rftFloat
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'etcost'
|
|
PublicName = 'etcost'
|
|
FieldType = rftFloat
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'etactive'
|
|
PublicName = 'etactive'
|
|
FieldType = rftBoolean
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end>
|
|
TableName = 'expensetypes'
|
|
ResourceName = 'expensetypes'
|
|
AllowedOperations = [roGet, roPost, roPut, roDelete, roOptions, roHead]
|
|
end
|
|
item
|
|
Fields = <
|
|
item
|
|
FieldName = 'pid'
|
|
PublicName = 'pid'
|
|
GeneratorName = 'seqProjectsID'
|
|
FieldType = rftLargeInt
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInKey, foInInsert, foInUpdate, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'pname'
|
|
PublicName = 'pname'
|
|
FieldType = rftString
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 50
|
|
end
|
|
item
|
|
FieldName = 'pdescription'
|
|
PublicName = 'pdescription'
|
|
FieldType = rftString
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 100
|
|
end
|
|
item
|
|
FieldName = 'pactive'
|
|
PublicName = 'pactive'
|
|
FieldType = rftBoolean
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end>
|
|
TableName = 'projects'
|
|
ResourceName = 'projects'
|
|
AllowedOperations = [roGet, roPost, roPut, roDelete, roOptions, roHead]
|
|
end
|
|
item
|
|
Fields = <
|
|
item
|
|
FieldName = 'uid'
|
|
PublicName = 'uid'
|
|
GeneratorName = 'seqUsersID'
|
|
FieldType = rftLargeInt
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInKey, foInInsert, foInUpdate, foOrderByDesc]
|
|
MaxLen = 0
|
|
end
|
|
item
|
|
FieldName = 'ulogin'
|
|
PublicName = 'ulogin'
|
|
FieldType = rftString
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 50
|
|
end
|
|
item
|
|
FieldName = 'ufullname'
|
|
PublicName = 'ufullname'
|
|
FieldType = rftString
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 100
|
|
end
|
|
item
|
|
FieldName = 'upassword'
|
|
PublicName = 'upassword'
|
|
FieldType = rftString
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 100
|
|
end
|
|
item
|
|
FieldName = 'uactive'
|
|
PublicName = 'uactive'
|
|
FieldType = rftBoolean
|
|
NativeFieldType = ftUnknown
|
|
Options = [foInInsert, foInUpdate, foFilter, foOrderByDesc]
|
|
MaxLen = 0
|
|
end>
|
|
TableName = 'users'
|
|
ResourceName = 'users'
|
|
AllowedOperations = [roGet, roPost, roPut, roDelete, roOptions, roHead]
|
|
end>
|
|
left = 240
|
|
top = 40
|
|
end
|
|
object AuthBasic: TRestBasicAuthenticator
|
|
AuthenticateUserSQL.Strings = (
|
|
'select uID from users where (uLogin=:UserName) and (uPassword=:Password)'
|
|
)
|
|
DefaultUserName = 'me'
|
|
DefaultPassword = 'secret'
|
|
DefaultUserID = 'me'
|
|
left = 136
|
|
top = 104
|
|
end
|
|
object BPProjects: TSQLDBRestBusinessProcessor
|
|
Schema = ExpensesSchema
|
|
ResourceName = 'projects'
|
|
OnGetDataset = DoGetDataset
|
|
OnCheckParams = DoCheckParams
|
|
OnAllowResource = DoAllowResource
|
|
OnAllowedOperations = DoAllowedOperations
|
|
OnAllowRecord = DoAllowedRecord
|
|
left = 254
|
|
top = 121
|
|
end
|
|
end
|