feat: Added team creation, closes #22
This commit is contained in:
@@ -27,5 +27,14 @@ const whitelistSchema = new Schema({
|
||||
code: { type: String, required: true, unique: true, length: 6 }
|
||||
})
|
||||
|
||||
const teamSchema = new Schema({
|
||||
name: { type: String, required: true, minLength: 3, maxLength: 16, unique: true, match: /^[a-zA-Z0-9]+$/ },
|
||||
color: { type: String, required: true, match: /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/ },
|
||||
amount: { type: Number, required: true, default: 1 },
|
||||
textChannelId: { type: String, required: false },
|
||||
voiceChannelId: { type: String, required: false }
|
||||
})
|
||||
|
||||
export const UserModel = model<IUser>('User', userSchema)
|
||||
export const WhitelistModel = model<IWhitelist>('Whitelist', whitelistSchema)
|
||||
export const TeamModel = model<ITeam>('Team', teamSchema)
|
||||
|
Reference in New Issue
Block a user