This commit is contained in:
2021-06-19 17:55:58 +08:00
commit 651d24ad3b
24 changed files with 719 additions and 0 deletions

57
entity/user.ts Normal file
View File

@@ -0,0 +1,57 @@
import {Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn} from 'typeorm'
@Entity({name:'account'})
export class Account {
@PrimaryGeneratedColumn('uuid')
@Column({
type:'varchar',
length:255,
primary:true,
readonly:true,
update:false,
comment:'AdminID'
})
aid!:string
@Column({
type:'varchar',
length:255,
comment:'登录账号名'
})
readonly username!:string
@Column({
type:'varchar',
length:255,
comment:'登录密码'
})
readonly password!:string
@Column({
default:true,
comment:'是否可用'
})
readonly isActive!:boolean
@CreateDateColumn({
type:'timestamp',
comment:'账号创建时间'
})
readonly created_time!:string
@UpdateDateColumn({
type:'timestamp',
comment:'账号更新时间'
})
readonly update_time!:string
@Column({
type:'timestamp',
comment:'最后登录时间',
default:()=>'CURRENT_TIMESTAMP'
})
readonly lastlogin_time!:string
}