diff --git a/src/entity/currencies.ts b/src/entity/currencies.ts new file mode 100644 index 0000000..44e796e --- /dev/null +++ b/src/entity/currencies.ts @@ -0,0 +1,47 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from "typeorm"; +import { Status } from "../types/status"; + +@Entity("currencies") +export class Currency { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + nullable: false, + type: "text", + }) + name: string; + + @Column({ + nullable: false, + type: "text", + }) + symbol: string; + + @Column({ + nullable: false, + length: 64, + }) + status: Status; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true, length: 256 }) + created_by: string; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; + + @Column({ nullable: true, length: 256 }) + updated_by: string; + + @Column({ nullable: true }) + @DeleteDateColumn() + deleted_at: Date; + + @Column({ nullable: true, length: 256 }) + deleted_by: string; +} diff --git a/src/schema/public.ts b/src/schema/public.ts index 34c3fe4..4dbaccf 100644 --- a/src/schema/public.ts +++ b/src/schema/public.ts @@ -9,6 +9,7 @@ export * from "../entity/district"; export * from "../entity/munisipo"; export * from "../entity/suco"; export * from "../entity/application"; +export * from "../entity/currencies"; export * from "../entity/nationality"; export * from "../entity/diagnosis"; export * from "../entity/diagnostic_procedure";