Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions protos/ActionTag.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
syntax = "proto3";

package strategic_action_tracker;

message ActionTag {
// The primary key for the table
int32 action_tag_id = 1;

// The foreign key of the action
int32 action_id = 2;

// The foreign key of the tag
int32 tag_id = 3;
}
19 changes: 19 additions & 0 deletions protos/AuditEntry.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
syntax = "proto3";

package strategic_action_tracker;

import "google/protobuf/timestamp.proto";

message AuditEntry {
// The date the entry is created
google.protobuf.Timestamp date_created = 1;

// The username of the user who created it
string created_by = 2;

// The date the entry was last modified
google.protobuf.Timestamp date_modified = 3;

// The username of the user who modified it
string modified_by = 4;
}
25 changes: 25 additions & 0 deletions protos/GoalAction.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";

package strategic_action_tracker;

import "protos/AuditEntry.proto";

message GoalAction {
// An integer primary key value
int32 id = 1;

// The foreign key relating this to the goal
int32 goal_key = 2;

// The description of the action required to be taken
string action_description = 3;

// The user name of the person the action is assigned to
string action_assigned_to = 4;

// The status of the action. Can be "Not Started", "In Progress", "Waiting for Reply", "Completed"
string action_status = 5;

// The audit entry values
AuditEntry audit_entry = 6;
}
23 changes: 23 additions & 0 deletions protos/GoalEvent.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
syntax = "proto3";

package strategic_action_tracker;

import "google/protobuf/timestamp.proto";
import "protos/AuditEntry.proto";

message GoalEvent {
// An integer primary key value
int32 id = 1;

// The foreign key relating this to the goal
int32 goal_key = 2;

// The date of the event being tracked
google.protobuf.Timestamp event_date = 3;

// The description of the event that took place
string description = 4;

// The audit entry details for this record
AuditEntry audit_entry = 5;
}
19 changes: 19 additions & 0 deletions protos/GoalNote.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
syntax = "proto3";

package strategic_action_tracker;

import "protos/AuditEntry.proto";

message GoalNote {
// An integer primary key value
int32 id = 1;

// The foreign key relating this to the goal
int32 goal_key = 2;

// The notes associated with this item
string note_text = 3;

// The audit entry values for the record
AuditEntry audit_entry = 4;
}
25 changes: 25 additions & 0 deletions protos/GoalReference.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";

package strategic_action_tracker;

import "protos/AuditEntry.proto";

message GoalReference {
// An integer primary key value
int32 id = 1;

// The foreign key relating this to the goal
int32 goal_key = 2;

// The name of the resource
string name = 3;

// The link url
string url = 4;

// The name of the DisplayType
string display_text = 5;

// The audit entry values
AuditEntry audit_entry = 6;
}
87 changes: 87 additions & 0 deletions protos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Strategic Action Tracker - Proto Models

This directory contains Protocol Buffer (protobuf) definitions for the Strategic Action Tracker application's data models.

## Proto Files

### AuditEntry.proto
Common audit tracking information used across multiple entities.
- **date_created**: Timestamp when the entry was created
- **created_by**: Username of the user who created the entry
- **date_modified**: Timestamp when the entry was last modified
- **modified_by**: Username of the user who last modified the entry

### StrategicGoal.proto
Main entity representing a strategic goal.
- **id**: Primary key (integer)
- **name**: Name of the strategic goal
- **goal_references**: Collection of GoalReference objects
- **audit_entry**: Audit tracking information

### GoalReference.proto
External references or resources associated with a strategic goal.
- **id**: Primary key (integer)
- **goal_key**: Foreign key to StrategicGoal
- **name**: Name of the resource
- **url**: Link URL to the resource
- **display_text**: Display text for the reference type
- **audit_entry**: Audit tracking information

### GoalEvent.proto
Events or milestones related to a strategic goal.
- **id**: Primary key (integer)
- **goal_key**: Foreign key to StrategicGoal
- **event_date**: Date when the event occurred
- **description**: Description of the event
- **audit_entry**: Audit tracking information

### GoalAction.proto
Action items that need to be completed for a strategic goal.
- **id**: Primary key (integer)
- **goal_key**: Foreign key to StrategicGoal
- **action_description**: Description of the required action
- **action_assigned_to**: Username of the person assigned to the action
- **action_status**: Status of the action (e.g., "Not Started", "In Progress", "Waiting for Reply", "Completed")
- **audit_entry**: Audit tracking information

### GoalNote.proto
Notes or comments associated with a strategic goal.
- **id**: Primary key (integer)
- **goal_key**: Foreign key to StrategicGoal
- **note_text**: Text content of the note
- **audit_entry**: Audit tracking information

### ActionTag.proto
Join table linking actions to tags.
- **action_tag_id**: Primary key (integer)
- **action_id**: Foreign key to GoalAction
- **tag_id**: Foreign key to Tag

### Tag.proto
Tags that can be applied to actions for categorization.
- **id**: Primary key (integer)
- **tag_name**: Display text of the tag
- **audit_entry**: Audit tracking information

## Compilation

To compile these proto files, use the protobuf compiler (`protoc`):

```bash
# Example: Generate Python code
protoc --proto_path=. --python_out=./generated protos/*.proto

# Example: Generate C# code
protoc --proto_path=. --csharp_out=./generated protos/*.proto

# Example: Generate Java code
protoc --proto_path=. --java_out=./generated protos/*.proto
```

## Notes

- All proto files use `proto3` syntax
- Date/time fields use `google.protobuf.Timestamp` for consistency
- Foreign key relationships are represented using `int32` fields with `_key` suffix
- The `repeated` keyword is used for one-to-many relationships (e.g., `goal_references`)
- All files are in the `strategic_action_tracker` package namespace
20 changes: 20 additions & 0 deletions protos/StrategicGoal.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
syntax = "proto3";

package strategic_action_tracker;

import "protos/AuditEntry.proto";
import "protos/GoalReference.proto";

message StrategicGoal {
// An integer primary key value
int32 id = 1;

// The name of the strategic goal for tracking
string name = 2;

// The goal reference objects attached to this strategic goal
repeated GoalReference goal_references = 3;

// The audit entry values
AuditEntry audit_entry = 4;
}
16 changes: 16 additions & 0 deletions protos/Tag.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

package strategic_action_tracker;

import "protos/AuditEntry.proto";

message Tag {
// An integer primary key value
int32 id = 1;

// The Display text of the tag
string tag_name = 2;

// The audit entry values
AuditEntry audit_entry = 3;
}