class SubDescriptor(Model):
    __primarykey__ = "label"

    label = Property()
    sub_descriptor = RelatedFrom("SubDescriptor", "sub_of")
    tasks = RelatedFrom("Task", "develop")
class Victim(BaseModel):
    """Base class for a victim"""

    __primarykey__ = "individual_id"

    # from data
    individual_id = Property()
    group_id = Property()
    first_name = Property()
    last_name = Property()
    age = Property()
    minor = Property()
    male = Property()
    number_previous_arrests = Property()
    occupation = Property()
    occupation_detail = Property()
    victim_affiliation = Property()
    victim_affiliation_detail = Property()
    targeted = Property()

    victim_of = RelatedTo("ViolentEvent", "VICTIM_OF")
class ViolentEvent(BaseModel):

    __primarykey__ = "event_id"

    event_id = Property()
    violence = Property()
    method = Property()
    interrogation = Property()
    torture = Property()
    mistreatment = Property()
    press = Property()
    start_date_daily = Property()
    end_date_daily = Property()
    start_date_monthly = Property()
    end_date_monthly = Property()
    page = Property()
    additional_comments = Property()

    # outgoing relationships
    first_location = RelatedTo("Location", "FIRST_LOCATION")
    in_location = RelatedTo("Location", "IN_LOCATION")
    last_location = RelatedTo("Location", "LAST_LOCATION")

    # incoming relationships
    victims = RelatedFrom("Victim", "VICTIM_OF")
    perpetrators = RelatedFrom("perpetrator", "PERPETRATOR_OF")
Exemple #4
0
class Commit(NeoGraphObject):

    __primarylabel__ = "Commit"
    __primarykey__ = "id"

    __unique_constraints__ = ["id", "short_id"]

    id = Property("id")
    short_id = Property("short_id")
    title = Property("title")
    message = Property("message")
    created_at = Property("created_at")
    author_name = Property("author_name")
    author_email = Property("author_email")
    authored_date = Property("authored_date")
    committer_name = Property("committer_name")
    committer_email = Property("committer_email")
    committed_date = Property("committed_date")

    belongs_to = RelatedTo(Project)
    is_author = RelatedTo(User)
    is_committer = RelatedTo(User)
    has_parent = RelatedTo("Commit")
    is_parent = RelatedFrom("Commit", "HAS_PARENT")
    is_merge_commit = RelatedFrom("MergeRequest", "HAS_MERGE_COMMIT")
    is_latest_commit = RelatedFrom("MergeRequest", "IS_LATEST_COMMIT")
Exemple #5
0
class MergeRequest(NeoGraphObject):

    __primarylabel__ = "MergeRequest"
    __primarykey__ = "id"

    __unique_constraints__ = ["id", "iid"]

    id = Property("id")
    iid = Property("iid")
    title = Property("title")
    state = Property("state")
    description = Property("description")
    work_in_progress = Property("work_in_progress")
    merge_when_pipeline_succeeds = Property("merge_when_pipeline_succeeds")
    force_remove_source_branch = Property("force_remove_source_branch")
    should_remove_source_branch = Property("should_remove_source_branch")
    merge_status = Property("merge_status")
    sha = Property('sha')
    merge_commit_sha = Property('merge_commit_sha')
    reference = Property('reference')
    squash = Property('squash')
    approvals_before_merge = Property('approvals_before_merge')
    approvals_required = Property('approvals_required')
    approvals_left = Property('approvals_left')
    approved = Property('approved')
    created_at = Property("created_at")
    updated_at = Property("updated_at")
    merged_at = Property("merged_at")
    closed_at = Property("updated_at")
    target_branch = Property("target_branch")
    source_branch = Property("source_branch")
    user_notes_count = Property("user_notes_count")
    upvotes = Property("upvotes")
    downvotes = Property("downvotes")
    task_count = Property("task_count")
    task_completed = Property("task_completed")
    changes_count = Property("changes_count")
    merge_error = Property("merge_error")

    belongs_to = RelatedTo(Project)
    has_label = RelatedTo(Label)
    has_milestone = RelatedTo(Milestone)
    created_by = RelatedTo(User)
    is_assigned = RelatedTo(User)
    was_assigned = RelatedTo(User)
    closed_by = RelatedTo(User)
    merged_by = RelatedTo(User)
    is_related = RelatedTo(Issue)
    has_merge_commit = RelatedTo("Commit")
    is_latest_commit = RelatedTo("Commit")
    has_note = RelatedTo(Note)
    was_awarded_with = RelatedTo("AwardEmoji")
    approved_by = RelatedTo(User)
    has_change = RelatedTo("Change")
Exemple #6
0
class Issue(NeoGraphObject):

    __primarylabel__ = "Issue"
    __primarykey__ = "id"

    __unique_constraints__ = ["id", "iid"]

    id = Property("id")
    iid = Property("iid")
    title = Property("title")
    description = Property("description")
    state = Property("state")
    weight = Property("weight")
    merge_requests_count = Property("merge_requests_count")
    created_at = Property("created_at")
    updated_at = Property("updated_at")
    closed_at = Property("updated_at")
    confidential = Property("confidential")
    due_date = Property("due_date")
    upvotes = Property("upvotes")
    downvotes = Property("downvotes")
    has_tasks = Property("has_tasks")
    task_status = Property("task_status")
    task_count = Property("task_count")
    task_completed = Property("task_completed")

    has_label = RelatedTo(Label)
    has_milestone = RelatedTo(Milestone)
    belongs_to = RelatedTo(Project)
    created_by = RelatedTo(User)
    was_assigned = RelatedTo(User)
    is_assigned = RelatedTo(User)
    closed_by = RelatedTo(User)
    is_merge_annotated = RelatedFrom("MergeRequest", "IS_RELATED")
    has_note = RelatedTo(Note)
    was_awarded_with = RelatedTo("AwardEmoji")