-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployee.cs
26 lines (24 loc) · 888 Bytes
/
Employee.cs
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
using Amazon.DynamoDBv2.DataModel;
using DynamoDBGenerator.Attributes;
[DynamoDBMarshaller(AccessName = "GetByEmail", ArgumentType = typeof(string))]
[DynamoDBMarshaller(
AccessName = "GetEmployee",
ArgumentType = typeof((string department, string email))
)]
[DynamoDBMarshaller(
AccessName = "Query",
ArgumentType = typeof((string Department, string EmailPrefix, DateTime MustBeLessThan))
)]
[DynamoDBMarshaller(AccessName = "Create")]
[DynamoDBMarshaller(
AccessName = "UpdateLastname",
ArgumentType = typeof((string Department, string Email, string NewLastname))
)]
public partial record Employee(
[property: DynamoDBHashKey] string Department,
[property: DynamoDBRangeKey, DynamoDBGlobalSecondaryIndexHashKey("EmailLookup")] string Email,
string LastName,
string[] Skills,
Metadata Metadata
);
public record Metadata(DateTime Timestamp);