AI Implementation feature(820): Project Scaffold and Platform Foundations (#1)
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { Entity, PrimaryColumn, Column, CreateDateColumn } from 'typeorm';
|
||||
|
||||
export type UserRole = 'admin' | 'player';
|
||||
export type UserStatus = 'enabled' | 'disabled';
|
||||
|
||||
@Entity('user')
|
||||
export class UserEntity {
|
||||
@PrimaryColumn('text')
|
||||
id!: string;
|
||||
|
||||
@Column('text', { unique: true })
|
||||
username!: string;
|
||||
|
||||
@Column('text', { name: 'password_hash' })
|
||||
passwordHash!: string;
|
||||
|
||||
@Column('text', { default: 'player' })
|
||||
role!: UserRole;
|
||||
|
||||
@Column('text', { default: 'enabled' })
|
||||
status!: UserStatus;
|
||||
|
||||
@CreateDateColumn({ type: 'text', name: 'created_at' })
|
||||
createdAt!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user