Initial commit
This commit is contained in:
15
src/schemas/Group.ts
Normal file
15
src/schemas/Group.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ObjectId, Schema, model } from "mongoose"
|
||||
|
||||
interface IGroup {
|
||||
name: string;
|
||||
rooms?: number[];
|
||||
unames?: string[];
|
||||
}
|
||||
|
||||
const groupSchema = new Schema<IGroup>({
|
||||
name: {type: String, required: true},
|
||||
rooms: [Schema.Types.Number],
|
||||
unames: [Schema.Types.String]
|
||||
})
|
||||
|
||||
export default model("group", groupSchema)
|
||||
Reference in New Issue
Block a user