mongodjay
v0.0.8
Published
```typescript import { Model, Field, Index, MongoModel } from 'mongodjay'
Downloads
14
Readme
MongoDjay
import { Model, Field, Index, MongoModel } from 'mongodjay'
@Model({ collection: 'products', timestamps: true })
@Index({ price: 1 })
export default class Product extends MongoModel {
@Field({ type: String, required: true, unique: true })
title!: string
@Field({ type: Number, min: 0.01 })
price!: number
createdAt!: Date
updatedAt!: Date
}