introduce an authentication service and prepare user management
This commit is contained in:
44
src/auth/models/user.model.ts
Normal file
44
src/auth/models/user.model.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
||||
import { Document } from 'mongoose';
|
||||
|
||||
export type UserDocument = User & Document;
|
||||
|
||||
@Schema()
|
||||
export class User {
|
||||
@Prop({
|
||||
required: true,
|
||||
index: true,
|
||||
type: String,
|
||||
})
|
||||
vatsimId: string;
|
||||
|
||||
@Prop({
|
||||
type: String,
|
||||
})
|
||||
fullName: string;
|
||||
|
||||
@Prop({
|
||||
required: true,
|
||||
type: String,
|
||||
})
|
||||
vatsimToken: string;
|
||||
|
||||
@Prop({
|
||||
type: String,
|
||||
})
|
||||
vatsimRefreshToken: string;
|
||||
|
||||
@Prop({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
})
|
||||
administrator: boolean;
|
||||
|
||||
@Prop({
|
||||
type: [String],
|
||||
default: [],
|
||||
})
|
||||
airportConfigurationAccess: string[];
|
||||
}
|
||||
|
||||
export const UserSchema = SchemaFactory.createForClass(User);
|
||||
Reference in New Issue
Block a user