export const Session = new Entity({
name: "Session",
timestamps: true,
attributes: {
sessionID: {
partitionKey: true,
prefix: "Session|"
},
principalID: {
sortKey: true,
prefix: "Principal|"
},
expiry: {
default: () => {dayjs().add(1, "hour").unix}
},
authorizationMechanism: {
type: "string",
required: true,
},
authorizationOrigin: {
type: "string",
required: true,
}
},
table: SessionTable,
});