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

@Entity({name: "payment"})
export default class PaymentEntity {

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

    @PrimaryGeneratedColumn()
    id?: number;

    @Column()
    code?: string;

    @Column()
    title?: string;

    @Column({name: "payment_type"})
    paymentType?: string;

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

    @Column({name: "subtend"})
    subTend?: number;

    @Column({name: "available_on_pos"})
    availableOnPos?: number;

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

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

}