forked from krasnopv/das
/
profile.go
109 lines (89 loc) · 2.82 KB
/
profile.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
package businesslogic
import "time"
// AthleteProfile specifies the data that is contained in an AthleteProfile
type AthleteProfile struct {
UID string
FirstName string
LastName string
}
type SearchAthleteProfileCriteria struct {
FirstName string
LastName string
}
type IAthleteProfileRepository interface {
SearchProfile(criteria SearchAthleteProfileCriteria) ([]AthleteProfile, error)
}
type AdjudicatorProfile struct {
ID int
CreateUserID int
DateTimeCreated time.Time
UpdateUserID int
DateTimeUpdated time.Time
}
type SearchAdjudicatorProfileCriteria struct{}
type IAdjudicatorProfileRepository interface {
CreateProfile(profile *AdjudicatorProfile) error
UpdateProfile(profile AdjudicatorProfile) error
SearchProfile(criteria SearchAdjudicatorProfileCriteria) ([]AdjudicatorProfile, error)
}
type OrganizerProfile struct {
ID int
CreateUserID int
DateTimeCreated time.Time
UpdateUserID int
DateTimeUpdated time.Time
}
type SearchOrganizerProfileCriteria struct{}
type IOrganizerProfileRepository interface {
CreateProfile(profile *OrganizerProfile) error
UpdateProfile(profile OrganizerProfile) error
SearchProfile(criteria SearchOrganizerProfileCriteria) ([]OrganizerProfile, error)
}
type ScrutineerProfile struct {
ID int
CreateUserID int
DateTimeCreated time.Time
UpdateUserID int
DateTimeUpdated time.Time
}
type SearchScrutineerProfileCriteria struct{}
type IScrutineerProfileRepository interface {
CreateProfile(profile *ScrutineerProfile) error
UpdateProfile(profile ScrutineerProfile) error
SearchProfile(criteria SearchScrutineerProfileCriteria) ([]ScrutineerProfile, error)
}
type DeckCaptainProfile struct {
ID int
CreateUserID int
DateTimeCreated time.Time
UpdateUserID int
DateTimeUpdated time.Time
}
type SearchDeckCaptainProfileCriteria struct{}
type IDeckCaptainProfileRepository interface {
CreateProfile(profile *DeckCaptainProfile) error
UpdateProfile(profile DeckCaptainProfile) error
SearchProfile(criteria SearchDeckCaptainProfileCriteria) ([]DeckCaptainProfile, error)
}
type EmceeProfile struct {
ID int
CreateUserID int
DateTimeCreated time.Time
UpdateUserID int
DateTimeUpdated time.Time
}
type SearchEmceeProfileCriteria struct{}
type IEmceeProfileRepository interface {
CreateProfile(profile *EmceeProfile) error
UpdateProfile(profile EmceeProfile) error
SearchProfile(criteria SearchEmceeProfileCriteria) ([]EmceeProfile, error)
}
// AdministratorProfile stores the user profile and preference as an Administrator role. Administrator profile should
// not be created through web services but through direct database insertion.
type AdministratorProfile struct {
ID int
CreateUserID int
DateTimeCreated time.Time
UpdateUserID int
DateTimeUpdated time.Time
}