|
|
@ -16,6 +16,12 @@ export class ApiKey { |
|
|
|
|
|
|
|
|
@Prop({ type: Types.ObjectId, ref: User.name }) |
|
|
@Prop({ type: Types.ObjectId, ref: User.name }) |
|
|
user: User |
|
|
user: User |
|
|
|
|
|
|
|
|
|
|
|
@Prop({ type: Number, default: 0 }) |
|
|
|
|
|
usageCount: number |
|
|
|
|
|
|
|
|
|
|
|
@Prop({ type: Date }) |
|
|
|
|
|
lastUsedAt: Date |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export const ApiKeySchema = SchemaFactory.createForClass(ApiKey) |
|
|
export const ApiKeySchema = SchemaFactory.createForClass(ApiKey) |