mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-10-31 10:14:50 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			581 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			581 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
| 
 | |
| 
 | |
| /// Single presence information
 | |
| ///
 | |
| /// @author Pierre Hubert
 | |
| 
 | |
| class Presence {
 | |
|   final int userID;
 | |
|   final int year;
 | |
|   final int month;
 | |
|   final int day;
 | |
| 
 | |
|   const Presence({
 | |
|     required this.userID,
 | |
|     required this.year,
 | |
|     required this.month,
 | |
|     required this.day,
 | |
|   })  : assert(userID != null),
 | |
|         assert(year != null),
 | |
|         assert(month != null),
 | |
|         assert(day != null);
 | |
| 
 | |
|   Presence.fromDateTime(DateTime dt, this.userID)
 | |
|       : assert(dt != null),
 | |
|         year = dt.year,
 | |
|         month = dt.month,
 | |
|         day = dt.day,
 | |
|         assert(userID != null);
 | |
| }
 |