package models import "time" type WireGuardPeer struct { ID int64 `gorm:"primaryKey" json:"id"` Name string `gorm:"column:name;uniqueIndex" json:"name"` PeerType string `gorm:"column:peer_type" json:"peer_type"` PublicKey string `gorm:"column:public_key;uniqueIndex" json:"public_key"` PrivateKeyEnc *string `gorm:"column:private_key_enc" json:"-"` PresharedKeyEnc *string `gorm:"column:preshared_key_enc" json:"-"` AllowedIPs string `gorm:"column:allowed_ips" json:"allowed_ips"` Endpoint *string `gorm:"column:endpoint" json:"endpoint,omitempty"` ListenPort *int `gorm:"column:listen_port" json:"listen_port,omitempty"` PersistentKeepalive *int `gorm:"column:persistent_keepalive" json:"persistent_keepalive,omitempty"` LastHandshakeAt *time.Time `gorm:"column:last_handshake_at" json:"last_handshake_at,omitempty"` Active bool `gorm:"column:active" json:"active"` Notes *string `gorm:"column:notes" json:"notes,omitempty"` CreatedAt time.Time `gorm:"column:created_at" json:"created_at"` UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"` } func (WireGuardPeer) TableName() string { return "wireguard_peers" }