161 lines
6.6 KiB
JavaScript
161 lines
6.6 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.JobHuntingModel = exports.JobHuntingStatus = exports.JobHuntingType = 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");
|
|
const is_enum_mumber_string_1 = require("../app/common/decorator/is_enum_mumber_string");
|
|
var JobHuntingType;
|
|
(function (JobHuntingType) {
|
|
JobHuntingType[JobHuntingType["Organization"] = 0] = "Organization";
|
|
JobHuntingType[JobHuntingType["Publicity"] = 1] = "Publicity";
|
|
})(JobHuntingType || (exports.JobHuntingType = JobHuntingType = {}));
|
|
var JobHuntingStatus;
|
|
(function (JobHuntingStatus) {
|
|
JobHuntingStatus[JobHuntingStatus["Pending"] = 0] = "Pending";
|
|
JobHuntingStatus[JobHuntingStatus["Approved"] = 1] = "Approved";
|
|
JobHuntingStatus[JobHuntingStatus["Rejected"] = 2] = "Rejected";
|
|
})(JobHuntingStatus || (exports.JobHuntingStatus = JobHuntingStatus = {}));
|
|
let JobHuntingModel = class JobHuntingModel extends _base_model_1.BaseModel {
|
|
userId;
|
|
realName;
|
|
idCardNo;
|
|
phone;
|
|
teamCount;
|
|
dreamResume;
|
|
status;
|
|
type;
|
|
rejectReason;
|
|
user;
|
|
static _OPENAPI_METADATA_FACTORY() {
|
|
return { userId: { required: true, type: () => Number }, realName: { required: true, type: () => String }, idCardNo: { required: true, type: () => String }, phone: { required: true, type: () => String }, teamCount: { required: true, type: () => Number }, dreamResume: { required: true, type: () => String }, status: { required: true, enum: require("./job_hunting.model").JobHuntingStatus }, type: { required: true, enum: require("./job_hunting.model").JobHuntingType }, rejectReason: { required: false, type: () => String }, user: { required: false, type: () => require("./user.model").UserModel } };
|
|
}
|
|
};
|
|
exports.JobHuntingModel = JobHuntingModel;
|
|
__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)
|
|
], JobHuntingModel.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)
|
|
], JobHuntingModel.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)
|
|
], JobHuntingModel.prototype, "idCardNo", 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)
|
|
], JobHuntingModel.prototype, "phone", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '团队人数' }),
|
|
(0, class_validator_1.IsInt)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
(0, typeorm_1.Column)({
|
|
type: 'int',
|
|
comment: '团队人数',
|
|
}),
|
|
__metadata("design:type", Number)
|
|
], JobHuntingModel.prototype, "teamCount", 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)
|
|
], JobHuntingModel.prototype, "dreamResume", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({
|
|
description: '审核状态:0=待审核,1=审核通过,2=审核驳回',
|
|
enum: JobHuntingStatus,
|
|
}),
|
|
(0, typeorm_1.Column)({
|
|
type: 'int',
|
|
default: JobHuntingStatus.Pending,
|
|
comment: '审核状态:0=待审核,1=审核通过,2=审核驳回',
|
|
}),
|
|
__metadata("design:type", Number)
|
|
], JobHuntingModel.prototype, "status", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({
|
|
description: '类型:0=组织,1=宣传',
|
|
enum: JobHuntingType,
|
|
}),
|
|
(0, is_enum_mumber_string_1.IsEnumNumberString)(JobHuntingType),
|
|
(0, typeorm_1.Column)({
|
|
type: 'int',
|
|
default: JobHuntingStatus.Pending,
|
|
comment: '类型:0=组织,1=宣传',
|
|
}),
|
|
__metadata("design:type", Number)
|
|
], JobHuntingModel.prototype, "type", 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)
|
|
], JobHuntingModel.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)
|
|
], JobHuntingModel.prototype, "user", void 0);
|
|
exports.JobHuntingModel = JobHuntingModel = __decorate([
|
|
(0, typeorm_1.Entity)({
|
|
comment: '求职申请',
|
|
})
|
|
], JobHuntingModel);
|
|
//# sourceMappingURL=job_hunting.model.js.map
|