diff --git a/models/fapost.js b/models/fapost.js new file mode 100644 index 000000000..398ba4a66 --- /dev/null +++ b/models/fapost.js @@ -0,0 +1,24 @@ +const mongoose = require("mongoose") + +const faPostSchema = new mongoose.Schema( + { + discord_id: { type: String, required: true }, + can_vc: { type: String, required: true }, + playstyles: { type: [String], required: true }, + activity: String, + past_experience: String, + looking_for: String, + description: String, + hidden: { type: Boolean, default: false }, + }, + { timestamps: true } +) + +faPostSchema.virtual("discord_user", { + ref: "User", + localField: "discord_id", + foreignField: "discord_id", + justOne: true, +}) + +module.exports = mongoose.model("FAPost", faPostSchema) diff --git a/models/user.js b/models/user.js index 7c4dfe311..8249bde05 100644 --- a/models/user.js +++ b/models/user.js @@ -12,6 +12,7 @@ const userSchema = new mongoose.Schema({ motion: { type: Number, min: -5, max: 5 }, }, weapons: [String], + top500: Boolean, }) module.exports = mongoose.model("User", userSchema) diff --git a/models/video.js b/models/video.js deleted file mode 100644 index f45287788..000000000 --- a/models/video.js +++ /dev/null @@ -1,19 +0,0 @@ -const mongoose = require('mongoose') - -const videoSchema = new mongoose.Schema({ - youtube_id: {type: String, required: true}, - video_title: {type: String, required: true}, - match_begin_timestamp: {type: Number, required: true}, - upload_timestamp: {type: Number, required: true}, - map: {type: String, required: true}, - mode: {type: String, required: true}, - weapon: {type: String, required: false}, - unique_id: {type: String, required: false}, - status: {type: String, required: true}, - submitter_id: {type: String, required: true}, - match_type: {type: String, required: true}, - top500: {type: Boolean, required: false}, - spec_pov: {type: Boolean, default: false, required: false} -}) - -module.exports = mongoose.model('Video', videoSchema) \ No newline at end of file diff --git a/react-ui/src/components/common/TextAreaWithLimit.js b/react-ui/src/components/common/TextAreaWithLimit.js new file mode 100644 index 000000000..1ed0d03ab --- /dev/null +++ b/react-ui/src/components/common/TextAreaWithLimit.js @@ -0,0 +1,20 @@ +import React from "react" +import { TextArea } from "semantic-ui-react" + +const TextAreaWithLimit = ({ value, setValue, limit, style = {} }) => { + return ( + <> +