"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.Student = void 0;
const typeorm_1 = require("typeorm");
const Client_1 = require("./Client");
const ClassDetail_1 = require("./ClassDetail");
const TypeStudent_1 = require("./TypeStudent");
const TitleStudent_1 = require("./TitleStudent");
let Student = class Student {
    constructor() {
        this.isMainProvider = false;
        this.newsletter = false;
        this.isPrivacySecurityOfficer = false;
        this.isOSHACoordinator = false;
        this.enable = true;
    }
};
exports.Student = Student;
__decorate([
    (0, typeorm_1.PrimaryGeneratedColumn)(),
    __metadata("design:type", Number)
], Student.prototype, "id", void 0);
__decorate([
    (0, typeorm_1.Column)(),
    __metadata("design:type", String)
], Student.prototype, "firstName", void 0);
__decorate([
    (0, typeorm_1.Column)(),
    __metadata("design:type", String)
], Student.prototype, "lastName", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: null, nullable: true }),
    __metadata("design:type", String)
], Student.prototype, "suffix", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: null, nullable: true }),
    __metadata("design:type", String)
], Student.prototype, "email", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: null, nullable: true }),
    __metadata("design:type", String)
], Student.prototype, "phoneNumber", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: null, nullable: true }),
    __metadata("design:type", String)
], Student.prototype, "stateBoardLicense", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: null, nullable: true }),
    __metadata("design:type", String)
], Student.prototype, "DEA", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: false }),
    __metadata("design:type", Boolean)
], Student.prototype, "isMainProvider", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: false }),
    __metadata("design:type", Boolean)
], Student.prototype, "newsletter", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: false }),
    __metadata("design:type", Boolean)
], Student.prototype, "isPrivacySecurityOfficer", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: false }),
    __metadata("design:type", Boolean)
], Student.prototype, "isOSHACoordinator", void 0);
__decorate([
    (0, typeorm_1.Column)({ default: true }),
    __metadata("design:type", Boolean)
], Student.prototype, "enable", void 0);
__decorate([
    (0, typeorm_1.ManyToOne)(() => Client_1.Client, client => client.Students),
    __metadata("design:type", Client_1.Client)
], Student.prototype, "Client", void 0);
__decorate([
    (0, typeorm_1.ManyToMany)(() => ClassDetail_1.ClassDetail, classDetail => classDetail.Students, {
        onDelete: "CASCADE",
    }),
    (0, typeorm_1.JoinTable)(),
    __metadata("design:type", Array)
], Student.prototype, "ClassDetails", void 0);
__decorate([
    (0, typeorm_1.ManyToOne)(() => TitleStudent_1.TitleStudent, title => title.Students, { nullable: true }),
    __metadata("design:type", TitleStudent_1.TitleStudent)
], Student.prototype, "TitleStudent", void 0);
__decorate([
    (0, typeorm_1.ManyToOne)(() => TypeStudent_1.TypeStudent, type => type.Students, { nullable: true }),
    __metadata("design:type", TypeStudent_1.TypeStudent)
], Student.prototype, "TypeStudent", void 0);
exports.Student = Student = __decorate([
    (0, typeorm_1.Entity)()
], Student);
