add archive
This commit is contained in:
@@ -35,6 +35,8 @@ type LetterIncoming struct {
|
||||
DueDate *time.Time `json:"due_date,omitempty"`
|
||||
Type LetterIncomingType `gorm:"not null;default:'UTAMA'" json:"type"`
|
||||
Status LetterIncomingStatus `gorm:"not null;default:'new'" json:"status"`
|
||||
IsArchived bool `gorm:"not null;default:false" json:"is_archived"`
|
||||
ArchivedAt *time.Time `json:"archived_at,omitempty"`
|
||||
CreatedBy uuid.UUID `gorm:"not null" json:"created_by"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
|
||||
|
||||
@@ -13,7 +13,7 @@ const (
|
||||
LetterOutgoingStatusPendingApproval LetterOutgoingStatus = "pending_approval"
|
||||
LetterOutgoingStatusApproved LetterOutgoingStatus = "approved"
|
||||
LetterOutgoingStatusSent LetterOutgoingStatus = "sent"
|
||||
LetterOutgoingStatusArchived LetterOutgoingStatus = "archived"
|
||||
LetterOutgoingStatusRejected LetterOutgoingStatus = "rejected"
|
||||
)
|
||||
|
||||
type LetterOutgoing struct {
|
||||
@@ -29,6 +29,8 @@ type LetterOutgoing struct {
|
||||
Status LetterOutgoingStatus `gorm:"not null;default:'draft'" json:"status"`
|
||||
ApprovalFlowID *uuid.UUID `json:"approval_flow_id,omitempty"`
|
||||
CreatedBy uuid.UUID `gorm:"not null" json:"created_by"`
|
||||
IsArchived bool `gorm:"not null;default:false" json:"is_archived"`
|
||||
ArchivedAt *time.Time `json:"archived_at,omitempty"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
|
||||
DeletedAt *time.Time `gorm:"index" json:"deleted_at,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user