| 
									
										
										
										
											2021-04-19 19:42:19 +02:00
										 |  |  | package gtsmodel | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import "time" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Block refers to the blocking of one account by another. | 
					
						
							|  |  |  | type Block struct { | 
					
						
							|  |  |  | 	// id of this block in the database | 
					
						
							| 
									
										
										
										
											2021-08-25 15:34:33 +02:00
										 |  |  | 	ID string `bun:"type:CHAR(26),pk,notnull"` | 
					
						
							| 
									
										
										
										
											2021-04-19 19:42:19 +02:00
										 |  |  | 	// When was this block created | 
					
						
							| 
									
										
										
										
											2021-08-25 15:34:33 +02:00
										 |  |  | 	CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"` | 
					
						
							| 
									
										
										
										
											2021-04-19 19:42:19 +02:00
										 |  |  | 	// When was this block updated | 
					
						
							| 
									
										
										
										
											2021-08-25 15:34:33 +02:00
										 |  |  | 	UpdatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"` | 
					
						
							| 
									
										
										
										
											2021-04-19 19:42:19 +02:00
										 |  |  | 	// Who created this block? | 
					
						
							| 
									
										
										
										
											2021-08-25 15:34:33 +02:00
										 |  |  | 	AccountID string   `bun:"type:CHAR(26),notnull"` | 
					
						
							|  |  |  | 	Account   *Account `bun:"rel:belongs-to"` | 
					
						
							| 
									
										
										
										
											2021-04-19 19:42:19 +02:00
										 |  |  | 	// Who is targeted by this block? | 
					
						
							| 
									
										
										
										
											2021-08-25 15:34:33 +02:00
										 |  |  | 	TargetAccountID string   `bun:"type:CHAR(26),notnull"` | 
					
						
							|  |  |  | 	TargetAccount   *Account `bun:"rel:belongs-to"` | 
					
						
							| 
									
										
										
										
											2021-04-19 19:42:19 +02:00
										 |  |  | 	// Activitypub URI for this block | 
					
						
							| 
									
										
										
										
											2021-08-25 15:34:33 +02:00
										 |  |  | 	URI string `bun:",notnull"` | 
					
						
							| 
									
										
										
										
											2021-04-19 19:42:19 +02:00
										 |  |  | } |