update
This commit is contained in:
@ -1,13 +1,4 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
} from "typeorm";
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { Status } from "../../types/status";
|
||||
import { HrmsAirport } from "./hrms_airport";
|
||||
import { HrmsDepartment } from "./hrms_department";
|
||||
@ -21,7 +12,6 @@ import { Munisipo } from "../munisipo";
|
||||
|
||||
@Entity("hrms_employees", { schema: "hrms" })
|
||||
export class HrmsEmployee {
|
||||
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
|
||||
import { Status } from "../../types/status";
|
||||
import { HrmsEmployee } from "./hrms_employee";
|
||||
|
||||
@Entity("hrms_scholarships", { schema: "hrms" })
|
||||
export class HrmsScholarship {
|
||||
|
||||
@ -1,39 +1,37 @@
|
||||
import bcrypt from 'bcryptjs';
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn, ManyToOne, OneToMany, ManyToMany, JoinTable } from 'typeorm';
|
||||
import bcrypt from "bcryptjs";
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn, ManyToOne, OneToMany, ManyToMany, JoinTable } from "typeorm";
|
||||
|
||||
import { Status } from '../types/status';
|
||||
import { UserRole } from './users_roles';
|
||||
import { Status } from "../types/status";
|
||||
import { UserRole } from "./users_roles";
|
||||
import { HrmsEmployee } from "./hrms/hrms_employee";
|
||||
|
||||
@Entity('users')
|
||||
@Entity("users")
|
||||
export class User {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: true,
|
||||
length: 64
|
||||
length: 64,
|
||||
})
|
||||
email: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
unique: false,
|
||||
length: 64
|
||||
})
|
||||
employee_id: string;
|
||||
@ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true })
|
||||
@JoinTable()
|
||||
employee: HrmsEmployee;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64,
|
||||
select: false
|
||||
select: false,
|
||||
})
|
||||
password: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: true,
|
||||
length: 64
|
||||
length: 64,
|
||||
})
|
||||
username: string;
|
||||
|
||||
@ -44,21 +42,21 @@ export class User {
|
||||
})
|
||||
name: string;
|
||||
|
||||
@ManyToMany(() => UserRole, { onDelete: 'CASCADE' })
|
||||
@ManyToMany(() => UserRole, { onDelete: "CASCADE" })
|
||||
@JoinTable()
|
||||
roles: UserRole[]
|
||||
roles: UserRole[];
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: 'uuid',
|
||||
select: false
|
||||
type: "uuid",
|
||||
select: false,
|
||||
})
|
||||
reset_token: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64
|
||||
length: 64,
|
||||
})
|
||||
status: Status;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user