Schema Model - new Version Added
This commit is contained in:
37
src/shared/V1Models/Builder/wallItemsModel.ts
Normal file
37
src/shared/V1Models/Builder/wallItemsModel.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { Document, Schema } from "mongoose";
|
||||
import MainModel from "../../connect/mongoose.ts";
|
||||
import { User } from "../Auth/userAuthModel.ts";
|
||||
import { Project } from "../Project/project-model.ts";
|
||||
import { Version } from "../Version/versionModel.ts";
|
||||
export interface WallItems extends Document {
|
||||
userId: User["_id"];
|
||||
projectId: Project["_id"];
|
||||
versionId: Version["_id"];
|
||||
modelUuid: string;
|
||||
modelName: string;
|
||||
type: string;
|
||||
csgposition: [];
|
||||
csgscale: [];
|
||||
position: [];
|
||||
quaternion: [];
|
||||
scale: [];
|
||||
}
|
||||
|
||||
const wallItemsSchema: Schema = new Schema({
|
||||
userId: { type: Schema.Types.ObjectId, ref: "User" },
|
||||
projectId: { type: Schema.Types.ObjectId, ref: "Project" },
|
||||
versionId: { type: Schema.Types.ObjectId, ref: "Version" },
|
||||
modelUuid: { type: String, unique: true },
|
||||
modelName: { type: String },
|
||||
type: { type: String },
|
||||
csgposition: { type: Array },
|
||||
csgscale: { type: Array },
|
||||
position: { type: Array },
|
||||
quaternion: { type: Array },
|
||||
scale: { type: Array },
|
||||
});
|
||||
|
||||
const wallItemModel = (db: string) => {
|
||||
return MainModel(db, "wallitems", wallItemsSchema, "wallitems");
|
||||
};
|
||||
export default wallItemModel;
|
||||
Reference in New Issue
Block a user