πͺ‘Usage & Options
You can think of the Model Structure as a File or Folder for our Database. Our Model Structure Allows Us to Create a Collection in Our SQL Table. In the Example Below, You Can Examine the Block Showin
Schema Options
Options
Type
Description
Model Options
Options
Type
Description
// Let's Transfer the Values in Our Package
const { Model, Schema, Types } = require('cherry3');
// Sample Schema Definition
const schema = Schema({
name: String,
age: Types.Number,
country: { type: String, default: '', required: false }
});
// Sample Model Definition
const model = new Model('users',schema,{ $timestamps: true, $debug: false });
// Our Database is Ready for Use π
Last updated