-
Notifications
You must be signed in to change notification settings - Fork 0
Bid Lifecycle
Ding YuChen edited this page Nov 4, 2020
·
4 revisions
Prefer
type BidStatus = 'submitted' | 'confirmed' | 'reviewed' | 'closed'
Since this saves the trouble of converting the string to number and back. PostgreSQL also supports native enum type over a set of strings.
export enum BidStatus {
submitted = 0,
confirmed = 1,
reviewed = 2,
closed = 3,
}
submitted -> confirmed -> reviewed
submitted -> confirmed -> reviewed
submitted -> closed