import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { PolygonExtremes, PolygonPayload } from '../features/polygon';

@Entity('property_areas')
export class PropertyAreaEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column() property_id: number;
    @Column({ type: 'varchar', length: 16 }) purpose: string;
    @Column({ type: 'json' }) polygon: PolygonPayload;
    @Column({ type: 'json' }) extremes: PolygonExtremes;
}
