UNPKG

techveda-lib-dynamodb

Version:

A clean DynamoDB abstraction library with schema and model for Node.js and TypeScript

22 lines (16 loc) 587 B
import { Schema } from "./src/schema/schema"; export const UserSchema = new Schema({ name: { type: String, minLength: [5, "User name should contain at least 5 letters"], default: "Anonymous" }, user_name: { type: String, }, status: { type: Boolean, default: true, }, email: { type: String, required: true }, role: { type: String, enum: ["user", "admin"], default: "user" }, device_tokens: { type: Array }, last_seen: { type: String }, is_online: { type: Boolean, default: false } }); console.log(UserSchema,"userschema")