UNPKG

py-uni

Version:

py-uni

22 lines (20 loc) 625 B
/** * 知识库对象 */ export class ContentRepository { public Id: string; // 内容库标识 public Name: string; // 名称 public Type: number; // 类型 public CreatTime: string | undefined; // 创建时间 constructor(options: { Id?: string; Name?: string; Type?: number; CreatTime?: string; } = {}) { this.Id = options.Id || ''; this.Name = options.Name || ''; this.Type = !options.Type ? 0 : Number.parseFloat(options.Type.toString()); this.CreatTime = options.CreatTime || new Date().toString(); } }