@@ -166,19 +166,19 @@ type ShareState struct {
166166// for that, we redeclare the DeletedAt as in Share. In addition, tokens must be unique.
167167type OcmShare struct {
168168 BaseModel
169- DeletedAt gorm.DeletedAt `gorm:"uniqueIndex:u_ocmshare"`
170- Token string `gorm:"size:255;not null;uniqueIndex:u_ocmshare_token"`
171- StorageId string `gorm:"size:64;not null;uniqueIndex:u_ocmshare"`
172- FileId string `gorm:"size:64;not null;uniqueIndex:u_ocmshare"`
173- Name string `gorm:"type:text;not null"`
174- ShareWith string `gorm:"size:255;not null;uniqueIndex:u_ocmshare"`
175- Owner string `gorm:"size:255;not null;uniqueIndex:u_ocmshare"`
176- Initiator string `gorm:"type:text;not null"`
177- Ctime uint64 `gorm:"not null"`
178- Mtime uint64 `gorm:"not null"`
179- Expiration sql.NullInt64 `gorm:"default:null"`
180- Type OcmShareType `gorm:"not null"`
181- Protocols []OcmShareProtocol `gorm:"constraint:OnDelete:CASCADE;"`
169+ DeletedAt gorm.DeletedAt `gorm:"uniqueIndex:u_ocmshare"`
170+ Token string `gorm:"size:255;not null;uniqueIndex:u_ocmshare_token"`
171+ StorageId string `gorm:"size:64;not null;uniqueIndex:u_ocmshare"`
172+ FileId string `gorm:"size:64;not null;uniqueIndex:u_ocmshare"`
173+ Name string `gorm:"type:text;not null"`
174+ ShareWith string `gorm:"size:255;not null;uniqueIndex:u_ocmshare"`
175+ Owner string `gorm:"size:255;not null;uniqueIndex:u_ocmshare"`
176+ Initiator string `gorm:"type:text;not null"`
177+ Ctime uint64 `gorm:"not null"`
178+ Mtime uint64 `gorm:"not null"`
179+ Expiration sql.NullInt64 `gorm:"default:null"`
180+ RecipientType OcmShareType `gorm:"not null"`
181+ Protocols []OcmShareProtocol `gorm:"constraint:OnDelete:CASCADE;"`
182182}
183183
184184// OcmShareProtocol represents the protocol used to access an OCM share, named AccessMethod in the OCM CS3 APIs.
@@ -201,7 +201,7 @@ type OcmReceivedShare struct {
201201 Ctime uint64 `gorm:"not null"`
202202 Mtime uint64 `gorm:"not null"`
203203 Expiration sql.NullInt64 `gorm:"default:null"`
204- Type OcmShareType `gorm:"index:i_ocmrecshare_type;not null"`
204+ RecipientType OcmShareType `gorm:"index:i_ocmrecshare_type;not null"`
205205 State OcmShareState `gorm:"index:i_ocmrecshare_state;not null"`
206206 Alias string `gorm:"size:64"`
207207 Hidden bool
0 commit comments