gateway schema
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Schema, model } from "mongoose";
|
||||
|
||||
export interface IServerConfig {
|
||||
allowLogin: boolean;
|
||||
allowOAuthLogin: boolean;
|
||||
allowRegister: boolean;
|
||||
};
|
||||
|
||||
export const ServerConfig = new Schema<IServerConfig>({
|
||||
allowLogin: { type: Boolean, required: true },
|
||||
allowOAuthLogin: { type: Boolean, required: true },
|
||||
allowRegister: { type: Boolean, required: true },
|
||||
}, {
|
||||
autoIndex: false,
|
||||
capped: {
|
||||
max: 1,
|
||||
}
|
||||
})
|
||||
;
|
||||
|
||||
//단일 document로 관리
|
||||
export default model<IServerConfig>('ServerConfig', ServerConfig);
|
||||
Reference in New Issue
Block a user