| 1 | /* |
| 2 | * @Author: nevin |
| 3 | * @Date: 2022-11-16 22:04:18 |
| 4 | * @LastEditTime: 2024-11-27 13:01:10 |
| 5 | * @LastEditors: nevin |
| 6 | * @Description: realAuth RealAuth |
| 7 | */ |
| 8 | import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; |
| 9 | import { TimeTemp } from './time.tamp'; |
| 10 | |
| 11 | export enum SceneType { |
| 12 | Login = 'login', |
| 13 | UserWallet = 'userWallet', |
| 14 | Register = 'register', |
| 15 | } |
| 16 | |
| 17 | @Schema({ |
| 18 | collection: 'realAuth', |
| 19 | versionKey: false, |
| 20 | toJSON: { virtuals: true }, |
| 21 | toObject: { virtuals: true }, |
| 22 | }) |
| 23 | export class RealAuth extends TimeTemp { |
| 24 | id: string; |
| 25 | |
| 26 | @Prop({ required: true, comment: '用户ID' }) |
| 27 | userId: string; |
| 28 | |
| 29 | @Prop({ required: true, comment: '姓名' }) |
| 30 | userName: string; |
| 31 | |
| 32 | @Prop({ required: true, comment: '身份证号' }) |
| 33 | identifyNum: string; |
| 34 | |
| 35 | @Prop({ required: false, comment: '数据ID' }) |
| 36 | dataId?: string; |
| 37 | |
| 38 | @Prop({ required: false, comment: '场景类型', enum: SceneType }) |
| 39 | sceneType?: SceneType; |
| 40 | } |
| 41 | |
| 42 | export const RealAuthSchema = SchemaFactory.createForClass(RealAuth); |
| 43 |