+2
-17
appview/db/collaborators.go
+2
-17
appview/db/collaborators.go
···
3
3
import (
4
4
"fmt"
5
5
"strings"
6
-
"time"
7
6
8
-
"github.com/bluesky-social/indigo/atproto/syntax"
7
+
"tangled.org/core/appview/models"
9
8
)
10
9
11
-
type Collaborator struct {
12
-
// identifiers for the record
13
-
Id int64
14
-
Did syntax.DID
15
-
Rkey string
16
-
17
-
// content
18
-
SubjectDid syntax.DID
19
-
RepoAt syntax.ATURI
20
-
21
-
// meta
22
-
Created time.Time
23
-
}
24
-
25
-
func AddCollaborator(e Execer, c Collaborator) error {
10
+
func AddCollaborator(e Execer, c models.Collaborator) error {
26
11
_, err := e.Exec(
27
12
`insert into collaborators (did, rkey, subject_did, repo_at) values (?, ?, ?, ?);`,
28
13
c.Did, c.Rkey, c.SubjectDid, c.RepoAt,
+21
appview/models/collaborator.go
+21
appview/models/collaborator.go
···
1
+
package models
2
+
3
+
import (
4
+
"time"
5
+
6
+
"github.com/bluesky-social/indigo/atproto/syntax"
7
+
)
8
+
9
+
type Collaborator struct {
10
+
// identifiers for the record
11
+
Id int64
12
+
Did syntax.DID
13
+
Rkey string
14
+
15
+
// content
16
+
SubjectDid syntax.DID
17
+
RepoAt syntax.ATURI
18
+
19
+
// meta
20
+
Created time.Time
21
+
}