Add current time to email creation
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -48,12 +48,15 @@ func NewEmail(
|
|||||||
subject string,
|
subject string,
|
||||||
body string,
|
body string,
|
||||||
) *Email {
|
) *Email {
|
||||||
|
now := time.Now()
|
||||||
return &Email{
|
return &Email{
|
||||||
ID: gid.New(gid.NilTenant, EmailEntityType),
|
ID: gid.New(gid.NilTenant, EmailEntityType),
|
||||||
RecipientName: recipientName,
|
RecipientName: recipientName,
|
||||||
RecipientEmail: recipientEmail,
|
RecipientEmail: recipientEmail,
|
||||||
Subject: subject,
|
Subject: subject,
|
||||||
TextBody: body,
|
TextBody: body,
|
||||||
|
CreatedAt: now,
|
||||||
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user