-
Notifications
You must be signed in to change notification settings - Fork 2
/
certificate_provider.go
53 lines (45 loc) · 1.86 KB
/
certificate_provider.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
package actor
import (
"fmt"
"github.com/ministryofjustice/opg-modernising-lpa/internal/actor/actoruid"
"github.com/ministryofjustice/opg-modernising-lpa/internal/place"
)
//go:generate enumerator -type CertificateProviderRelationship -linecomment -empty
type CertificateProviderRelationship uint8
const (
Personally CertificateProviderRelationship = iota + 1 // personally
Professionally // professionally
)
//go:generate enumerator -type CertificateProviderRelationshipLength -linecomment
type CertificateProviderRelationshipLength uint8
const (
RelationshipLengthUnknown CertificateProviderRelationshipLength = iota // unknown
LessThanTwoYears // lt-2-years
GreaterThanEqualToTwoYears // gte-2-years
)
// CertificateProvider contains details about the certificate provider, provided by the applicant
type CertificateProvider struct {
// UID for the actor
UID actoruid.UID
// First names of the certificate provider
FirstNames string
// Last name of the certificate provider
LastName string
// Address of the certificate provider
Address place.Address
// Mobile number of the certificate provider, used to send witness codes
Mobile string
// HasNonUKMobile indicates whether the value of Mobile is a non-UK mobile number
HasNonUKMobile bool
// Email of the certificate provider
Email string
// How the certificate provider wants to perform their role (paper or online)
CarryOutBy Channel
// The certificate provider's relationship to the applicant
Relationship CertificateProviderRelationship
// Amount of time Relationship has been in place if Personally
RelationshipLength CertificateProviderRelationshipLength
}
func (c CertificateProvider) FullName() string {
return fmt.Sprintf("%s %s", c.FirstNames, c.LastName)
}