50 lines
1.3 KiB
Go
50 lines
1.3 KiB
Go
|
|
package domain
|
||
|
|
|
||
|
|
// Business constants for the post service
|
||
|
|
const (
|
||
|
|
// DefaultPageSize is the default page size for pagination
|
||
|
|
DefaultPageSize = 20
|
||
|
|
|
||
|
|
// MaxPageSize is the maximum allowed page size
|
||
|
|
MaxPageSize = 100
|
||
|
|
|
||
|
|
// MinPageSize is the minimum allowed page size
|
||
|
|
MinPageSize = 1
|
||
|
|
|
||
|
|
// MaxPostTitleLength is the maximum length for post title
|
||
|
|
MaxPostTitleLength = 200
|
||
|
|
|
||
|
|
// MinPostTitleLength is the minimum length for post title
|
||
|
|
MinPostTitleLength = 1
|
||
|
|
|
||
|
|
// MaxPostContentLength is the maximum length for post content
|
||
|
|
MaxPostContentLength = 10000
|
||
|
|
|
||
|
|
// MinPostContentLength is the minimum length for post content
|
||
|
|
MinPostContentLength = 1
|
||
|
|
|
||
|
|
// MaxCommentLength is the maximum length for comment
|
||
|
|
MaxCommentLength = 2000
|
||
|
|
|
||
|
|
// MinCommentLength is the minimum length for comment
|
||
|
|
MinCommentLength = 1
|
||
|
|
|
||
|
|
// MaxTagNameLength is the maximum length for tag name
|
||
|
|
MaxTagNameLength = 50
|
||
|
|
|
||
|
|
// MinTagNameLength is the minimum length for tag name
|
||
|
|
MinTagNameLength = 1
|
||
|
|
|
||
|
|
// MaxTagsPerPost is the maximum number of tags per post
|
||
|
|
MaxTagsPerPost = 10
|
||
|
|
|
||
|
|
// DefaultCacheExpiration is the default cache expiration time in seconds
|
||
|
|
DefaultCacheExpiration = 3600
|
||
|
|
|
||
|
|
// MaxRetryAttempts is the maximum number of retry attempts for operations
|
||
|
|
MaxRetryAttempts = 3
|
||
|
|
|
||
|
|
// DefaultLikeCacheExpiration is the default cache expiration for like counts
|
||
|
|
DefaultLikeCacheExpiration = 300 // 5 minutes
|
||
|
|
)
|