2026-04-15-4
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import { Entity, Column, Index } from 'typeorm';
|
||||
import { BasePlace } from './base-place.entity';
|
||||
|
||||
export enum CandidateStatus {
|
||||
PENDING = 'PENDING',
|
||||
APPROVED = 'APPROVED',
|
||||
REJECTED = 'REJECTED'
|
||||
}
|
||||
|
||||
export enum CountryCode {
|
||||
JORDAN = 'JORDAN',
|
||||
SYRIA = 'SYRIA',
|
||||
EGYPT = 'EGYPT'
|
||||
}
|
||||
|
||||
@Entity('map_candidates')
|
||||
export class MapCandidate extends BasePlace {
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: CandidateStatus,
|
||||
default: CandidateStatus.PENDING
|
||||
})
|
||||
@Index()
|
||||
status: CandidateStatus;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@Index()
|
||||
submittedBy: string; // Email or User UID
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
rejectionReason: string;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: CountryCode,
|
||||
default: CountryCode.JORDAN
|
||||
})
|
||||
@Index()
|
||||
country: CountryCode;
|
||||
|
||||
@Column({ type: 'jsonb', nullable: true })
|
||||
metadata: any; // For photos, extra contact info, etc.
|
||||
}
|
||||
Reference in New Issue
Block a user