Module project, commit, submission
All checks were successful
Build and Release / release (push) Successful in 1m15s
All checks were successful
Build and Release / release (push) Successful in 1m15s
This commit is contained in:
17
internal/dtos/response/commit.go
Normal file
17
internal/dtos/response/commit.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CommitResponse struct {
|
||||
ID string `json:"id"`
|
||||
ProjectID string `json:"project_id"`
|
||||
SnapshotJson json.RawMessage `json:"snapshot_json"`
|
||||
SnapshotHash string `json:"snapshot_hash"`
|
||||
UserID string `json:"user_id"`
|
||||
EditSummary string `json:"edit_summary"`
|
||||
CreatedAt *time.Time `json:"created_at"`
|
||||
User *UserSimpleResponse `json:"user,omitempty"`
|
||||
}
|
||||
@@ -2,19 +2,31 @@ package response
|
||||
|
||||
import "time"
|
||||
|
||||
type ProjectResponse struct {
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
LatestRevisionID *string `json:"latest_revision_id,omitempty"`
|
||||
VersionCount int32 `json:"version_count"`
|
||||
ProjectStatus string `json:"project_status"`
|
||||
LockedBy *string `json:"locked_by,omitempty"`
|
||||
IsDeleted bool `json:"is_deleted"`
|
||||
UserID string `json:"user_id"`
|
||||
CreatedAt *time.Time `json:"created_at"`
|
||||
UpdatedAt *time.Time `json:"updated_at"`
|
||||
User *UserSimpleResponse `json:"user,omitempty"`
|
||||
CommitIds []string `json:"commit_ids"`
|
||||
SubmissionIds []string `json:"submission_ids"`
|
||||
type CommitSimpleResponse struct {
|
||||
ID string `json:"id"`
|
||||
EditSummary string `json:"edit_summary"`
|
||||
}
|
||||
|
||||
type MemberSimpleResponse struct {
|
||||
UserID string `json:"user_id"`
|
||||
Role string `json:"role"`
|
||||
DisplayName string `json:"display_name"`
|
||||
AvatarUrl string `json:"avatar_url"`
|
||||
}
|
||||
|
||||
type ProjectResponse struct {
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
LatestCommitID *string `json:"latest_commit_id,omitempty"`
|
||||
ProjectStatus string `json:"project_status"`
|
||||
LockedBy *string `json:"locked_by,omitempty"`
|
||||
IsDeleted bool `json:"is_deleted"`
|
||||
UserID string `json:"user_id"`
|
||||
CreatedAt *time.Time `json:"created_at"`
|
||||
UpdatedAt *time.Time `json:"updated_at"`
|
||||
User *UserSimpleResponse `json:"user,omitempty"`
|
||||
Commits []CommitSimpleResponse `json:"commits"`
|
||||
SubmissionIds []string `json:"submission_ids"`
|
||||
Members []MemberSimpleResponse `json:"members"`
|
||||
}
|
||||
|
||||
18
internal/dtos/response/submissionResponse.go
Normal file
18
internal/dtos/response/submissionResponse.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package response
|
||||
|
||||
import "time"
|
||||
|
||||
type SubmissionResponse struct {
|
||||
ID string `json:"id"`
|
||||
ProjectID string `json:"project_id"`
|
||||
CommitID string `json:"commit_id"`
|
||||
UserID string `json:"user_id"`
|
||||
CreatedAt *time.Time `json:"created_at"`
|
||||
Status string `json:"status"`
|
||||
ReviewedBy *string `json:"reviewed_by,omitempty"`
|
||||
ReviewedAt *time.Time `json:"reviewed_at,omitempty"`
|
||||
ReviewNote *string `json:"review_note,omitempty"`
|
||||
Content *string `json:"content,omitempty"`
|
||||
User *UserSimpleResponse `json:"user"`
|
||||
Reviewer *UserSimpleResponse `json:"reviewer,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user