Initialized Project with default middlewares and helpers, connected to Atlas Instance and created Swagger Setup. Created necessary DB models and authentication-authorization logic
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { model, Schema, Types } from "mongoose";
|
||||
|
||||
const schema = new Schema({
|
||||
mobile: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
address: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
city: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
state: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
pincode: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
isActive: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
user: {
|
||||
type: Types.ObjectId,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
export default model("profile", schema);
|
||||
Reference in New Issue
Block a user