07c827e9fd
[web] last infrastructure conversions GitOrigin-RevId: ad1aff9b7df0610ed0303157d9e2c8032f32c02b
20 lines
396 B
JavaScript
20 lines
396 B
JavaScript
import mongoose from '../infrastructure/Mongoose.mjs'
|
|
const { Schema } = mongoose
|
|
|
|
const Usage = new Schema({
|
|
usage: { type: Number },
|
|
periodStart: { type: Date },
|
|
})
|
|
|
|
export const UserFeatureUsageSchema = new Schema({
|
|
features: {
|
|
aiErrorAssistant: Usage,
|
|
aiWorkbench: Usage,
|
|
},
|
|
})
|
|
|
|
export const UserFeatureUsage = mongoose.model(
|
|
'UserFeatureUsage',
|
|
UserFeatureUsageSchema
|
|
)
|