m
This commit is contained in:
+97
@@ -0,0 +1,97 @@
|
||||
"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.UserSignInTaskModel = 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 financial_product_model_1 = require("./financial_product.model");
|
||||
let UserSignInTaskModel = class UserSignInTaskModel extends _base_model_1.BaseModel {
|
||||
title;
|
||||
subtitle;
|
||||
requiredDays;
|
||||
icon;
|
||||
financialProductId;
|
||||
financialProduct;
|
||||
static _OPENAPI_METADATA_FACTORY() {
|
||||
return { title: { required: true, type: () => String }, subtitle: { required: true, type: () => String }, requiredDays: { required: true, type: () => Number }, icon: { required: true, type: () => String }, financialProductId: { required: true, type: () => Number }, financialProduct: { required: false, type: () => require("./financial_product.model").FinancialProductModel } };
|
||||
}
|
||||
};
|
||||
exports.UserSignInTaskModel = UserSignInTaskModel;
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ description: '任务标题' }),
|
||||
(0, class_validator_1.IsString)(),
|
||||
(0, typeorm_1.Column)({
|
||||
type: 'varchar',
|
||||
length: 100,
|
||||
comment: '任务标题',
|
||||
}),
|
||||
__metadata("design:type", String)
|
||||
], UserSignInTaskModel.prototype, "title", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ description: '任务子标题' }),
|
||||
(0, class_validator_1.IsString)(),
|
||||
(0, typeorm_1.Column)({
|
||||
type: 'varchar',
|
||||
length: 200,
|
||||
comment: '任务子标题',
|
||||
}),
|
||||
__metadata("design:type", String)
|
||||
], UserSignInTaskModel.prototype, "subtitle", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ description: '需要签到天数' }),
|
||||
(0, class_validator_1.IsInt)(),
|
||||
(0, typeorm_1.Column)({
|
||||
type: 'int',
|
||||
default: 7,
|
||||
comment: '需要签到天数',
|
||||
}),
|
||||
__metadata("design:type", Number)
|
||||
], UserSignInTaskModel.prototype, "requiredDays", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ description: '图标' }),
|
||||
(0, class_validator_1.IsString)(),
|
||||
(0, typeorm_1.Column)({
|
||||
type: 'varchar',
|
||||
length: 200,
|
||||
comment: '图标',
|
||||
}),
|
||||
__metadata("design:type", String)
|
||||
], UserSignInTaskModel.prototype, "icon", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ description: '任务奖励的理财产品 ID' }),
|
||||
(0, class_validator_1.IsInt)(),
|
||||
(0, typeorm_1.Column)({
|
||||
type: 'int',
|
||||
comment: '任务奖励的理财产品 ID',
|
||||
}),
|
||||
__metadata("design:type", Number)
|
||||
], UserSignInTaskModel.prototype, "financialProductId", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiPropertyOptional)({
|
||||
description: '用户',
|
||||
type: financial_product_model_1.FinancialProductModel,
|
||||
nullable: true,
|
||||
}),
|
||||
(0, typeorm_1.OneToOne)(() => financial_product_model_1.FinancialProductModel, {
|
||||
createForeignKeyConstraints: false,
|
||||
}),
|
||||
(0, typeorm_1.JoinColumn)(),
|
||||
__metadata("design:type", financial_product_model_1.FinancialProductModel)
|
||||
], UserSignInTaskModel.prototype, "financialProduct", void 0);
|
||||
exports.UserSignInTaskModel = UserSignInTaskModel = __decorate([
|
||||
(0, typeorm_1.Entity)({
|
||||
comment: '签到任务',
|
||||
})
|
||||
], UserSignInTaskModel);
|
||||
//# sourceMappingURL=user_sign_in_task.model.js.map
|
||||
Reference in New Issue
Block a user