package entity import "time" const ( RequestPending = 1 RequestAccepted = 2 RequestRejected = 3 ) const ( SourceQRCode = 1 SourceEmail = 2 SourceSparkID = 3 ) const ( ReasonMax = 128 RemarkMax = 64 ) // Request is one from→to application. Repeats update this row; they do not insert another. type Request struct { ID int64 FromUser int64 ToUser int64 Source int Reason string Remark string Status int CreatedAt time.Time UpdatedAt time.Time } func ValidSource(src int) bool { return src == SourceQRCode || src == SourceEmail || src == SourceSparkID }