OptionalcontractOptionalcontractOptionaldeletedOptionallastOptionalrestoredContractProspect ID
Date created
Date updated
Date deleted
Created By
Field relation sw001.sw001s01
Updated By
Field relation sw001.sw001s01
Deleted By
Field relation sw001.sw001s01
Requiredsw029s08Lead ID
Field relation sw025.sw025s01
Simulation ID
Field relation sw028.sw028s01
Requiredsw029s10Tariff Price Movement ID
Field relation sw077.sw077s01
Requiredsw029s11Client ID
Field relation sw030.sw030s01
Requiredsw029s12CUPS - Postal code
Requiredsw029s13CUPS - Province
Requiredsw029s14CUPS
Requiredsw029s16Document Type ID
Field relation sw019.sw019s01
Requiredsw029s17Document Number
Requiredsw029s18Address - Postal code
Requiredsw029s19Address - Province
Field relation sw073.sw073s09
Requiredsw029s20Address - Municipality
Field relation sw073.sw073s09
Requiredsw029s21Address - Locality
Requiredsw029s22Address - Type of road ID
Field relation sw018.sw018s01
Requiredsw029s23Address - Description road
Address - Number
Address - Block
Address - Port
Address - Complement
Requiredsw029s28Energy green
Requiredsw029s29IBAN
Requiredsw029s30IBAN - Is Owner
Requiredsw029s31IBAN - Owner - Firstname
Requiredsw029s32IBAN - Owner - Lastname
Requiredsw029s33IBAN - Owner - Email
Requiredsw029s34IBAN - Owner - Phone / Mobile
Requiredsw029s35Invoice digital
Requiredsw029s36Payment by card
Requiredsw029s37Energy Tariff ID
Field relation sw012.sw012s01
Requiredsw029s38Powers Energy intends contract
Requiredsw029s39Powers Energy 1 ID
Field relation sw011.sw011s01
Powers Energy 2 ID
Field relation sw011.sw011s01
Requiredsw029s41Powers Energy 1 - Other
Requiredsw029s42Powers Energy 2 - Other
Powers Energy 3
Field relation sw011.sw011s01
Requiredsw029s44Powers Energy 3 - Other
Requiredsw029s45Total Powers Energy
Requiredsw029s46UUID
Requiredsw029s47IBAN - Owner - Address - Postal code
IBAN - Owner - Address - Province
Field relation sw073.sw073s09
IBAN - Owner - Address - Municipality
Field relation sw073.sw073s09
IBAN - Owner - Address - Locality
IBAN - Owner - Address - Type of road ID
Field relation sw018.sw018s01
IBAN - Owner - Address - Description road
IBAN - Owner - Address - Number
IBAN - Owner - Address - Block
IBAN - Owner - Address - Port
IBAN - Owner - Address - Complement
Requiredsw029s57Address - Country
Field relation sw017.sw017s01
IBAN - Owner - Address - Country
Field relation sw017.sw017s01
Requiredsw029s59Address - Locality ID
Field relation sw073.sw073s09
IBAN - Owner - Address - Locality ID
Field relation sw073.sw073s09
Requiredsw029s61Date of Birth
Requiredsw029s62Document expiration date
Requiredsw029s63CUPS - Self Consumption
Requiredsw029s64CUPS - Social Bonus
Requiredsw029s65Nationality ID
Field relation sw017.sw017s01
OptionalupdatedStatictargetReturns object that is managed by this repository. If this repository manages entity from schema, then it returns a name of that schema instead.
Checks if entity has an id. If entity composite compose ids, it will check them all.
Recovers a given entity in the database.
Optionaloptions: SaveOptionsReloads entity data from the database.
Removes current entity from the database.
Optionaloptions: RemoveOptionsSaves current entity in the database. If entity does not exist in the database then inserts, otherwise updates.
Optionaloptions: SaveOptionsRecords the delete date of current entity.
Optionaloptions: SaveOptionsStaticaverageStaticclearClears all the data from the given table/collection (truncates/drops it).
StaticcountStaticcountStaticcreateStaticcreateStaticdeleteDeletes entities by a given criteria. Unlike remove method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient DELETE query. Does not check if entity exist in the database.
StaticexistsStaticexistsStaticfindStaticfindFinds entities that match given find options. Also counts all entities that match given conditions, but ignores pagination settings (from and take options).
StaticfindStaticfindStaticfindStaticfindStaticfindStaticfindStaticfindStaticfindStaticgetStaticgetStatichasChecks entity has an id. If entity composite compose ids, it will check them all.
StaticinsertInserts a given entity into the database. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient INSERT query. Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
StaticmaximumStaticmergeStaticminimumStaticpreloadCreates a new entity from the given plain javascript object. If entity already exist in the database, then it loads it (and everything related to it), replaces all values with the new ones from the given object and returns this new entity. This new entity is actually a loaded from the db entity with all properties replaced from the new object.
Note that given entity-like object must have an entity id / primary key to find entity by. Returns undefined if entity with given id was not found.
StaticqueryExecutes a raw SQL query and returns a raw database results. Raw query execution is supported only by relational databases (MongoDB is not supported).
Optionalparameters: any[]StaticremoveStaticsaveStaticsoftStaticsumStaticupdateUpdates entity partially. Entity can be found by a given conditions. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient UPDATE query. Does not check if entity exist in the database.
StaticupsertInserts a given entity into the database, unless a unique constraint conflicts then updates the entity Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient INSERT ... ON CONFLICT DO UPDATE/ON DUPLICATE KEY UPDATE query.
StaticuseSets DataSource to be used by entity.
Contract Prospect - History
Tabela histórico para gerir os prospectos de contrato