...
This commit is contained in:
		
							
								
								
									
										12
									
								
								specs/models_old/core/base.v
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								specs/models_old/core/base.v
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
module core
 | 
			
		||||
 | 
			
		||||
// BaseData provides common fields for all models
 | 
			
		||||
pub struct Base {
 | 
			
		||||
pub mut:
 | 
			
		||||
	id       u32
 | 
			
		||||
	created  u64 // Unix timestamp of creation
 | 
			
		||||
	updated  u64 // Unix timestamp of last update
 | 
			
		||||
	deleted  bool
 | 
			
		||||
	version  u32
 | 
			
		||||
	comments []Comment
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										20
									
								
								specs/models_old/core/comment.v
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								specs/models_old/core/comment.v
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
module core
 | 
			
		||||
 | 
			
		||||
// Comment represents a generic comment that can be associated with any model
 | 
			
		||||
// It supports threaded conversations with parent/child relationships
 | 
			
		||||
pub struct Comment {
 | 
			
		||||
pub mut:
 | 
			
		||||
	// Unique identifier for the comment
 | 
			
		||||
	id u32 // Unique identifier for the comment @[index]
 | 
			
		||||
	// Timestamp when the comment was created
 | 
			
		||||
	created_at u64 // Timestamp when the comment was created
 | 
			
		||||
	// Timestamp when the comment was last updated
 | 
			
		||||
	updated_at u64 // Timestamp when the comment was last updated
 | 
			
		||||
	// ID of the user who posted this comment
 | 
			
		||||
	user_id u32 // ID of the user who posted this comment @[index]
 | 
			
		||||
	// The actual text content of the comment
 | 
			
		||||
	content string
 | 
			
		||||
	// Optional ID of the parent comment for threaded conversations
 | 
			
		||||
	// None indicates this is a top-level comment
 | 
			
		||||
	parent_comment_id u32
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user