import { Document, Schema, model } from 'mongoose';

export interface MemberInterface extends Document {
  userID: string,
  additional: {
    langs: ['js', 'py', 'rb', 'ts', 'rs', 'go', 'cfam', 'csharp', 'swift', 'java', 'kt', 'asm'],
    operatingSystems: ['arch', 'deb', 'cent', 'fedora', 'manjaro', 'mdarwin', 'redhat', 'ubuntu', 'win'],
    github: string,
    gitlab: string,
    bio: string,
  },
  x509?: string,
}

const Member: Schema = new Schema({
  userID: String,
  additional: {
    langs: Array,
    operatingSystems: Array,
    github: String,
    gitlab: String,
    bio: String,
  },
  x509: String,
});

export default model<MemberInterface>('Member', Member);
