first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:52:23 +03:00
commit 880f412e2c
2662 changed files with 866266 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package tables
import "time"
// TableDistributedLock represents a distributed lock entry in the database.
// This table is used to implement distributed locking across multiple instances.
type TableDistributedLock struct {
LockKey string `gorm:"primaryKey;column:lock_key;size:255" json:"lock_key"`
HolderID string `gorm:"column:holder_id;size:255;not null" json:"holder_id"`
ExpiresAt time.Time `gorm:"column:expires_at;not null;index" json:"expires_at"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"created_at"`
}
// TableName returns the table name for the distributed lock table.
func (TableDistributedLock) TableName() string {
return "distributed_locks"
}