import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity(
    {
        name: "user"
    }
)
export default class UserEntity {

    constructor(id?: number){
        this.id = id;
    }

    @PrimaryGeneratedColumn()
    id?: number;

    @Column()
    code?: string;

    @Column()
    title?: string;

    @Column()
    username?: string;

    @Column()
    password?: string;

    @Column({name: "p_article"})
    pArticle?: number;

    @Column({name: "p_attribute"})
    pAttribute?: number;

    @Column({name: "p_category"})
    pCategory?: number;

    @Column({name: "p_credit_note_counter"})
    pCreditNoteCounter?: number;

    @Column({name: "p_customer"})
    pCustomer?: number;

    @Column({name: "p_device"})
    pDevice?: number;

    @Column({name: "p_document"})
    pDocument?: number;

    @Column({name: "p_event"})
    pEvent?: number;

    @Column({name: "p_invoice_counter"})
    pInvoiceCounter?: number;

    @Column({name: "p_movement"})
    pMovement?: number;
    
    @Column({name: "p_operator"})
    pOperator?: number;

    @Column({name: "p_payment"})
    pPayment?: number;

    @Column({name: "p_price"})
    pPrice?: number;

    @Column({name: "p_rate"})
    pRate?: number;

    @Column({name: "p_storage"})
    pStorage?: number;

    @Column({name: "p_store"})
    pStore?: number;

    @Column({name: "p_supplier"})
    pSupplier?: number;

    @Column({name: "p_tipology"})
    pTipology?: number;

    @Column({name: "p_unit_measure"})
    pUnitMeasure?: number;

    @Column({name: "p_user"})
    pUser?: number;

    @Column({name: "p_media"})
    pMedia?: number;

    @Column({name: "p_ai"})
    pAi?: number;

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

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