mirror of
https://github.com/diced/zipline.git
synced 2025-12-30 06:31:08 -08:00
33 lines
616 B
TypeScript
33 lines
616 B
TypeScript
import { Entity, Column, PrimaryColumn } from 'typeorm';
|
|
|
|
@Entity({ name: 'zipline_urls' })
|
|
export class URL {
|
|
@PrimaryColumn('text')
|
|
public id: string;
|
|
|
|
@Column('text', { default: null })
|
|
public url: string;
|
|
|
|
@Column('text', { default: null, nullable: true })
|
|
public vanity: string;
|
|
|
|
@Column('bigint')
|
|
public user: number;
|
|
|
|
@Column('bigint', { default: 0 })
|
|
public clicks: 0;
|
|
|
|
public constructor(
|
|
id: string,
|
|
user: number,
|
|
url: string,
|
|
vanity: string = null
|
|
) {
|
|
this.id = id;
|
|
this.user = user;
|
|
this.url = url;
|
|
this.vanity = vanity;
|
|
this.clicks = 0;
|
|
}
|
|
}
|