20 lines
608 B
Go
20 lines
608 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type SaDocumentShare struct {
|
|
ID uint `gorm:"primaryKey"`
|
|
Identity string `gorm:"type:char(36);uniqueIndex"`
|
|
DocumentID uint `gorm:"index;not null"`
|
|
DocumentIdentity string `gorm:"type:char(36);index"`
|
|
CreatedBy uint `gorm:"index;not null"`
|
|
TokenHash string `gorm:"size:64;uniqueIndex;not null"`
|
|
ExpiresAt time.Time `gorm:"index;not null"`
|
|
RevokedAt *time.Time `gorm:"index"`
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
func (SaDocumentShare) TableName() string {
|
|
return "sa_document_shares"
|
|
}
|