mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	add copy constructor to LatestNote
This commit is contained in:
		
							parent
							
								
									80b3da531e
								
							
						
					
					
						commit
						a3d67b58ed
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
					@ -34,4 +34,13 @@ export class LatestNote {
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	@JoinColumn()
 | 
						@JoinColumn()
 | 
				
			||||||
	public note: MiNote | null;
 | 
						public note: MiNote | null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						constructor(data: Partial<LatestNote>) {
 | 
				
			||||||
 | 
							if (data == null) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (const [k, v] of Object.entries(data)) {
 | 
				
			||||||
 | 
								(this as any)[k] = v;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue