Starting to improve the project structure
This commit is contained in:
9
internal/domain/post.go
Normal file
9
internal/domain/post.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package domain
|
||||
|
||||
type Post struct {
|
||||
ID string `json:"id" gorm:"primaryKey"`
|
||||
Url string `json:"url"`
|
||||
AccountID string // Foreign key field (must match Account.AccId)
|
||||
Account Account `json:"account" gorm:"foreignKey:AccountID;references:AccId"`
|
||||
Attachments []MediaAttachment `json:"media_attachments" gorm:"foreignKey:PostID;references:ID"`
|
||||
}
|
Reference in New Issue
Block a user