Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publication model: created_at, updated_at #3

Open
atomotic opened this issue Apr 29, 2024 · 0 comments
Open

Publication model: created_at, updated_at #3

atomotic opened this issue Apr 29, 2024 · 0 comments

Comments

@atomotic
Copy link

atomotic commented Apr 29, 2024

I suggest adding two datetime fields to the Publication model: created_at and updated_at. These fields should not be populated via API values but only on the application side.
They can be quite useful for filtering the publications table.

type Publication struct {
gorm.Model
UUID string `json:"uuid" validate:"required,uuid4_rfc4122" gorm:"uniqueIndex"`
Title string `json:"title,omitempty"`
EncryptionKey []byte `json:"encryption_key"`
Location string `json:"location" validate:"required,url"`
ContentType string `json:"content_type"`
Size uint32 `json:"size"`
Checksum string `json:"checksum" validate:"required,base64"`
}

@atomotic atomotic changed the title Publication model: created_at, modified_at Publication model: created_at, updated_at Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant