Difference between revisions of "TruxtonJurisdiction"
Jump to navigation
Jump to search
(→Sample) |
|||
| Line 2: | Line 2: | ||
=Attributes and Methods= | =Attributes and Methods= | ||
| − | ==<code>id</code>== | + | ==<code>id: int</code>== |
An 64-bit integer value for the jurisdiction. | An 64-bit integer value for the jurisdiction. | ||
| − | ==<code>name</code>== | + | ==<code>name: name</code>== |
A human readable label for the jurisdiction. | A human readable label for the jurisdiction. | ||
| − | ==<code>description</code>== | + | ==<code>description: str</code>== |
A longer description of the jurisdiction. | A longer description of the jurisdiction. | ||
| − | ==<code>save()</code>== | + | ==<code>save() -> bool</code>== |
This will commit the information to the <code>[Jurisdiction]</code> table. | This will commit the information to the <code>[Jurisdiction]</code> table. | ||
It will return [https://docs.python.org/3/library/constants.html#True True] if the record was saved to the database, [https://docs.python.org/3/library/constants.html#False False] if there was an error. | It will return [https://docs.python.org/3/library/constants.html#True True] if the record was saved to the database, [https://docs.python.org/3/library/constants.html#False False] if there was an error. | ||
Revision as of 06:02, 29 July 2022
This class lets you add to the [Jurisdiction] table in Truxton.
Contents
Attributes and Methods
id: int
An 64-bit integer value for the jurisdiction.
name: name
A human readable label for the jurisdiction.
description: str
A longer description of the jurisdiction.
save() -> bool
This will commit the information to the [Jurisdiction] table.
It will return True if the record was saved to the database, False if there was an error.
Sample
import sys
sys.path.append('C:/Program Files/Truxton/SDK')
import truxton
def main():
t = truxton.create()
jurisdiction = t.newjurisdiction();
jurisdiction.id = 100
jurisdiction.name = "DOJ-DC"
jurisdiction.description = "Justice Department DC Headquarters"
jurisdiction.save()
investigation = t.newinvestigation()
investigation.name = "Collusion"
investigation.description = "United States vs. Michael Flynn"
investigation.case = "DC-SNAFU-2016.2020"
investigation.jurisdiction = jurisdiction.id
investigation.status = truxton.INVESTIGATION_STATUS_OPEN
investigation.type = truxton.INVESTIGATION_TYPE_FRAUD
investigation.save()
if __name__ == "__main__":
main()