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

@Entity({name: "rate"})
export default class RateEntity {

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

    @PrimaryGeneratedColumn()
    id?: number;

    @Column()
    code?: string;

    @Column()
    title?: string;

    @Column({type: "decimal"})
    value?: number;

    @Column()
    nature?: string;

    @Column()
    enforceability?: string;

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

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

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