Deals table

The Deals table in the Shipfolio schema has 25 columns, keyed by Id, with 4 foreign keys to Conversations, Listings, Companies and SaleListings. 5 columns in DealAgreementSignatures, DealDocuments, DealEvents, DealOffers and 1 more reference it.

Columns (25)

Columns of the Deals table
ColumnTypeConstraintsDescription
Iduuidprimary key
ConversationIduuidnot null, references Conversations.Id
InvestorUserIduuidnot null
FounderUserIduuidnot null
ListingIduuidreferences Listings.Id
Titlevarchar(120)not null
Roundvarchar(50)
Termsvarchar(50)
AmountCentsbigint
Currencyvarchar(3)
Statusvarchar(50)not null
InvestorConfirmedCloseAttimestamptz
FounderConfirmedCloseAttimestamptz
ClosedAttimestamptz
WithdrawnAttimestamptz
WithdrawnByuuid
CreatedAttimestamptznot null
UpdatedAttimestamptznot null
AgreementSha256varchar(64)
AgreementTextvarchar(8000)
BuyerCompanyIduuidreferences Companies.Id
EscrowFeeSplitvarchar(50)
InspectionDaysinteger
Kindvarchar(50)not null
SaleListingIduuidreferences SaleListings.Id

Indexes (7)

  • (BuyerCompanyId) (IX_Deals_BuyerCompanyId)
  • (ConversationId, Status) (IX_Deals_ConversationId_Status)
  • (FounderUserId) (IX_Deals_FounderUserId)
  • (InvestorUserId) (IX_Deals_InvestorUserId)
  • (ListingId) (IX_Deals_ListingId)
  • (SaleListingId, Status) (IX_Deals_SaleListingId_Status)
  • (Status) (IX_Deals_Status)

Relationships