134 lines
5.0 KiB
JavaScript
134 lines
5.0 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.WalletModel = void 0;
|
|
const openapi = require("@nestjs/swagger");
|
|
const typeorm_1 = require("typeorm");
|
|
const _base_model_1 = require("./_base_model");
|
|
const user_model_1 = require("./user.model");
|
|
const swagger_1 = require("@nestjs/swagger");
|
|
let WalletModel = class WalletModel extends _base_model_1.BaseModel {
|
|
balance;
|
|
frozenBalance;
|
|
publicityFund;
|
|
userId;
|
|
user;
|
|
financialProductEarnings;
|
|
financialProductEarningsTime;
|
|
totalRecharge;
|
|
totalWithdraw;
|
|
static _OPENAPI_METADATA_FACTORY() {
|
|
return { balance: { required: true, type: () => String }, frozenBalance: { required: true, type: () => String }, publicityFund: { required: true, type: () => String }, userId: { required: true, type: () => Number }, user: { required: false, type: () => require("./user.model").UserModel }, financialProductEarnings: { required: true, type: () => String }, financialProductEarningsTime: { required: true, type: () => String }, totalRecharge: { required: true, type: () => String }, totalWithdraw: { required: true, type: () => String } };
|
|
}
|
|
};
|
|
exports.WalletModel = WalletModel;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '余额' }),
|
|
(0, typeorm_1.Column)({
|
|
type: 'decimal',
|
|
precision: 20,
|
|
scale: 6,
|
|
default: 0,
|
|
comment: '余额',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], WalletModel.prototype, "balance", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '冻结金额' }),
|
|
(0, typeorm_1.Column)({
|
|
type: 'decimal',
|
|
precision: 20,
|
|
scale: 6,
|
|
default: 0,
|
|
comment: '冻结金额',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], WalletModel.prototype, "frozenBalance", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '宣传金余额' }),
|
|
(0, typeorm_1.Column)({
|
|
type: 'decimal',
|
|
precision: 20,
|
|
scale: 6,
|
|
default: 0,
|
|
comment: '宣传金余额',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], WalletModel.prototype, "publicityFund", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '用户ID' }),
|
|
(0, typeorm_1.Column)({
|
|
type: 'int',
|
|
unsigned: true,
|
|
comment: '用户ID',
|
|
}),
|
|
__metadata("design:type", Number)
|
|
], WalletModel.prototype, "userId", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({
|
|
description: '用户',
|
|
type: user_model_1.UserModel,
|
|
nullable: true,
|
|
}),
|
|
(0, typeorm_1.OneToOne)(() => user_model_1.UserModel, (user) => user.wallet, {
|
|
createForeignKeyConstraints: false,
|
|
}),
|
|
(0, typeorm_1.JoinColumn)(),
|
|
__metadata("design:type", user_model_1.UserModel)
|
|
], WalletModel.prototype, "user", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '理财产品累积收益' }),
|
|
(0, typeorm_1.Column)({
|
|
type: 'decimal',
|
|
precision: 20,
|
|
scale: 6,
|
|
default: 0,
|
|
comment: '理财产品累积收益',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], WalletModel.prototype, "financialProductEarnings", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '理财产品累积收益更新时间' }),
|
|
(0, typeorm_1.Column)({
|
|
type: 'datetime',
|
|
default: () => 'CURRENT_TIMESTAMP',
|
|
comment: '理财产品累积收益更新时间',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], WalletModel.prototype, "financialProductEarningsTime", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '累计充值金额' }),
|
|
(0, typeorm_1.Column)({
|
|
type: 'decimal',
|
|
precision: 20,
|
|
scale: 6,
|
|
default: 0,
|
|
comment: '累计充值金额',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], WalletModel.prototype, "totalRecharge", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '累计提现金额' }),
|
|
(0, typeorm_1.Column)({
|
|
type: 'decimal',
|
|
precision: 20,
|
|
scale: 6,
|
|
default: 0,
|
|
comment: '累计提现金额',
|
|
}),
|
|
__metadata("design:type", String)
|
|
], WalletModel.prototype, "totalWithdraw", void 0);
|
|
exports.WalletModel = WalletModel = __decorate([
|
|
(0, typeorm_1.Entity)({
|
|
comment: '钱包',
|
|
})
|
|
], WalletModel);
|
|
//# sourceMappingURL=wallet.model.js.map
|