mirror of
https://github.com/diced/zipline.git
synced 2026-01-14 13:57:13 -08:00
32 lines
629 B
TypeScript
32 lines
629 B
TypeScript
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
|
|
|
@Entity({ name: 'zipline_users' })
|
|
export class User {
|
|
@PrimaryGeneratedColumn()
|
|
public id: number;
|
|
|
|
@Column('text')
|
|
public username: string;
|
|
|
|
@Column('text')
|
|
public password: string;
|
|
|
|
@Column('boolean', { default: false })
|
|
public administrator: boolean;
|
|
|
|
@Column('text')
|
|
public token: string;
|
|
|
|
public constructor(
|
|
username: string,
|
|
password: string,
|
|
token: string,
|
|
administrator = false
|
|
) {
|
|
this.username = username;
|
|
this.password = password;
|
|
this.administrator = administrator;
|
|
this.token = token;
|
|
}
|
|
}
|