✅ Restauração do código oficial do GPI-JWT-V3
This commit is contained in:
17
src/server/models/Organization.ts
Normal file
17
src/server/models/Organization.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import mongoose, { Schema, Document } from 'mongoose';
|
||||
|
||||
export interface IOrganization extends Document {
|
||||
externalId: string;
|
||||
name?: string;
|
||||
isBanned: boolean;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
const OrganizationSchema: Schema = new Schema({
|
||||
externalId: { type: String, required: true, unique: true, index: true },
|
||||
name: { type: String },
|
||||
isBanned: { type: Boolean, default: false },
|
||||
}, { timestamps: true });
|
||||
|
||||
export default mongoose.models.Organization || mongoose.model<IOrganization>('Organization', OrganizationSchema);
|
||||
Reference in New Issue
Block a user