fork of indigo with slightly nicer lexgen
at main 1.2 kB view raw
1package models 2 3import ( 4 "time" 5) 6 7type ModerationAction struct { 8 ID uint64 `gorm:"primaryKey"` 9 Action string `gorm:"not null"` 10 SubjectType string `gorm:"not null"` 11 SubjectDid string `gorm:"not null"` 12 SubjectUri *string 13 SubjectCid *string 14 Reason string `gorm:"not null"` 15 CreatedAt time.Time `gorm:"not null"` 16 CreatedByDid string `gorm:"not null"` 17 ReversedAt *time.Time 18 ReversedByDid *string 19 ReversedReason *string 20} 21 22type ModerationActionSubjectBlobCid struct { 23 // TODO: foreign key 24 ActionId uint64 `gorm:"primaryKey"` 25 Cid string `gorm:"primaryKey"` 26} 27 28type ModerationReport struct { 29 ID uint64 `gorm:"primaryKey"` 30 SubjectType string `gorm:"not null"` 31 SubjectDid string `gorm:"not null"` 32 SubjectUri *string 33 SubjectCid *string 34 ReasonType string `gorm:"not null"` 35 Reason *string 36 ReportedByDid string `gorm:"not null"` 37 CreatedAt time.Time `gorm:"not null"` 38} 39 40type ModerationReportResolution struct { 41 // TODO: foreign key 42 ReportId uint64 `gorm:"primaryKey"` 43 // TODO: foreign key 44 ActionId uint64 `gorm:"primaryKey;index:"` 45 CreatedAt time.Time `gorm:"not null"` 46 CreatedByDid string `gorm:"not null"` 47}