feat: replace tenants with organization management
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
} from 'typeorm';
|
||||
import { Student } from './student.entity';
|
||||
import { Room } from './room.entity';
|
||||
import { Tenant } from './tenant.entity';
|
||||
import { Organization } from './organization.entity';
|
||||
import { Bed } from './bed.entity';
|
||||
import { Locker } from './locker.entity';
|
||||
|
||||
@@ -55,15 +55,15 @@ export class Occupancy {
|
||||
@JoinColumn({ name: 'locker_id' })
|
||||
locker: Locker;
|
||||
|
||||
@Column({ name: 'rental_type', length: 10, default: 'short' })
|
||||
rentalType: string;
|
||||
@Column({ name: 'stay_type', length: 10, default: 'short' })
|
||||
stayType: string;
|
||||
|
||||
@Column({ name: 'tenant_id', type: 'integer', nullable: true })
|
||||
tenantId: number;
|
||||
@Column({ name: 'responsible_organization_id', type: 'integer', nullable: true })
|
||||
responsibleOrganizationId: number;
|
||||
|
||||
@ManyToOne(() => Tenant, { nullable: true })
|
||||
@JoinColumn({ name: 'tenant_id' })
|
||||
tenant: Tenant;
|
||||
@ManyToOne(() => Organization, { nullable: true })
|
||||
@JoinColumn({ name: 'responsible_organization_id' })
|
||||
responsibleOrganization: Organization;
|
||||
|
||||
@CreateDateColumn({ name: 'created_at' })
|
||||
createdAt: Date;
|
||||
@@ -75,5 +75,4 @@ export class Occupancy {
|
||||
@ManyToOne(() => Room, (r) => r.occupancies)
|
||||
@JoinColumn({ name: 'room_id' })
|
||||
room: Room;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user