2023-06-12 13:25:21 +02:00

18 lines
448 B
TypeScript

export default {
code: { type: 'string', primary: true },
createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() },
expiresAt: { type: 'string', isoDate: true, default: null },
generated: {
type: 'relationship',
relationship: 'GENERATED',
target: 'User',
direction: 'in',
},
redeemed: {
type: 'relationship',
relationship: 'REDEEMED',
target: 'User',
direction: 'in',
},
}