141 lines
5.8 KiB
JavaScript
141 lines
5.8 KiB
JavaScript
"use strict";
|
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
};
|
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.UserVerifyModel = exports.VerifyAuditStatus = void 0;
|
|
const openapi = require("@nestjs/swagger");
|
|
const typeorm_1 = require("typeorm");
|
|
const _base_model_1 = require("./_base_model");
|
|
const swagger_1 = require("@nestjs/swagger");
|
|
const class_validator_1 = require("class-validator");
|
|
const api_optional_decorator_1 = require("../app/common/decorator/api_optional.decorator");
|
|
const user_model_1 = require("./user.model");
|
|
var VerifyAuditStatus;
|
|
(function (VerifyAuditStatus) {
|
|
VerifyAuditStatus[VerifyAuditStatus["Pending"] = 0] = "Pending";
|
|
VerifyAuditStatus[VerifyAuditStatus["Approved"] = 1] = "Approved";
|
|
VerifyAuditStatus[VerifyAuditStatus["Rejected"] = 2] = "Rejected";
|
|
})(VerifyAuditStatus || (exports.VerifyAuditStatus = VerifyAuditStatus = {}));
|
|
let UserVerifyModel = class UserVerifyModel extends _base_model_1.BaseModel {
|
|
userId;
|
|
realName;
|
|
idCardNo;
|
|
idCardFront;
|
|
idCardBack;
|
|
handHoldIdCard;
|
|
status;
|
|
rejectReason;
|
|
user;
|
|
static _OPENAPI_METADATA_FACTORY() {
|
|
return { userId: { required: true, type: () => Number }, realName: { required: true, type: () => String }, idCardNo: { required: true, type: () => String }, idCardFront: { required: true, type: () => String }, idCardBack: { required: true, type: () => String }, handHoldIdCard: { required: true, type: () => String }, status: { required: true, enum: require("./user_verify.model").VerifyAuditStatus }, rejectReason: { required: false, type: () => String }, user: { required: false, type: () => require("./user.model").UserModel } };
|
|
}
|
|
};
|
|
exports.UserVerifyModel = UserVerifyModel;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '用户 ID' }),
|
|
(0, class_validator_1.IsInt)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
(0, typeorm_1.Column)({
|
|
type: 'int',
|
|
unsigned: true,
|
|
comment: '用户 ID',
|
|
}),
|
|
__metadata("design:type", Number)
|
|
], UserVerifyModel.prototype, "userId", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '姓名' }),
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
(0, typeorm_1.Column)({
|
|
type: 'varchar',
|
|
comment: '姓名',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], UserVerifyModel.prototype, "realName", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '身份证号' }),
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
(0, typeorm_1.Column)({
|
|
type: 'varchar',
|
|
comment: '身份证号',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], UserVerifyModel.prototype, "idCardNo", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '身份证正面图片 URL' }),
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
(0, typeorm_1.Column)({
|
|
type: 'varchar',
|
|
comment: '身份证正面',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], UserVerifyModel.prototype, "idCardFront", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '身份证反面图片 URL' }),
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
(0, typeorm_1.Column)({
|
|
type: 'varchar',
|
|
comment: '身份证反面',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], UserVerifyModel.prototype, "idCardBack", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '手持身份证图片 URL' }),
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
(0, typeorm_1.Column)({
|
|
type: 'varchar',
|
|
comment: '手持身份证',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], UserVerifyModel.prototype, "handHoldIdCard", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({
|
|
description: '审核状态:0=待审核,1=审核通过,2=审核驳回',
|
|
enum: VerifyAuditStatus,
|
|
}),
|
|
(0, typeorm_1.Column)({
|
|
type: 'int',
|
|
default: VerifyAuditStatus.Pending,
|
|
comment: '审核状态:0=待审核,1=审核通过,2=审核驳回',
|
|
}),
|
|
__metadata("design:type", Number)
|
|
], UserVerifyModel.prototype, "status", void 0);
|
|
__decorate([
|
|
(0, api_optional_decorator_1.ApiOptional)({ description: '驳回原因', nullable: true }),
|
|
(0, class_validator_1.IsString)(),
|
|
(0, typeorm_1.Column)({
|
|
type: 'varchar',
|
|
comment: '驳回原因',
|
|
nullable: true,
|
|
}),
|
|
__metadata("design:type", String)
|
|
], UserVerifyModel.prototype, "rejectReason", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({
|
|
description: '用户',
|
|
type: user_model_1.UserModel,
|
|
nullable: true,
|
|
}),
|
|
(0, typeorm_1.OneToOne)(() => user_model_1.UserModel, {
|
|
createForeignKeyConstraints: false,
|
|
}),
|
|
(0, typeorm_1.JoinColumn)(),
|
|
__metadata("design:type", user_model_1.UserModel)
|
|
], UserVerifyModel.prototype, "user", void 0);
|
|
exports.UserVerifyModel = UserVerifyModel = __decorate([
|
|
(0, typeorm_1.Entity)({
|
|
comment: '实名认证',
|
|
})
|
|
], UserVerifyModel);
|
|
//# sourceMappingURL=user_verify.model.js.map
|