-
Notifications
You must be signed in to change notification settings - Fork 0
/
assets.go
133 lines (121 loc) · 5.36 KB
/
assets.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
package main
// Response - Object to store Response Status and Message
// ================================================================================
type Response struct {
Status string `json:"status"`
Message string `json:"message"`
}
/////////////////////////////////////////////////////
// RoyaltyStatementCreation event name
/////////////////////////////////////////////////////
const EventRoyaltyStatementCreation string = "RoyaltyStatementCreation"
/////////////////////////////////////////////////////
// Constant for table names
/////////////////////////////////////////////////////
const (
EXPLOITATIONREPORT string = "EXPLOITATIONREPORT"
OWNERADMINISTRATION string = "OWNERADMINISTRATION"
ADMINISTRATORAFFILIATION string = "ADMINISTRATORAFFILIATION"
COPYRIGHTDATAREPORT string = "COPYRIGHTDATAREPORT"
ROYALTYSTATEMENT string = "ROYALTYSTATEMENT"
COLLECTIONRIGHTREPORT string = "COLLECTIONRIGHTREPORT" //change this to collectionRight
IPIORGMAP string = "IPIORGMAP"
)
/////////////////////////////////////////////////////
// Constant for the Exploitation Report State field values
/////////////////////////////////////////////////////
const (
INITIAL string = "INITIAL"
UNKNOWN_RIGHT_HOLDER string = "UNKNOWN_RIGHT_HOLDER"
INCONSISTENT_COPYRIGHT_SPLIT string = "INCONSISTENT_COPYRIGHT_SPLIT"
INCOMPLETE_COPYRIGHT_SPLIT string = "INCOMPLETE_COPYRIGHT_SPLIT"
UNKNOWN string = "UNKNOWN"
MISSING_COPYRIGHT_HOLDER string = "MISSING_COPYRIGHT_HOLDER"
MISSING_REPRESENTATIVE string = "MISSING_REPRESENTATIVE"
MISSING_AFFILIATE string = "MISSING_AFFILIATE"
UNKOWN_ISRC string = "UNKOWN_ISRC"
)
/////////////////////////////////////////////////////
// Constant for the Royalty Report Right Type
/////////////////////////////////////////////////////
const (
OWNERSHIP string = "OWNERSHIP"
COLLECTION string = "COLLECTION"
)
//ExploitationReport : struct defining data model for Exploitation Reports
type ExploitationReport struct {
DocType string `json:"docType"`
Source string `json:"source"`
SongTitle string `json:"songTitle"`
WriterName string `json:"writerName"`
Isrc string `json:"isrc"`
Units int `json:"units"`
ExploitationDate string `json:"exploitationDate"`
Amount float64 `json:"amount"`
UsageType string `json:"usageType"`
ExploitationReportUUID string `json:"exploitationReportUUID"`
Territory string `json:"territory"`
State string `json:"state"`
}
//RoyaltyStatement : struct defining data model for Royalty Reports
type RoyaltyStatement struct {
DocType string `json:"docType"`
RoyaltyStatementUUID string `json:"royaltyStatementUUID"`
ExploitationReportUUID string `json:"exploitationReportUUID"`
Source string `json:"source"`
Isrc string `json:"isrc"`
SongTitle string `json:"songTitle"`
WriterName string `json:"writerName"`
Units int `json:"units"`
ExploitationDate string `json:"exploitationDate"`
Amount float64 `json:"amount"`
RightType string `json:"rightType"`
Territory string `json:"territory"`
UsageType string `json:"usageType"`
RightHolder string `json:"rightHolder"`
Administrator string `json:"administrator"`
Collector string `json:"collector"`
State string `json:"state"`
CollectionRight float64 `json:"collectionRight,omitempty"`
CollectionRightPercent float64 `json:"collectionRightPercent,omitempty"`
}
//CopyrightDataReport : struct definition
type CopyrightDataReport struct {
DocType string `json:"docType"`
CopyrightDataUUID string `json:"copyrightDataReportUUID"`
Isrc string `json:"isrc"`
SongTitle string `json:"songTitle"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
RightHolders []RightHolder `json:"rightHolders"`
}
//RightHolder : struct definition for copyright data report
type RightHolder struct {
Selector string `json:"selector"`
IPI string `json:"ipi"`
Percent float64 `json:"percent"`
}
//CollectionRights : struct definition
type CollectionRight struct {
DocType string `json:"docType"`
CollectionRightUUID string `json:"collectionRightUUID"`
From string `json:"from"`
FromName string `json:"fromName"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
RightHolders []RightHolder `json:"rightHolders"`
}
//RoyaltyStatementCreationEventPayload payload to passed as part of the event.
type RoyaltyStatementCreationEventPayload struct {
Type string `json:"type"`
TargetOrg string `json:"targetOrg"`
TargetIPI string `json:"targetIPI"`
RoyaltyStatementUUID string `json:"royaltyStatementUUID"`
IsDSP bool `json:"isDSP"`
}
//IpiOrgMap : struct defining data model for IPI-Org mapping
type IpiOrgMap struct {
DocType string `json:"docType"`
Ipi string `json:"ipi"`
Org string `json:"org"`
}