feat(public): counter table for count object row
This commit is contained in:
29
src/entity/counter.ts
Normal file
29
src/entity/counter.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from "typeorm";
|
||||
|
||||
@Entity("counter")
|
||||
export class Counter {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 128,
|
||||
unique: true,
|
||||
type: "varchar",
|
||||
})
|
||||
key: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
type: "bigint",
|
||||
})
|
||||
value: string;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user