mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 19:34:34 +00:00
28 lines
484 B
TypeScript
28 lines
484 B
TypeScript
import mongoose, { Schema } from 'mongoose'
|
|
|
|
export interface ClientPayload {
|
|
/**
|
|
* Client ID
|
|
* @example "someFormattedClientID1234"
|
|
*/
|
|
clientId: string
|
|
/**
|
|
* Client Secret
|
|
* @example "someRandomCryptoString"
|
|
*/
|
|
clientSecret: string
|
|
}
|
|
|
|
const ClientSchema = new Schema<ClientPayload>({
|
|
clientId: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
clientSecret: {
|
|
type: String,
|
|
required: true
|
|
}
|
|
})
|
|
|
|
export default mongoose.model('Client', ClientSchema)
|