import shortid from 'shortid'; import Metadata from './Metadata.mongo'; const Team = { id: { type: String, required: true, }, name: { type: String, required: true, }, }; // The stripe bot becomes a user in the slack workspace const AuthedUser = { id: { type: String, required: true, }, scope: { type: String, }, accessToken: { type: String, }, }; export default { _id: { type: String, required: true, default: shortid.generate, }, access_token: { type: String, required: true, unique: true, }, scope: { type: String, required: false, }, botId: { type: String, required: false, }, appId: { type: String, required: false, }, team: Team, meta: Metadata, authedUser: AuthedUser, };