package db

import "time"

// RepositoryMigrationFreeze is the legacy persistence shape for the disabled
// repository migration seal/proof capability. AGS ignores its seal state and
// proof fields, but retains Epoch as the durable join key for existing push
// recovery markers.
type RepositoryMigrationFreeze struct {
	RepositoryID uint   `gorm:"primaryKey;autoIncrement:false"`
	State        string `gorm:"size:16;not null;default:'open'"`
	Epoch        uint64 `gorm:"not null;default:1"`
	Branch       string `gorm:"size:255;not null;default:''"`
	SealNonce    string `gorm:"size:64;not null;default:''"`
	ProofNonce   string `gorm:"size:64;not null;default:''"`
	ManifestSHA  string `gorm:"size:64;not null;default:''"`
	ProofExpires *time.Time
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

func (RepositoryMigrationFreeze) TableName() string {
	return "repository_migration_freezes"
}
