Sunteți pe pagina 1din 15

//Super Admin

db.createCollection( "Super Admin", {


validator: { $jsonSchema: {
bsonType: "object",
required: [ "UserName" , "Password" ],
properties: {
UserName: {
bsonType: "string",
description: "must be a string and is required"
},
Password: {
bsonType : "string",
description: "must be a string and match the regular expression
pattern"
}
}
} }
} )

// Restaurant Master
db.createCollection( "Restaurant Master", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantName" , "RestaurantLogo", "RestaurantCode",
"ContactPersonName", "ContactPersonEmail", "Address", "Password", "AboutRestaurant"
, "IsActive", "CreatedBy", "CreatedOn" ],
properties: {
RestaurantName: {
bsonType: "string",
description: "must be a string and is required"
},
RestaurantLogo: {
bsonType : "string",
description: "must be a string and is required"
} ,
RestaurantCode: {
bsonType: "string",
description: "must be a string and is required"
},
ContactPersonName: {
bsonType : "string",
description: "must be a string and is required"
} ,
ContactPersonEmail: {
bsonType: "string",
pattern : "@mongodb\.com$",
description: "must be a string and match the regular expression
pattern"
},
Address: {
bsonType : "string",
description: "must be a string and is required"
} ,
Password: {
bsonType: "string",
description: "must be a string and is required"
},
AboutRestaurant: {
bsonType : "string",
description: "must be a string and is required"
} ,
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a string and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a string"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

//Role Permission
db.createCollection( "Role Permission", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "RoleId", "UserId", "PermissionId", "IsActive",
"CreatedBy", "CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
RoleId: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
UserId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
PermissionId: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

// Subscription Master
db.createCollection( "Subscription Master", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "SubscriptionName" , "SubscriptionDetail", "Price", "Duration",
"IsActive", "CreatedBy", "CreatedOn" ],
properties: {
SubscriptionName: {
bsonType: "string",
description: "must be a string and is required"
},
SubscriptionDetail: {
bsonType : "string",
description: "must be a string and is required"
} ,
Price: {
bsonType: "number",
description: "must be a number and is required"
},
Duration: {
bsonType : "string",
description: "must be a string and is required"
} ,
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

//Restaurant Subscription

db.createCollection( "Restaurant Subscription", {


validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "SubscriptionId", "FromDate", "ToDate",
"PaymentStatus", "PaymentDescription", "PaymentDate" , "IsActive", "CreatedBy",
"CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
SubscriptionId: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
FromDate: {
bsonType: "date",
description: "must be a date and is required"
},
ToDate: {
bsonType : "date",
description: "must be a date and is required"
} ,
PaymentStatus: {
bsonType: "string",
description: "must be a string and is required"
},
PaymentDescription: {
bsonType : "string",
description: "must be a string and is required"
} ,
PaymentDate: {
bsonType: "number",
description: "must be a number and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

// Restaurant Subscription History


db.createCollection( "Restaurant Subscription History", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "SubscriptionId", "FromDate", "ToDate",
"PaymentStatus", "PaymentDescription", "PaymentDate" , "IsActive", "CreatedBy",
"CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
SubscriptionId: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
FromDate: {
bsonType: "date",
description: "must be a date and is required"
},
ToDate: {
bsonType : "date",
description: "must be a date and is required"
} ,
PaymentStatus: {
bsonType: "string",
description: "must be a string and is required"
},
PaymentDescription: {
bsonType : "string",
description: "must be a string and is required"
} ,
PaymentDate: {
bsonType: "number",
description: "must be a number and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

//Roles

db.createCollection( "Roles", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "RoleName", "IsActive", "CreatedBy",
"CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
RoleName: {
bsonType : "string",
description: "must be a string and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

// Restaurant Users
db.createCollection( "Restaurant Users", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "RoleId", "FirstName" , "LastName", "UserName",
"Contact", "Address" , "Password" , "Image", "IsActive", "CreatedBy",
"CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
RoleId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
FirstName: {
bsonType : "string",
description: "must be a string and is required"
},
LastName: {
bsonType : "string",
description: "must be a string and is required"
},
UserName: {
bsonType : "string",
description: "must be a string and is required"
},
Contact: {
bsonType : "string",
description: "must be a string and is required"
},
Address: {
bsonType : "string",
description: "must be a string and is required"
},
Password: {
bsonType : "string",
description: "must be a string and is required"
},
Image: {
bsonType : "object",
description: "must be a string and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

// Restaurant Food Category


db.createCollection( "Restaurant Food Category", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "CategoryName", "IsActive", "CreatedBy",
"CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
CategoryName: {
bsonType : "string",
description: "must be a string and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )
//Restaurant Food Items

db.createCollection( "Restaurant Food Items", {


validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "ItemName" , "Price" , "Detail", "Image",
"Veg_NonVeg", "Tax", "CategoryId", "Availability", "IsActive", "CreatedBy",
"CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
ItemName: {
bsonType : "string",
description: "must be a string and is required"
},
Price: {
bsonType: "number",
description: "must be a number and is required"
},
Detail: {
bsonType : "string",
description: "must be a string and is required"
},
Image: {
bsonType: "object",
description: "must be a object and is required"
},
Veg_NonVeg: {
bsonType : "bool",
description: "must be a boolean value and is required"
},
Tax: {
bsonType: "array",
description: "must be a array and is required"
},
CategoryId: {
bsonType : "objectId",
description: "must be a objectId and is required"
},
Availability: {
bsonType : "array",
description: "must be a string and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )
//Restaurant Tax

db.createCollection( "Restaurant Tax", {


validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "TaxName" , "TaxPercentage" , "IsActive",
"CreatedBy", "CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
TaxName: {
bsonType : "string",
description: "must be a string and is required"
},
TaxPercentage: {
bsonType: "number",
description: "must be a number and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

// PremisesTypes

db.createCollection( "PremisesTypes", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "PremisesType" , "IsActive", "CreatedBy",
"CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
PremisesType: {
bsonType : "string",
description: "must be a string and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

// Restaurant Premises

db.createCollection( "Restaurant Premises", {


validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "PremisesTypeId" , "RestaurantPremisesName" ,
"Floor", "Tables", "Capacity", "TableDetails", "IsActive", "CreatedBy",
"CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
PremisesTypeId: {
bsonType : "objectId",
description: "must be a objectId and is required"
},
RestaurantPremisesName: {
bsonType : "string",
description: "must be a string and is required"
},
Floor: {
bsonType : "number",
description: "must be a number and is required"
},
Tables: {
bsonType : "number",
description: "must be a number and is required"
},
Capacity: {
bsonType : "number",
description: "must be a number and is required"
},
TableDetails: {
bsonType : "object",
description: "must be a object and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

// Restaurant Order Master


db.createCollection( "Restaurant Order Master", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "RestaurantPremisiveId" , "PAX" , "Date",
"TableId", "FloorNo", "OrderStatus", "ActualAmount", "PaymentStatus", "PaymentMode"
, "TaxId", "TotalAmount", "IsActive", "CreatedBy", "CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
RestaurantPremisiveId: {
bsonType : "objectId",
description: "must be a objectId and is required"
},
PAX: {
bsonType : "number",
description: "must be a number and is required"
},
Date: {
bsonType : "date",
description: "must be a date and is required"
},
TableId: {
bsonType : "array",
description: "must be a array and is required"
},
FloorNo: {
bsonType : "number",
description: "must be a number and is required"
},
OrderStatus: {
bsonType : "string",
description: "must be a string and is required"
},
FloorNo: {
bsonType : "number",
description: "must be a number and is required"
},
ActualAmount: {
bsonType : "number",
description: "must be a number and is required"
},
PaymentStatus: {
bsonType : "string",
description: "must be a string and is required"
},
PaymentMode: {
bsonType : "string",
description: "must be a string and is required"
},
TaxId: {
bsonType : "array",
description: "must be a array and is required"
},
TotalAmount: {
bsonType : "number",
description: "must be a number and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

// Restaurant Order Detail


db.createCollection( "Restaurant Order Detail", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "ItemName" , "TaxId" , "Status", "KOT",
"IsActive", "CreatedBy", "CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
ItemName: {
bsonType : "object",
description: "must be a object and is required"
},
TaxId: {
bsonType : "array",
description: "must be a array and is required"
},
Status: {
bsonType : "string",
description: "must be a string and is required"
},
KOT: {
bsonType : "number",
description: "must be a number and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

// Restaurant Payment Type Master


db.createCollection( "Restaurant Payment Type Master", {
validator: { $jsonSchema: {
bsonType: "object",
required: [ "RestaurantId" , "PaymentType" , "IsActive", "CreatedBy",
"CreatedOn" ],
properties: {
RestaurantId: {
bsonType: "objectId",
description: "must be a objectId and is required"
},
PaymentType: {
bsonType : "string",
description: "must be a string and is required"
},
IsActive: {
bsonType : "bool",
description: "must be a boolean value and is required"
} ,
CreatedBy: {
bsonType : "objectId",
description: "must be a objectId and is required"
} ,
CreatedOn: {
bsonType: "date",
description: "must be a Date and is required"
},
ModifiedBy: {
bsonType : "objectId",
description: "must be a objectId"
} ,
ModifiedOn: {
bsonType : "date",
description: "must be a Date"
}
}
} }
} )

S-ar putea să vă placă și