create-chuntianxiaozhu
Version:
春天小猪模板工具
34 lines (28 loc) • 577 B
text/typescript
import { BaseEntity } from 'api/utils/base.entity';
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
()
export class ShortUrl extends BaseEntity<ShortUrl> {
()
id: number;
()
()
uid: number;
({
length: 10,
comment: '压缩码',
name: 'short_id',
unique: true,
})
shortId: string;
({
length: 200,
comment: '原始url',
name: 'origin_url',
})
originUrl: string;
({
default: 0,
comment: '访问总数',
})
count: number;
}