2023-01-29 13:44:19 +08:00
|
|
|
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 授权配置
|
|
|
|
|
*/
|
|
|
|
|
@Entity('cd_access')
|
|
|
|
|
export class AccessEntity {
|
|
|
|
|
@PrimaryGeneratedColumn()
|
|
|
|
|
id: number;
|
2026-03-15 04:17:40 +08:00
|
|
|
@Column({ name: 'key_id', comment: 'key_id', length: 100 })
|
|
|
|
|
keyId: string;
|
|
|
|
|
|
2023-01-29 13:44:19 +08:00
|
|
|
@Column({ name: 'user_id', comment: '用户id' })
|
2026-03-04 23:15:48 +08:00
|
|
|
userId: number; // 0为系统级别, -1为企业,大于1为用户
|
2026-03-15 04:17:40 +08:00
|
|
|
|
2023-01-29 13:44:19 +08:00
|
|
|
@Column({ comment: '名称', length: 100 })
|
|
|
|
|
name: string;
|
|
|
|
|
|
|
|
|
|
@Column({ comment: '类型', length: 100 })
|
|
|
|
|
type: string;
|
|
|
|
|
|
2026-05-24 05:42:51 +08:00
|
|
|
@Column({ name: 'subtype', comment: '子类型', length: 100, nullable: true })
|
|
|
|
|
subtype: string;
|
|
|
|
|
|
2024-08-27 13:46:19 +08:00
|
|
|
@Column({ name: 'setting', comment: '设置', length: 10240, nullable: true })
|
2023-01-29 13:44:19 +08:00
|
|
|
setting: string;
|
|
|
|
|
|
2024-08-27 13:46:19 +08:00
|
|
|
@Column({ name: 'encrypt_setting', comment: '已加密设置', length: 10240, nullable: true })
|
|
|
|
|
encryptSetting: string;
|
|
|
|
|
|
2026-02-04 15:49:01 +08:00
|
|
|
@Column({ name: 'project_id', comment: '项目id' })
|
|
|
|
|
projectId: number;
|
|
|
|
|
|
2023-01-29 13:44:19 +08:00
|
|
|
@Column({
|
|
|
|
|
name: 'create_time',
|
|
|
|
|
comment: '创建时间',
|
|
|
|
|
default: () => 'CURRENT_TIMESTAMP',
|
|
|
|
|
})
|
|
|
|
|
createTime: Date;
|
|
|
|
|
@Column({
|
|
|
|
|
name: 'update_time',
|
|
|
|
|
comment: '修改时间',
|
|
|
|
|
default: () => 'CURRENT_TIMESTAMP',
|
|
|
|
|
})
|
|
|
|
|
updateTime: Date;
|
|
|
|
|
}
|