import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
import StoreEntity from "./store.entity";

@Entity({name: "document_progressive"})
export default class DocumentProgressiveEntity {

    @PrimaryGeneratedColumn()
    id?: number;
    
    @Column({name: "document_area"})
    documentArea?: string;

    @Column()
    progressive?: number;

    @JoinColumn({name: "id_store"})
    @ManyToOne(type => StoreEntity)
    store?: StoreEntity;

    @Column(
        { type: "datetime", name: "created_at" }
    )
    createdAt?: Date;

    @Column(
        { type: "datetime", name: "updated_at" }
    )
    updatedAt?: Date;

}