feat: 完成PHP到NestJS的100%功能迁移
- 迁移25个模块,包含95个控制器和160个服务 - 新增验证码管理、登录配置、云编译等模块 - 完善认证授权、会员管理、支付系统等核心功能 - 实现完整的队列系统、配置管理、监控体系 - 确保100%功能对齐和命名一致性 - 支持生产环境部署
This commit is contained in:
45
wwjcloud/src/common/sys/entities/SysAgreement.ts
Normal file
45
wwjcloud/src/common/sys/entities/SysAgreement.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
||||
import { BaseEntity } from '../../../core/base/BaseEntity';
|
||||
|
||||
@Entity('sys_agreement')
|
||||
export class SysAgreement extends BaseEntity {
|
||||
@PrimaryGeneratedColumn({ name: 'id' })
|
||||
id: number;
|
||||
|
||||
@Column({
|
||||
name: 'agreement_key',
|
||||
type: 'varchar',
|
||||
length: 255,
|
||||
default: '',
|
||||
comment: '协议关键字',
|
||||
})
|
||||
agreement_key: string;
|
||||
|
||||
@Column({
|
||||
name: 'title',
|
||||
type: 'varchar',
|
||||
length: 255,
|
||||
default: '',
|
||||
comment: '协议标题',
|
||||
})
|
||||
title: string;
|
||||
|
||||
@Column({
|
||||
name: 'content',
|
||||
type: 'text',
|
||||
nullable: true,
|
||||
comment: '协议内容',
|
||||
})
|
||||
content: string;
|
||||
|
||||
// 获取协议类型名称
|
||||
getTypeName(): string {
|
||||
const typeMap: { [key: string]: string } = {
|
||||
privacy: '隐私政策',
|
||||
service: '服务协议',
|
||||
user: '用户协议',
|
||||
member: '会员协议',
|
||||
};
|
||||
return typeMap[this.agreement_key] || this.agreement_key;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user