import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';

@Entity('admin')
export class Admin {
  @PrimaryGeneratedColumn({ name: 'uid' })
  uid: number;

  @Column({ name: 'site_id', type: 'int', default: 0 })
  site_id: number;

  @Column({ name: 'username', type: 'varchar', length: 255 })
  username: string;

  @Column({ name: 'password', type: 'varchar', length: 255 })
  password: string;

  @Column({ name: 'nickname', type: 'varchar', length: 255 })
  nickname: string;

  @Column({ name: 'headimg', type: 'varchar', length: 1000 })
  headimg: string;

  @Column({ name: 'mobile', type: 'varchar', length: 20 })
  mobile: string;

  @Column({ name: 'email', type: 'varchar', length: 255 })
  email: string;

  @Column({ name: 'status', type: 'tinyint', default: 1 })
  status: number;

  @Column({ name: 'last_login_time', type: 'int' })
  last_login_time: number;

  @Column({ name: 'last_login_ip', type: 'varchar', length: 255 })
  last_login_ip: string;

  @CreateDateColumn({ name: 'create_time', type: 'int' })
  create_time: number;

  @UpdateDateColumn({ name: 'update_time', type: 'int' })
  update_time: number;

  @Column({ name: 'delete_time', type: 'int', default: 0 })
  delete_time: number;
} 