* @zh 构造函数 * @en Constructor * * @param name - @zh 实体名称 @en Entity name * @param id - @zh 实体唯一标识符(运行时ID)@en Unique entity identifier (runtime ID) * @param persistentId - @zh 持久化标识符(可选,用于反序列化时恢复)@en Persistent identifier (optional, for deserialization)
(name: string, id: number, persistentId?: string)
| 161 | * @param persistentId - @zh 持久化标识符(可选,用于反序列化时恢复)@en Persistent identifier (optional, for deserialization) |
| 162 | */ |
| 163 | constructor(name: string, id: number, persistentId?: string) { |
| 164 | this.name = name; |
| 165 | this.id = id; |
| 166 | this.persistentId = persistentId ?? generateGUID(); |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * @zh 获取生命周期策略 |
nothing calls this directly
no test coverage detected