初始化参股

This commit is contained in:
2026-01-27 18:06:04 +08:00
commit 2774a539bf
254 changed files with 33255 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm';
@Entity('users')
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column({ unique: true, length: 50, nullable: true })
username: string;
@Column({ unique: true, length: 100, nullable: true })
email: string;
@Column({ select: false, nullable: true })
password: string;
@Column({ length: 50, nullable: true })
realName: string;
@Column({ length: 20, nullable: true })
phone: string;
@Column({ type: 'text', nullable: true })
avatar: string;
// 微信小程序相关字段
@Column({ unique: true, length: 50, nullable: true })
openid: string; // 微信openid
@Column({ length: 100, nullable: true })
unionid: string; // 微信unionid
@Column({ type: 'text', nullable: true })
sessionKey: string; // 微信session_key
@Column({
type: 'enum',
enum: ['admin', 'customer', 'worker'],
default: 'customer'
})
role: string;
@Column({
type: 'enum',
enum: ['active', 'inactive', 'banned'],
default: 'active'
})
status: string;
@CreateDateColumn()
createdAt: Date;
@UpdateDateColumn()
updatedAt: Date;
}