-
Notifications
You must be signed in to change notification settings - Fork 0
/
argument.go
44 lines (39 loc) · 1.17 KB
/
argument.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package main
import (
"fmt"
"time"
"github.com/google/uuid"
)
type Argument struct {
Key string `json:"_key"`
ID string `json:"id"`
CreatedAt time.Time `json:"start"`
Creator string `json:"creator"`
TargetClaimID *string `json:"targetClaimId,omitempty"`
TargetArgumentID *string `json:"targetArgId,omitempty"`
ClaimID string `json:"claimId"`
Title string `json:"title"`
Negation string `json:"negation"`
Question string `json:"question"`
Note string `json:"note"`
Pro bool `json:"pro"`
Relevance float32 `json:"relevance"`
Str float32 `json:"strength"`
}
func (arg Argument) ArangoID() string {
return fmt.Sprintf("arguments/%s", arg.Key)
}
func NewArgument(node DebateMapNode) Argument {
return Argument{
Key: uuid.New().String(),
ID: node.ID,
CreatedAt: node.CreatedTime(),
Creator: node.Creator,
Title: node.Current.Title.Base,
Negation: node.Current.Title.Negation,
Question: node.Current.Title.Question,
Note: node.Note,
Relevance: 1.00,
Str: 0.50,
}
}