You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tryFullStack/backend/dist/users/user.entity.js

52 lines
2.4 KiB

3 weeks ago
"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.User = void 0;
2 weeks ago
const openapi = require("@nestjs/swagger");
3 weeks ago
const timestamped_entity_1 = require("../common/entities/timestamped.entity");
1 week ago
const profile_entity_1 = require("../profiles/profile.entity");
3 weeks ago
const typeorm_1 = require("typeorm");
let User = class User extends timestamped_entity_1.TimestampedEntity {
id;
name;
email;
password;
1 week ago
profile;
2 weeks ago
static _OPENAPI_METADATA_FACTORY() {
1 week ago
return { id: { required: true, type: () => Number }, name: { required: true, type: () => String }, email: { required: false, type: () => String }, password: { required: true, type: () => String }, profile: { required: true, type: () => require("../profiles/profile.entity").Profile } };
2 weeks ago
}
3 weeks ago
};
exports.User = User;
__decorate([
(0, typeorm_1.PrimaryGeneratedColumn)(),
__metadata("design:type", Number)
], User.prototype, "id", void 0);
__decorate([
(0, typeorm_1.Column)({ unique: true }),
__metadata("design:type", String)
], User.prototype, "name", void 0);
__decorate([
(0, typeorm_1.Column)({ unique: true, nullable: true }),
__metadata("design:type", String)
], User.prototype, "email", void 0);
__decorate([
(0, typeorm_1.Column)(),
__metadata("design:type", String)
], User.prototype, "password", void 0);
1 week ago
__decorate([
(0, typeorm_1.OneToOne)(() => profile_entity_1.Profile, (profile) => profile.user, { cascade: true }),
(0, typeorm_1.JoinColumn)(),
__metadata("design:type", profile_entity_1.Profile)
], User.prototype, "profile", void 0);
3 weeks ago
exports.User = User = __decorate([
(0, typeorm_1.Entity)()
], User);
//# sourceMappingURL=user.entity.js.map