diff --git a/api/prisma/schema.prisma b/api/prisma/schema.prisma index 51d2a99..93fef65 100644 --- a/api/prisma/schema.prisma +++ b/api/prisma/schema.prisma @@ -13,6 +13,89 @@ datasource db { provider = "postgresql" } +enum PhoneType { + DIRECT + MOBILE + HOME + COMPANY // Main company line, not direct to contact + SITE // Main site line, not direct to contact +} + +enum FaxType { + FAX // Direct fax line to contact + COMPANY // Main company fax line, not direct to contact + SITE // Main site fax line, not direct to contact +} + +// By human nature, there are only two genders. +enum GenderType { + MALE + FEMALE +} + +enum USState { + AL + AK + AZ + AR + CA + CO + CT + DE + FL + GA + HI + ID + IL + IN + IA + KS + KY + LA + ME + MD + MA + MI + MN + MS + MO + MT + NE + NV + NH + NJ + NM + NY + NC + ND + OH + OK + OR + PA + RI + SC + SD + TN + TX + UT + VT + VA + WA + WV + WI + WY +} + +enum Country { + US +} + +enum OpportunityInterest { + HOT + WARM + COLD +} + model Session { id String @id @default(uuid()) sessionKey String @unique @default(cuid()) @@ -34,16 +117,27 @@ model User { emailVerified DateTime? image String? - cwIdentifier String? + active Boolean @default(true) + hidden Boolean @default(false) + + cwIdentifier String? @unique userId String @unique token String? sessions Session[] - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - generatedQuotes GeneratedQuotes[] + companiesDeleted Company[] @relation("DeletedBy") + companiesEntered Company[] @relation("EnteredBy") + + opportunities Opportunity[] @relation("PrimarySalesRep") + opportunitiesSecondary Opportunity[] @relation("SecondarySalesRep") + + generatedQuotes GeneratedQuotes[] + companyAddresses CompanyAddress[] + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt } model Role { @@ -58,13 +152,53 @@ model Role { updatedAt DateTime @updatedAt } +model CorporateLocation { + id Int @unique + uid String @id @default(uuid()) + + name String + description String? + + updatedById String? + + addressLine1 String? + addressLine2 String? + city String? + state USState? + zipCode String? + country Country? + + inactiveFlag Boolean @default(false) // Optima Only field, not synced to CW + + opportunities Opportunity[] + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model InternalDepartment { + id Int @unique + uid String @id @default(uuid()) + + name String + description String? // Optima Only field, not synced to CW + + createdById String? + updatedById String? + + opportunities Opportunity[] + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + model UnifiSite { id String @id @default(cuid()) name String siteId String @unique - companyId String? + companyId Int? company Company? @relation(fields: [companyId], references: [id]) createdAt DateTime @default(now()) @@ -72,16 +206,104 @@ model UnifiSite { } model Company { - id String @id @default(cuid()) + id Int @unique + uid String @id @default(uuid()) name String - cw_CompanyId Int @unique - cw_Identifier String @unique + phone String? + website String? + + deleteFlag Boolean @default(false) + dateDeleted DateTime? + + taxId String? + taxExempt Boolean @default(false) // Optima Only field, not synced to CW + + enteredById String? + deletedById String? + + contacts Contact[] + companyAddresses CompanyAddress[] credentials Credential[] unifiSites UnifiSite[] opportunities Opportunity[] + deletedBy User? @relation("DeletedBy", fields: [deletedById], references: [cwIdentifier]) + enteredBy User? @relation("EnteredBy", fields: [enteredById], references: [cwIdentifier]) + + enteredAt DateTime @default(now()) + deletedAt DateTime? + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model CompanyAddress { + id Int @unique + uid String @id @default(uuid()) + + name String + description String? + + addressLine1 String? + addressLine2 String? + city String? + state USState? + zipCode String? + country Country? + + phone String? + fax String? + + inactiveFlag Boolean @default(false) + defaultFlag Boolean @default(false) + defaultMailFlag Boolean @default(false) + defaultBillFlag Boolean @default(false) + defaultShipFlag Boolean @default(false) + + updatedById String? + updatedBy User? @relation(fields: [updatedById], references: [cwIdentifier]) + + companyId Int + company Company @relation(fields: [companyId], references: [id]) + + contacts Contact[] + oppportunities Opportunity[] + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model Contact { + id Int @unique + uid String @id @default(uuid()) + + active Boolean @default(true) + default Boolean @default(false) + + firstName String + lastName String + nickname String? + + title String? + gender GenderType? + birthday DateTime? + email String? + + phone String? + phoneExtension String? + phoneType PhoneType? + + companyAddressId Int? + companyAddress CompanyAddress? @relation(fields: [companyAddressId], references: [id]) + + memberId Int? + companyId Int? + + company Company? @relation(fields: [companyId], references: [id]) + opportunities Opportunity[] + createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } @@ -125,56 +347,93 @@ model CatalogItem { updatedAt DateTime @updatedAt } +model OpportunityType { + id Int @unique + uid String @id @default(uuid()) + + name String + description String? // Optima Only field, not synced to CW + + inactiveFlag Boolean @default(false) + opportunities Opportunity[] + + updatedById String? + createdById String? + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model OpportunityStatus { + id Int @unique + uid String @id @default(uuid()) + + name String + description String? // Optima Only field, not synced to CW + + inactiveFlag Boolean @default(false) + defaultFlag Boolean @default(false) + wonFlag Boolean @default(false) + lostFlag Boolean @default(false) + closeFlag Boolean @default(false) + + updatedById String? + createdById String? + + opportunities Opportunity[] + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + model Opportunity { - id String @id @default(cuid()) - cwOpportunityId Int @unique - name String - notes String? + id Int @unique + uid String @id @default(uuid()) + + name String + notes String? generatedQuotes GeneratedQuotes[] - // Stage / status / priority / type / rating stored as JSON references - // so we don't need separate lookup tables for CW enums - typeName String? - typeCwId Int? - stageName String? - stageCwId Int? - statusName String? - statusCwId Int? - priorityName String? - priorityCwId Int? - ratingName String? - ratingCwId Int? - source String? - campaignName String? - campaignCwId Int? + typeId Int + type OpportunityType @relation(fields: [typeId], references: [id]) + + stageName String? + stageCwId Int? + + statusId Int? + status OpportunityStatus? @relation(fields: [statusId], references: [id]) + + interest OpportunityInterest? + probability Float @default(0) + + source String? // Sales rep references - primarySalesRepName String? - primarySalesRepIdentifier String? - primarySalesRepCwId Int? - secondarySalesRepName String? - secondarySalesRepIdentifier String? - secondarySalesRepCwId Int? + primarySalesRepId String? + primarySalesRep User? @relation("PrimarySalesRep", fields: [primarySalesRepId], references: [cwIdentifier]) + + secondarySalesRepId String? + secondarySalesRep User? @relation("SecondarySalesRep", fields: [secondarySalesRepId], references: [cwIdentifier]) // Company / contact / site - companyCwId Int? - companyName String? - contactCwId Int? - contactName String? - siteCwId Int? - siteName String? - customerPO String? + companyId Int? + company Company? @relation(fields: [companyId], references: [id]) - // Financials - totalSalesTax Float @default(0) - probability Float @default(0) + contactId Int? + contact Contact? @relation(fields: [contactId], references: [id]) + + siteId Int? + site CompanyAddress? @relation(fields: [siteId], references: [id]) + + customerPO String? // Location / department - locationName String? - locationCwId Int? - departmentName String? - departmentCwId Int? + locationId Int? + location CorporateLocation? @relation(fields: [locationId], references: [id]) + + departmentId Int? + department InternalDepartment? @relation(fields: [departmentId], references: [id]) // Dates expectedCloseDate DateTime? @@ -182,20 +441,12 @@ model Opportunity { dateBecameLead DateTime? closedDate DateTime? closedFlag Boolean @default(false) - closedByName String? - closedByCwId Int? - - // Internal relation to Company (optional, linked by cwCompanyId) - companyId String? - company Company? @relation(fields: [companyId], references: [id]) + closedById String? // Local product sequence — array of CW forecast item IDs in display order. // When present, fetchProducts() uses this order instead of CW sequenceNumber. productSequence Int[] @default([]) - cwLastUpdated DateTime? - cwDateEntered DateTime? - createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } @@ -242,7 +493,7 @@ model Credential { fields Json companyId String - company Company @relation(fields: [companyId], references: [id], onDelete: Cascade) + company Company @relation(fields: [companyId], references: [uid], onDelete: Cascade) securevalues SecureValue[] @@ -263,7 +514,7 @@ model GeneratedQuotes { quoteFileName String opportunityId String - opportunity Opportunity @relation(fields: [opportunityId], references: [id], onDelete: Cascade) + opportunity Opportunity @relation(fields: [opportunityId], references: [uid], onDelete: Cascade) createdById String? createdBy User? @relation(fields: [createdById], references: [id], onDelete: SetNull) diff --git a/dalpuri/.oldgit/HEAD b/dalpuri/.oldgit/HEAD deleted file mode 100644 index b870d82..0000000 --- a/dalpuri/.oldgit/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/main diff --git a/dalpuri/.oldgit/config b/dalpuri/.oldgit/config deleted file mode 100644 index 2ba4522..0000000 --- a/dalpuri/.oldgit/config +++ /dev/null @@ -1,14 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true -[remote "origin"] - url = https://github.com/Project-Optima/dalpuri - fetch = +refs/heads/*:refs/remotes/origin/* -[branch "main"] - remote = origin - merge = refs/heads/main - vscode-merge-base = origin/main diff --git a/dalpuri/.oldgit/description b/dalpuri/.oldgit/description deleted file mode 100644 index 498b267..0000000 --- a/dalpuri/.oldgit/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/dalpuri/.oldgit/hooks/applypatch-msg.sample b/dalpuri/.oldgit/hooks/applypatch-msg.sample deleted file mode 100755 index a5d7b84..0000000 --- a/dalpuri/.oldgit/hooks/applypatch-msg.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message taken by -# applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. The hook is -# allowed to edit the commit message file. -# -# To enable this hook, rename this file to "applypatch-msg". - -. git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} -: diff --git a/dalpuri/.oldgit/hooks/commit-msg.sample b/dalpuri/.oldgit/hooks/commit-msg.sample deleted file mode 100755 index b58d118..0000000 --- a/dalpuri/.oldgit/hooks/commit-msg.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message. -# Called by "git commit" with one argument, the name of the file -# that has the commit message. The hook should exit with non-zero -# status after issuing an appropriate message if it wants to stop the -# commit. The hook is allowed to edit the commit message file. -# -# To enable this hook, rename this file to "commit-msg". - -# Uncomment the below to add a Signed-off-by line to the message. -# Doing this in a hook is a bad idea in general, but the prepare-commit-msg -# hook is more suited to it. -# -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" - -# This example catches duplicate Signed-off-by lines. - -test "" = "$(grep '^Signed-off-by: ' "$1" | - sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { - echo >&2 Duplicate Signed-off-by lines. - exit 1 -} diff --git a/dalpuri/.oldgit/hooks/fsmonitor-watchman.sample b/dalpuri/.oldgit/hooks/fsmonitor-watchman.sample deleted file mode 100755 index 23e856f..0000000 --- a/dalpuri/.oldgit/hooks/fsmonitor-watchman.sample +++ /dev/null @@ -1,174 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; -use IPC::Open2; - -# An example hook script to integrate Watchman -# (https://facebook.github.io/watchman/) with git to speed up detecting -# new and modified files. -# -# The hook is passed a version (currently 2) and last update token -# formatted as a string and outputs to stdout a new update token and -# all files that have been modified since the update token. Paths must -# be relative to the root of the working tree and separated by a single NUL. -# -# To enable this hook, rename this file to "query-watchman" and set -# 'git config core.fsmonitor .git/hooks/query-watchman' -# -my ($version, $last_update_token) = @ARGV; - -# Uncomment for debugging -# print STDERR "$0 $version $last_update_token\n"; - -# Check the hook interface version -if ($version ne 2) { - die "Unsupported query-fsmonitor hook version '$version'.\n" . - "Falling back to scanning...\n"; -} - -my $git_work_tree = get_working_dir(); - -my $retry = 1; - -my $json_pkg; -eval { - require JSON::XS; - $json_pkg = "JSON::XS"; - 1; -} or do { - require JSON::PP; - $json_pkg = "JSON::PP"; -}; - -launch_watchman(); - -sub launch_watchman { - my $o = watchman_query(); - if (is_work_tree_watched($o)) { - output_result($o->{clock}, @{$o->{files}}); - } -} - -sub output_result { - my ($clockid, @files) = @_; - - # Uncomment for debugging watchman output - # open (my $fh, ">", ".git/watchman-output.out"); - # binmode $fh, ":utf8"; - # print $fh "$clockid\n@files\n"; - # close $fh; - - binmode STDOUT, ":utf8"; - print $clockid; - print "\0"; - local $, = "\0"; - print @files; -} - -sub watchman_clock { - my $response = qx/watchman clock "$git_work_tree"/; - die "Failed to get clock id on '$git_work_tree'.\n" . - "Falling back to scanning...\n" if $? != 0; - - return $json_pkg->new->utf8->decode($response); -} - -sub watchman_query { - my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') - or die "open2() failed: $!\n" . - "Falling back to scanning...\n"; - - # In the query expression below we're asking for names of files that - # changed since $last_update_token but not from the .git folder. - # - # To accomplish this, we're using the "since" generator to use the - # recency index to select candidate nodes and "fields" to limit the - # output to file names only. Then we're using the "expression" term to - # further constrain the results. - my $last_update_line = ""; - if (substr($last_update_token, 0, 1) eq "c") { - $last_update_token = "\"$last_update_token\""; - $last_update_line = qq[\n"since": $last_update_token,]; - } - my $query = <<" END"; - ["query", "$git_work_tree", {$last_update_line - "fields": ["name"], - "expression": ["not", ["dirname", ".git"]] - }] - END - - # Uncomment for debugging the watchman query - # open (my $fh, ">", ".git/watchman-query.json"); - # print $fh $query; - # close $fh; - - print CHLD_IN $query; - close CHLD_IN; - my $response = do {local $/; }; - - # Uncomment for debugging the watch response - # open ($fh, ">", ".git/watchman-response.json"); - # print $fh $response; - # close $fh; - - die "Watchman: command returned no output.\n" . - "Falling back to scanning...\n" if $response eq ""; - die "Watchman: command returned invalid output: $response\n" . - "Falling back to scanning...\n" unless $response =~ /^\{/; - - return $json_pkg->new->utf8->decode($response); -} - -sub is_work_tree_watched { - my ($output) = @_; - my $error = $output->{error}; - if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { - $retry--; - my $response = qx/watchman watch "$git_work_tree"/; - die "Failed to make watchman watch '$git_work_tree'.\n" . - "Falling back to scanning...\n" if $? != 0; - $output = $json_pkg->new->utf8->decode($response); - $error = $output->{error}; - die "Watchman: $error.\n" . - "Falling back to scanning...\n" if $error; - - # Uncomment for debugging watchman output - # open (my $fh, ">", ".git/watchman-output.out"); - # close $fh; - - # Watchman will always return all files on the first query so - # return the fast "everything is dirty" flag to git and do the - # Watchman query just to get it over with now so we won't pay - # the cost in git to look up each individual file. - my $o = watchman_clock(); - $error = $output->{error}; - - die "Watchman: $error.\n" . - "Falling back to scanning...\n" if $error; - - output_result($o->{clock}, ("/")); - $last_update_token = $o->{clock}; - - eval { launch_watchman() }; - return 0; - } - - die "Watchman: $error.\n" . - "Falling back to scanning...\n" if $error; - - return 1; -} - -sub get_working_dir { - my $working_dir; - if ($^O =~ 'msys' || $^O =~ 'cygwin') { - $working_dir = Win32::GetCwd(); - $working_dir =~ tr/\\/\//; - } else { - require Cwd; - $working_dir = Cwd::cwd(); - } - - return $working_dir; -} diff --git a/dalpuri/.oldgit/hooks/post-update.sample b/dalpuri/.oldgit/hooks/post-update.sample deleted file mode 100755 index ec17ec1..0000000 --- a/dalpuri/.oldgit/hooks/post-update.sample +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare a packed repository for use over -# dumb transports. -# -# To enable this hook, rename this file to "post-update". - -exec git update-server-info diff --git a/dalpuri/.oldgit/hooks/pre-applypatch.sample b/dalpuri/.oldgit/hooks/pre-applypatch.sample deleted file mode 100755 index 4142082..0000000 --- a/dalpuri/.oldgit/hooks/pre-applypatch.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed -# by applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-applypatch". - -. git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} -: diff --git a/dalpuri/.oldgit/hooks/pre-commit.sample b/dalpuri/.oldgit/hooks/pre-commit.sample deleted file mode 100755 index 29ed5ee..0000000 --- a/dalpuri/.oldgit/hooks/pre-commit.sample +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed. -# Called by "git commit" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message if -# it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-commit". - -if git rev-parse --verify HEAD >/dev/null 2>&1 -then - against=HEAD -else - # Initial commit: diff against an empty tree object - against=$(git hash-object -t tree /dev/null) -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --type=bool hooks.allownonascii) - -# Redirect output to stderr. -exec 1>&2 - -# Cross platform projects tend to avoid non-ASCII filenames; prevent -# them from being added to the repository. We exploit the fact that the -# printable range starts at the space character and ends with tilde. -if [ "$allownonascii" != "true" ] && - # Note that the use of brackets around a tr range is ok here, (it's - # even required, for portability to Solaris 10's /usr/bin/tr), since - # the square bracket bytes happen to fall in the designated range. - test $(git diff-index --cached --name-only --diff-filter=A -z $against | - LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 -then - cat <<\EOF -Error: Attempt to add a non-ASCII file name. - -This can cause problems if you want to work with people on other platforms. - -To be portable it is advisable to rename the file. - -If you know what you are doing you can disable this check using: - - git config hooks.allownonascii true -EOF - exit 1 -fi - -# If there are whitespace errors, print the offending file names and fail. -exec git diff-index --check --cached $against -- diff --git a/dalpuri/.oldgit/hooks/pre-merge-commit.sample b/dalpuri/.oldgit/hooks/pre-merge-commit.sample deleted file mode 100755 index 399eab1..0000000 --- a/dalpuri/.oldgit/hooks/pre-merge-commit.sample +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed. -# Called by "git merge" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message to -# stderr if it wants to stop the merge commit. -# -# To enable this hook, rename this file to "pre-merge-commit". - -. git-sh-setup -test -x "$GIT_DIR/hooks/pre-commit" && - exec "$GIT_DIR/hooks/pre-commit" -: diff --git a/dalpuri/.oldgit/hooks/pre-push.sample b/dalpuri/.oldgit/hooks/pre-push.sample deleted file mode 100755 index 4ce688d..0000000 --- a/dalpuri/.oldgit/hooks/pre-push.sample +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# An example hook script to verify what is about to be pushed. Called by "git -# push" after it has checked the remote status, but before anything has been -# pushed. If this script exits with a non-zero status nothing will be pushed. -# -# This hook is called with the following parameters: -# -# $1 -- Name of the remote to which the push is being done -# $2 -- URL to which the push is being done -# -# If pushing without using a named remote those arguments will be equal. -# -# Information about the commits which are being pushed is supplied as lines to -# the standard input in the form: -# -# -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" - exit 1 - fi - fi -done - -exit 0 diff --git a/dalpuri/.oldgit/hooks/pre-rebase.sample b/dalpuri/.oldgit/hooks/pre-rebase.sample deleted file mode 100755 index 6cbef5c..0000000 --- a/dalpuri/.oldgit/hooks/pre-rebase.sample +++ /dev/null @@ -1,169 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2006, 2008 Junio C Hamano -# -# The "pre-rebase" hook is run just before "git rebase" starts doing -# its job, and can prevent the command from running by exiting with -# non-zero status. -# -# The hook is called with the following parameters: -# -# $1 -- the upstream the series was forked from. -# $2 -- the branch being rebased (or empty when rebasing the current branch). -# -# This sample shows how to prevent topic branches that are already -# merged to 'next' branch from getting rebased, because allowing it -# would result in rebasing already published history. - -publish=next -basebranch="$1" -if test "$#" = 2 -then - topic="refs/heads/$2" -else - topic=`git symbolic-ref HEAD` || - exit 0 ;# we do not interrupt rebasing detached HEAD -fi - -case "$topic" in -refs/heads/??/*) - ;; -*) - exit 0 ;# we do not interrupt others. - ;; -esac - -# Now we are dealing with a topic branch being rebased -# on top of master. Is it OK to rebase it? - -# Does the topic really exist? -git show-ref -q "$topic" || { - echo >&2 "No such branch $topic" - exit 1 -} - -# Is topic fully merged to master? -not_in_master=`git rev-list --pretty=oneline ^master "$topic"` -if test -z "$not_in_master" -then - echo >&2 "$topic is fully merged to master; better remove it." - exit 1 ;# we could allow it, but there is no point. -fi - -# Is topic ever merged to next? If so you should not be rebasing it. -only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` -only_next_2=`git rev-list ^master ${publish} | sort` -if test "$only_next_1" = "$only_next_2" -then - not_in_topic=`git rev-list "^$topic" master` - if test -z "$not_in_topic" - then - echo >&2 "$topic is already up to date with master" - exit 1 ;# we could allow it, but there is no point. - else - exit 0 - fi -else - not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` - /usr/bin/perl -e ' - my $topic = $ARGV[0]; - my $msg = "* $topic has commits already merged to public branch:\n"; - my (%not_in_next) = map { - /^([0-9a-f]+) /; - ($1 => 1); - } split(/\n/, $ARGV[1]); - for my $elem (map { - /^([0-9a-f]+) (.*)$/; - [$1 => $2]; - } split(/\n/, $ARGV[2])) { - if (!exists $not_in_next{$elem->[0]}) { - if ($msg) { - print STDERR $msg; - undef $msg; - } - print STDERR " $elem->[1]\n"; - } - } - ' "$topic" "$not_in_next" "$not_in_master" - exit 1 -fi - -<<\DOC_END - -This sample hook safeguards topic branches that have been -published from being rewound. - -The workflow assumed here is: - - * Once a topic branch forks from "master", "master" is never - merged into it again (either directly or indirectly). - - * Once a topic branch is fully cooked and merged into "master", - it is deleted. If you need to build on top of it to correct - earlier mistakes, a new topic branch is created by forking at - the tip of the "master". This is not strictly necessary, but - it makes it easier to keep your history simple. - - * Whenever you need to test or publish your changes to topic - branches, merge them into "next" branch. - -The script, being an example, hardcodes the publish branch name -to be "next", but it is trivial to make it configurable via -$GIT_DIR/config mechanism. - -With this workflow, you would want to know: - -(1) ... if a topic branch has ever been merged to "next". Young - topic branches can have stupid mistakes you would rather - clean up before publishing, and things that have not been - merged into other branches can be easily rebased without - affecting other people. But once it is published, you would - not want to rewind it. - -(2) ... if a topic branch has been fully merged to "master". - Then you can delete it. More importantly, you should not - build on top of it -- other people may already want to - change things related to the topic as patches against your - "master", so if you need further changes, it is better to - fork the topic (perhaps with the same name) afresh from the - tip of "master". - -Let's look at this example: - - o---o---o---o---o---o---o---o---o---o "next" - / / / / - / a---a---b A / / - / / / / - / / c---c---c---c B / - / / / \ / - / / / b---b C \ / - / / / / \ / - ---o---o---o---o---o---o---o---o---o---o---o "master" - - -A, B and C are topic branches. - - * A has one fix since it was merged up to "next". - - * B has finished. It has been fully merged up to "master" and "next", - and is ready to be deleted. - - * C has not merged to "next" at all. - -We would want to allow C to be rebased, refuse A, and encourage -B to be deleted. - -To compute (1): - - git rev-list ^master ^topic next - git rev-list ^master next - - if these match, topic has not merged in next at all. - -To compute (2): - - git rev-list master..topic - - if this is empty, it is fully merged to "master". - -DOC_END diff --git a/dalpuri/.oldgit/hooks/pre-receive.sample b/dalpuri/.oldgit/hooks/pre-receive.sample deleted file mode 100755 index a1fd29e..0000000 --- a/dalpuri/.oldgit/hooks/pre-receive.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# An example hook script to make use of push options. -# The example simply echoes all push options that start with 'echoback=' -# and rejects all pushes when the "reject" push option is used. -# -# To enable this hook, rename this file to "pre-receive". - -if test -n "$GIT_PUSH_OPTION_COUNT" -then - i=0 - while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" - do - eval "value=\$GIT_PUSH_OPTION_$i" - case "$value" in - echoback=*) - echo "echo from the pre-receive-hook: ${value#*=}" >&2 - ;; - reject) - exit 1 - esac - i=$((i + 1)) - done -fi diff --git a/dalpuri/.oldgit/hooks/prepare-commit-msg.sample b/dalpuri/.oldgit/hooks/prepare-commit-msg.sample deleted file mode 100755 index 10fa14c..0000000 --- a/dalpuri/.oldgit/hooks/prepare-commit-msg.sample +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare the commit log message. -# Called by "git commit" with the name of the file that has the -# commit message, followed by the description of the commit -# message's source. The hook's purpose is to edit the commit -# message file. If the hook fails with a non-zero status, -# the commit is aborted. -# -# To enable this hook, rename this file to "prepare-commit-msg". - -# This hook includes three examples. The first one removes the -# "# Please enter the commit message..." help message. -# -# The second includes the output of "git diff --name-status -r" -# into the message, just before the "git status" output. It is -# commented because it doesn't cope with --amend or with squashed -# commits. -# -# The third example adds a Signed-off-by line to the message, that can -# still be edited. This is rarely a good idea. - -COMMIT_MSG_FILE=$1 -COMMIT_SOURCE=$2 -SHA1=$3 - -/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" - -# case "$COMMIT_SOURCE,$SHA1" in -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; -# *) ;; -# esac - -# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" -# if test -z "$COMMIT_SOURCE" -# then -# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" -# fi diff --git a/dalpuri/.oldgit/hooks/push-to-checkout.sample b/dalpuri/.oldgit/hooks/push-to-checkout.sample deleted file mode 100755 index af5a0c0..0000000 --- a/dalpuri/.oldgit/hooks/push-to-checkout.sample +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh - -# An example hook script to update a checked-out tree on a git push. -# -# This hook is invoked by git-receive-pack(1) when it reacts to git -# push and updates reference(s) in its repository, and when the push -# tries to update the branch that is currently checked out and the -# receive.denyCurrentBranch configuration variable is set to -# updateInstead. -# -# By default, such a push is refused if the working tree and the index -# of the remote repository has any difference from the currently -# checked out commit; when both the working tree and the index match -# the current commit, they are updated to match the newly pushed tip -# of the branch. This hook is to be used to override the default -# behaviour; however the code below reimplements the default behaviour -# as a starting point for convenient modification. -# -# The hook receives the commit with which the tip of the current -# branch is going to be updated: -commit=$1 - -# It can exit with a non-zero status to refuse the push (when it does -# so, it must not modify the index or the working tree). -die () { - echo >&2 "$*" - exit 1 -} - -# Or it can make any necessary changes to the working tree and to the -# index to bring them to the desired state when the tip of the current -# branch is updated to the new commit, and exit with a zero status. -# -# For example, the hook can simply run git read-tree -u -m HEAD "$1" -# in order to emulate git fetch that is run in the reverse direction -# with git push, as the two-tree form of git read-tree -u -m is -# essentially the same as git switch or git checkout that switches -# branches while keeping the local changes in the working tree that do -# not interfere with the difference between the branches. - -# The below is a more-or-less exact translation to shell of the C code -# for the default behaviour for git's push-to-checkout hook defined in -# the push_to_deploy() function in builtin/receive-pack.c. -# -# Note that the hook will be executed from the repository directory, -# not from the working tree, so if you want to perform operations on -# the working tree, you will have to adapt your code accordingly, e.g. -# by adding "cd .." or using relative paths. - -if ! git update-index -q --ignore-submodules --refresh -then - die "Up-to-date check failed" -fi - -if ! git diff-files --quiet --ignore-submodules -- -then - die "Working directory has unstaged changes" -fi - -# This is a rough translation of: -# -# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX -if git cat-file -e HEAD 2>/dev/null -then - head=HEAD -else - head=$(git hash-object -t tree --stdin &2 - exit 1 -} - -unset GIT_DIR GIT_WORK_TREE -cd "$worktree" && - -if grep -q "^diff --git " "$1" -then - validate_patch "$1" -else - validate_cover_letter "$1" -fi && - -if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL" -then - git config --unset-all sendemail.validateWorktree && - trap 'git worktree remove -ff "$worktree"' EXIT && - validate_series -fi diff --git a/dalpuri/.oldgit/hooks/update.sample b/dalpuri/.oldgit/hooks/update.sample deleted file mode 100755 index c4d426b..0000000 --- a/dalpuri/.oldgit/hooks/update.sample +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh -# -# An example hook script to block unannotated tags from entering. -# Called by "git receive-pack" with arguments: refname sha1-old sha1-new -# -# To enable this hook, rename this file to "update". -# -# Config -# ------ -# hooks.allowunannotated -# This boolean sets whether unannotated tags will be allowed into the -# repository. By default they won't be. -# hooks.allowdeletetag -# This boolean sets whether deleting tags will be allowed in the -# repository. By default they won't be. -# hooks.allowmodifytag -# This boolean sets whether a tag may be modified after creation. By default -# it won't be. -# hooks.allowdeletebranch -# This boolean sets whether deleting branches will be allowed in the -# repository. By default they won't be. -# hooks.denycreatebranch -# This boolean sets whether remotely creating branches will be denied -# in the repository. By default this is allowed. -# - -# --- Command line -refname="$1" -oldrev="$2" -newrev="$3" - -# --- Safety check -if [ -z "$GIT_DIR" ]; then - echo "Don't run this script from the command line." >&2 - echo " (if you want, you could supply GIT_DIR then run" >&2 - echo " $0 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --type=bool hooks.allowunannotated) -allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) -denycreatebranch=$(git config --type=bool hooks.denycreatebranch) -allowdeletetag=$(git config --type=bool hooks.allowdeletetag) -allowmodifytag=$(git config --type=bool hooks.allowmodifytag) - -# check for no description -projectdesc=$(sed -e '1q' "$GIT_DIR/description") -case "$projectdesc" in -"Unnamed repository"* | "") - echo "*** Project description file hasn't been set" >&2 - exit 1 - ;; -esac - -# --- Check types -# if $newrev is 0000...0000, it's a commit to delete a ref. -zero=$(git hash-object --stdin &2 - echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 - exit 1 - fi - ;; - refs/tags/*,delete) - # delete tag - if [ "$allowdeletetag" != "true" ]; then - echo "*** Deleting a tag is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/tags/*,tag) - # annotated tag - if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 - then - echo "*** Tag '$refname' already exists." >&2 - echo "*** Modifying a tag is not allowed in this repository." >&2 - exit 1 - fi - ;; - refs/heads/*,commit) - # branch - if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then - echo "*** Creating a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/heads/*,delete) - # delete branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/remotes/*,commit) - # tracking branch - ;; - refs/remotes/*,delete) - # delete tracking branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a tracking branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - *) - # Anything else (is there anything else?) - echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 - exit 1 - ;; -esac - -# --- Finished -exit 0 diff --git a/dalpuri/.oldgit/index b/dalpuri/.oldgit/index deleted file mode 100644 index 5531a56..0000000 Binary files a/dalpuri/.oldgit/index and /dev/null differ diff --git a/dalpuri/.oldgit/info/exclude b/dalpuri/.oldgit/info/exclude deleted file mode 100644 index a5196d1..0000000 --- a/dalpuri/.oldgit/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/dalpuri/.oldgit/objects/02/735b35bc1244b931569f43bccef74a61ab52a8 b/dalpuri/.oldgit/objects/02/735b35bc1244b931569f43bccef74a61ab52a8 deleted file mode 100644 index 043e5d1..0000000 Binary files a/dalpuri/.oldgit/objects/02/735b35bc1244b931569f43bccef74a61ab52a8 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/05/180e57f3884d6c205dc68da490e5a5e16b5e81 b/dalpuri/.oldgit/objects/05/180e57f3884d6c205dc68da490e5a5e16b5e81 deleted file mode 100644 index b26d2dc..0000000 Binary files a/dalpuri/.oldgit/objects/05/180e57f3884d6c205dc68da490e5a5e16b5e81 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/0c/925f8aa6f3ec87ee5d0226b2a3b2b3d394873c b/dalpuri/.oldgit/objects/0c/925f8aa6f3ec87ee5d0226b2a3b2b3d394873c deleted file mode 100644 index 0251606..0000000 Binary files a/dalpuri/.oldgit/objects/0c/925f8aa6f3ec87ee5d0226b2a3b2b3d394873c and /dev/null differ diff --git a/dalpuri/.oldgit/objects/0e/dcb23f762f69f528d545dd8bee677d72c5c842 b/dalpuri/.oldgit/objects/0e/dcb23f762f69f528d545dd8bee677d72c5c842 deleted file mode 100644 index 100a56c..0000000 Binary files a/dalpuri/.oldgit/objects/0e/dcb23f762f69f528d545dd8bee677d72c5c842 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/0e/e4f51b2eded8887533609b3d0f6bb32a642b6f b/dalpuri/.oldgit/objects/0e/e4f51b2eded8887533609b3d0f6bb32a642b6f deleted file mode 100644 index 7cb57d0..0000000 Binary files a/dalpuri/.oldgit/objects/0e/e4f51b2eded8887533609b3d0f6bb32a642b6f and /dev/null differ diff --git a/dalpuri/.oldgit/objects/12/75287c58bde63c6b6e157c3a3a8e61216902d1 b/dalpuri/.oldgit/objects/12/75287c58bde63c6b6e157c3a3a8e61216902d1 deleted file mode 100644 index 8a846f2..0000000 Binary files a/dalpuri/.oldgit/objects/12/75287c58bde63c6b6e157c3a3a8e61216902d1 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/1e/202212ef3b733183d9825d1b61c99dd879c84e b/dalpuri/.oldgit/objects/1e/202212ef3b733183d9825d1b61c99dd879c84e deleted file mode 100644 index 2f03e5d..0000000 Binary files a/dalpuri/.oldgit/objects/1e/202212ef3b733183d9825d1b61c99dd879c84e and /dev/null differ diff --git a/dalpuri/.oldgit/objects/22/f0b10d934ce0fd50259f163cf5b95430ccd8ae b/dalpuri/.oldgit/objects/22/f0b10d934ce0fd50259f163cf5b95430ccd8ae deleted file mode 100644 index d7ba680..0000000 Binary files a/dalpuri/.oldgit/objects/22/f0b10d934ce0fd50259f163cf5b95430ccd8ae and /dev/null differ diff --git a/dalpuri/.oldgit/objects/29/e730ba69fc979e1ebd6177802aa30c858c021a b/dalpuri/.oldgit/objects/29/e730ba69fc979e1ebd6177802aa30c858c021a deleted file mode 100644 index 11cbaf9..0000000 Binary files a/dalpuri/.oldgit/objects/29/e730ba69fc979e1ebd6177802aa30c858c021a and /dev/null differ diff --git a/dalpuri/.oldgit/objects/3b/b5180b4fdaeaed1b68d954f4cd8c49ce592f71 b/dalpuri/.oldgit/objects/3b/b5180b4fdaeaed1b68d954f4cd8c49ce592f71 deleted file mode 100644 index 679d95e..0000000 Binary files a/dalpuri/.oldgit/objects/3b/b5180b4fdaeaed1b68d954f4cd8c49ce592f71 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/3c/7037547b74f5bd4c6aca9572932926c83067c2 b/dalpuri/.oldgit/objects/3c/7037547b74f5bd4c6aca9572932926c83067c2 deleted file mode 100644 index 385b0f6..0000000 Binary files a/dalpuri/.oldgit/objects/3c/7037547b74f5bd4c6aca9572932926c83067c2 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/4e/7bccbe36e60596c5cd700c9a8dde63858952a4 b/dalpuri/.oldgit/objects/4e/7bccbe36e60596c5cd700c9a8dde63858952a4 deleted file mode 100644 index f047d91..0000000 Binary files a/dalpuri/.oldgit/objects/4e/7bccbe36e60596c5cd700c9a8dde63858952a4 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/5f/2cce0d246571fd5d420b27dfa364b053ba5d89 b/dalpuri/.oldgit/objects/5f/2cce0d246571fd5d420b27dfa364b053ba5d89 deleted file mode 100644 index c9e26d8..0000000 Binary files a/dalpuri/.oldgit/objects/5f/2cce0d246571fd5d420b27dfa364b053ba5d89 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/7b/76eb2f2164d6b155f3b81364094cf29f80d5c5 b/dalpuri/.oldgit/objects/7b/76eb2f2164d6b155f3b81364094cf29f80d5c5 deleted file mode 100644 index 389940d..0000000 Binary files a/dalpuri/.oldgit/objects/7b/76eb2f2164d6b155f3b81364094cf29f80d5c5 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/7e/6e72acb50037d328c9f7b15fa6bda0e42fcc31 b/dalpuri/.oldgit/objects/7e/6e72acb50037d328c9f7b15fa6bda0e42fcc31 deleted file mode 100644 index 09ee8bc..0000000 Binary files a/dalpuri/.oldgit/objects/7e/6e72acb50037d328c9f7b15fa6bda0e42fcc31 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/83/1a20fa83a22b5b1735aa34a78ec276f7c05e4c b/dalpuri/.oldgit/objects/83/1a20fa83a22b5b1735aa34a78ec276f7c05e4c deleted file mode 100644 index 6be38f8..0000000 Binary files a/dalpuri/.oldgit/objects/83/1a20fa83a22b5b1735aa34a78ec276f7c05e4c and /dev/null differ diff --git a/dalpuri/.oldgit/objects/89/b68c1a4c7b8c406543b4774b5680fa4eb773ba b/dalpuri/.oldgit/objects/89/b68c1a4c7b8c406543b4774b5680fa4eb773ba deleted file mode 100644 index d5a5968..0000000 --- a/dalpuri/.oldgit/objects/89/b68c1a4c7b8c406543b4774b5680fa4eb773ba +++ /dev/null @@ -1,6 +0,0 @@ -xmj0{S &6ʶ6iPh<ʣ .}>]!'7o<]Xp}-Fbp^^'Gy4V|ܓ: 4VhH;l(9ȱenU A - ^FG Vi1$}  -nzI^qkdB^ M47;%K3%r"|kFnK-)$CZkȫw;)3?rR?Y -#\Ot˥={K_fBj_|]X.ٴPc -> m'g"fs1g -&l9/?p_pvh \uslY=LN?˵GE8a$oNPTMY. \ No newline at end of file diff --git a/dalpuri/.oldgit/objects/93/a90b31062c15e76c51fd72f6ebcd8b59fe6deb b/dalpuri/.oldgit/objects/93/a90b31062c15e76c51fd72f6ebcd8b59fe6deb deleted file mode 100644 index 32b358a..0000000 Binary files a/dalpuri/.oldgit/objects/93/a90b31062c15e76c51fd72f6ebcd8b59fe6deb and /dev/null differ diff --git a/dalpuri/.oldgit/objects/ae/1b316cde6722d13f99d496c2ffd0a4dfa18732 b/dalpuri/.oldgit/objects/ae/1b316cde6722d13f99d496c2ffd0a4dfa18732 deleted file mode 100644 index 849e707..0000000 Binary files a/dalpuri/.oldgit/objects/ae/1b316cde6722d13f99d496c2ffd0a4dfa18732 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/b3/7ab7d676374bb70c53f9486c83bf979a402f9c b/dalpuri/.oldgit/objects/b3/7ab7d676374bb70c53f9486c83bf979a402f9c deleted file mode 100644 index 27dae64..0000000 Binary files a/dalpuri/.oldgit/objects/b3/7ab7d676374bb70c53f9486c83bf979a402f9c and /dev/null differ diff --git a/dalpuri/.oldgit/objects/c2/6cd764af1511abc124f9d2378b85c1836152bb b/dalpuri/.oldgit/objects/c2/6cd764af1511abc124f9d2378b85c1836152bb deleted file mode 100644 index b07a859..0000000 Binary files a/dalpuri/.oldgit/objects/c2/6cd764af1511abc124f9d2378b85c1836152bb and /dev/null differ diff --git a/dalpuri/.oldgit/objects/d2/70740be2c14f49016abd208d779b3618c40dd0 b/dalpuri/.oldgit/objects/d2/70740be2c14f49016abd208d779b3618c40dd0 deleted file mode 100644 index 6d0ec1b..0000000 Binary files a/dalpuri/.oldgit/objects/d2/70740be2c14f49016abd208d779b3618c40dd0 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/d9/bb6a7099f5ffcda8f9cb5abbf9d84ed8c657ca b/dalpuri/.oldgit/objects/d9/bb6a7099f5ffcda8f9cb5abbf9d84ed8c657ca deleted file mode 100644 index 726cc0e..0000000 Binary files a/dalpuri/.oldgit/objects/d9/bb6a7099f5ffcda8f9cb5abbf9d84ed8c657ca and /dev/null differ diff --git a/dalpuri/.oldgit/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/dalpuri/.oldgit/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 deleted file mode 100644 index 7112238..0000000 Binary files a/dalpuri/.oldgit/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/f8/8654f6392b625ab2d3aa87dfc86a2864415bc4 b/dalpuri/.oldgit/objects/f8/8654f6392b625ab2d3aa87dfc86a2864415bc4 deleted file mode 100644 index ede3ae4..0000000 Binary files a/dalpuri/.oldgit/objects/f8/8654f6392b625ab2d3aa87dfc86a2864415bc4 and /dev/null differ diff --git a/dalpuri/.oldgit/objects/pack/pack-e60f6465849e7a961a15b3749bda58885c37d87a.idx b/dalpuri/.oldgit/objects/pack/pack-e60f6465849e7a961a15b3749bda58885c37d87a.idx deleted file mode 100644 index fa24e34..0000000 Binary files a/dalpuri/.oldgit/objects/pack/pack-e60f6465849e7a961a15b3749bda58885c37d87a.idx and /dev/null differ diff --git a/dalpuri/.oldgit/objects/pack/pack-e60f6465849e7a961a15b3749bda58885c37d87a.pack b/dalpuri/.oldgit/objects/pack/pack-e60f6465849e7a961a15b3749bda58885c37d87a.pack deleted file mode 100644 index 878eb5b..0000000 Binary files a/dalpuri/.oldgit/objects/pack/pack-e60f6465849e7a961a15b3749bda58885c37d87a.pack and /dev/null differ diff --git a/dalpuri/.oldgit/objects/pack/pack-e60f6465849e7a961a15b3749bda58885c37d87a.rev b/dalpuri/.oldgit/objects/pack/pack-e60f6465849e7a961a15b3749bda58885c37d87a.rev deleted file mode 100644 index f7cde96..0000000 Binary files a/dalpuri/.oldgit/objects/pack/pack-e60f6465849e7a961a15b3749bda58885c37d87a.rev and /dev/null differ diff --git a/dalpuri/.oldgit/packed-refs b/dalpuri/.oldgit/packed-refs deleted file mode 100644 index 3821910..0000000 --- a/dalpuri/.oldgit/packed-refs +++ /dev/null @@ -1,2 +0,0 @@ -# pack-refs with: peeled fully-peeled sorted -e2b7c25b92ce326d236fd5bf635e863573679669 refs/remotes/origin/main diff --git a/dalpuri/.oldgit/refs/heads/main b/dalpuri/.oldgit/refs/heads/main deleted file mode 100644 index ce985c9..0000000 --- a/dalpuri/.oldgit/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -e2b7c25b92ce326d236fd5bf635e863573679669 diff --git a/dalpuri/.oldgit/refs/remotes/origin/HEAD b/dalpuri/.oldgit/refs/remotes/origin/HEAD deleted file mode 100644 index 4b0a875..0000000 --- a/dalpuri/.oldgit/refs/remotes/origin/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/remotes/origin/main diff --git a/dalpuri/src/api/server.ts b/dalpuri/old-src/api/server.ts similarity index 100% rename from dalpuri/src/api/server.ts rename to dalpuri/old-src/api/server.ts diff --git a/dalpuri/src/collectors/fetchCompanies.ts b/dalpuri/old-src/collectors/fetchCompanies.ts similarity index 100% rename from dalpuri/src/collectors/fetchCompanies.ts rename to dalpuri/old-src/collectors/fetchCompanies.ts diff --git a/dalpuri/src/collectors/fetchMembers.ts b/dalpuri/old-src/collectors/fetchMembers.ts similarity index 100% rename from dalpuri/src/collectors/fetchMembers.ts rename to dalpuri/old-src/collectors/fetchMembers.ts diff --git a/dalpuri/src/collectors/fetchOpportunities.ts b/dalpuri/old-src/collectors/fetchOpportunities.ts similarity index 100% rename from dalpuri/src/collectors/fetchOpportunities.ts rename to dalpuri/old-src/collectors/fetchOpportunities.ts diff --git a/dalpuri/src/collectors/fetchProducts.ts b/dalpuri/old-src/collectors/fetchProducts.ts similarity index 100% rename from dalpuri/src/collectors/fetchProducts.ts rename to dalpuri/old-src/collectors/fetchProducts.ts diff --git a/dalpuri/src/constants.ts b/dalpuri/old-src/constants.ts similarity index 100% rename from dalpuri/src/constants.ts rename to dalpuri/old-src/constants.ts diff --git a/dalpuri/src/export-products.ts b/dalpuri/old-src/export-products.ts similarity index 100% rename from dalpuri/src/export-products.ts rename to dalpuri/old-src/export-products.ts diff --git a/dalpuri/src/helper/collectorQuery.ts b/dalpuri/old-src/helper/collectorQuery.ts similarity index 100% rename from dalpuri/src/helper/collectorQuery.ts rename to dalpuri/old-src/helper/collectorQuery.ts diff --git a/dalpuri/old-src/index.ts b/dalpuri/old-src/index.ts new file mode 100644 index 0000000..ae1b316 --- /dev/null +++ b/dalpuri/old-src/index.ts @@ -0,0 +1,3 @@ +import { startServer } from "./api/server"; + +startServer(); diff --git a/dalpuri/prisma/schema.prisma b/dalpuri/prisma/schema.prisma index 544e6e0..5ea04d4 100644 --- a/dalpuri/prisma/schema.prisma +++ b/dalpuri/prisma/schema.prisma @@ -458,32 +458,32 @@ model Opportunity { techContactRecId Int? @map("Tech_Contact_RecID") id String? @map("Id") @db.UniqueIdentifier - company Company @relation(fields: [companyRecId], references: [companyRecId], onDelete: NoAction, onUpdate: NoAction) - contact Contact? @relation("OpportunityContact", fields: [contactRecId], references: [contactRecId], onDelete: NoAction, onUpdate: NoAction) - soPipeline SoPipeline @relation(fields: [soPipelineRecId], references: [soPipelineRecId], onDelete: NoAction, onUpdate: NoAction) - soInterest SoInterest? @relation(fields: [soInterestRecId], references: [soInterestRecId], onDelete: NoAction, onUpdate: NoAction) - billingUnit BillingUnit @relation(fields: [billingUnitRecId], references: [billingUnitRecId], onDelete: NoAction, onUpdate: NoAction) - contractType ContractType? @relation(fields: [contractTypeRecId], references: [contractTypeRecId], onDelete: NoAction, onUpdate: NoAction) - companyAddress CompanyAddress? @relation("OpportunityAddress", fields: [companyAddressRecId], references: [companyAddressRecId], onDelete: NoAction, onUpdate: NoAction) - soOppStatus SoOppStatus @relation(fields: [soOppStatusRecId], references: [soOppStatusRecId], onDelete: NoAction, onUpdate: NoAction) - pmProject PmProject? @relation(fields: [pmProjectRecId], references: [pmProjectRecId], onDelete: NoAction, onUpdate: NoAction) - ownerLevel OwnerLevel @relation(fields: [ownerLevelRecId], references: [ownerLevelRecId], onDelete: NoAction, onUpdate: NoAction) - soType SoType? @relation(fields: [soTypeRecId], references: [soTypeRecId], onDelete: NoAction, onUpdate: NoAction) + company Company @relation(fields: [companyRecId], references: [companyRecId], onDelete: NoAction, onUpdate: NoAction) + contact Contact? @relation("OpportunityContact", fields: [contactRecId], references: [contactRecId], onDelete: NoAction, onUpdate: NoAction) + soPipeline SoPipeline @relation(fields: [soPipelineRecId], references: [soPipelineRecId], onDelete: NoAction, onUpdate: NoAction) + soInterest SoInterest? @relation(fields: [soInterestRecId], references: [soInterestRecId], onDelete: NoAction, onUpdate: NoAction) + billingUnit BillingUnit @relation(fields: [billingUnitRecId], references: [billingUnitRecId], onDelete: NoAction, onUpdate: NoAction) + contractType ContractType? @relation(fields: [contractTypeRecId], references: [contractTypeRecId], onDelete: NoAction, onUpdate: NoAction) + companyAddress CompanyAddress? @relation("OpportunityAddress", fields: [companyAddressRecId], references: [companyAddressRecId], onDelete: NoAction, onUpdate: NoAction) + soOppStatus SoOppStatus @relation(fields: [soOppStatusRecId], references: [soOppStatusRecId], onDelete: NoAction, onUpdate: NoAction) + pmProject PmProject? @relation(fields: [pmProjectRecId], references: [pmProjectRecId], onDelete: NoAction, onUpdate: NoAction) + ownerLevel OwnerLevel @relation(fields: [ownerLevelRecId], references: [ownerLevelRecId], onDelete: NoAction, onUpdate: NoAction) + soType SoType? @relation(fields: [soTypeRecId], references: [soTypeRecId], onDelete: NoAction, onUpdate: NoAction) marketingCampaign MarketingCampaign? @relation(fields: [marketingCampaignRecId], references: [marketingCampaignRecId], onDelete: NoAction, onUpdate: NoAction) - agrType AgrType? @relation(fields: [agrTypeRecId], references: [agrTypeRecId], onDelete: NoAction, onUpdate: NoAction) - srService SrService? @relation(fields: [srServiceRecId], references: [srServiceRecId], onDelete: NoAction, onUpdate: NoAction) - soUrgency SoUrgency? @relation(fields: [soUrgencyRecId], references: [soUrgencyRecId], onDelete: NoAction, onUpdate: NoAction) - approvedByMember Member? @relation("OpportunityApprovedBy", fields: [approvedByRecId], references: [memberRecId], onDelete: NoAction, onUpdate: NoAction) - rejectedByMember Member? @relation("OpportunityRejectedBy", fields: [rejectedByRecId], references: [memberRecId], onDelete: NoAction, onUpdate: NoAction) - billingTerms BillingTerms? @relation(fields: [billingTermsRecId], references: [billingTermsRecId], onDelete: NoAction, onUpdate: NoAction) - taxCode TaxCode? @relation(fields: [taxCodeRecId], references: [taxCodeRecId], onDelete: NoAction, onUpdate: NoAction) - currency Currency @relation(fields: [currencyRecId], references: [currencyRecId], onDelete: NoAction, onUpdate: NoAction) + agrType AgrType? @relation(fields: [agrTypeRecId], references: [agrTypeRecId], onDelete: NoAction, onUpdate: NoAction) + srService SrService? @relation(fields: [srServiceRecId], references: [srServiceRecId], onDelete: NoAction, onUpdate: NoAction) + soUrgency SoUrgency? @relation(fields: [soUrgencyRecId], references: [soUrgencyRecId], onDelete: NoAction, onUpdate: NoAction) + approvedByMember Member? @relation("OpportunityApprovedBy", fields: [approvedByRecId], references: [memberRecId], onDelete: NoAction, onUpdate: NoAction) + rejectedByMember Member? @relation("OpportunityRejectedBy", fields: [rejectedByRecId], references: [memberRecId], onDelete: NoAction, onUpdate: NoAction) + billingTerms BillingTerms? @relation(fields: [billingTermsRecId], references: [billingTermsRecId], onDelete: NoAction, onUpdate: NoAction) + taxCode TaxCode? @relation(fields: [taxCodeRecId], references: [taxCodeRecId], onDelete: NoAction, onUpdate: NoAction) + currency Currency @relation(fields: [currencyRecId], references: [currencyRecId], onDelete: NoAction, onUpdate: NoAction) // Reverse relations (one-to-many from Opportunity) - activities SoActivity[] - opportunityNotes SoNote[] - forecastItems SoForecastDtl[] - contacts SoInfluencer[] + activities SoActivity[] + opportunityNotes SoNote[] + forecastItems SoForecastDtl[] + contacts SoInfluencer[] @@map("SO_Opportunity") @@schema("dbo") @@ -494,18 +494,18 @@ model Opportunity { // ===================== model SoPipeline { - soPipelineRecId Int @id @map("SO_Pipeline_RecID") - seqNbr Int? @map("Seq_Nbr") - description String? @map("Description") @db.NVarChar(50) - funnelColor String? @map("Funnel_Color") @db.NVarChar(25) - surveyRecId Int? @map("Survey_RecID") - updatedBy String? @map("Updated_By") @db.NVarChar(15) - lastUpdate DateTime @map("Last_Update") @db.DateTime2 - soProbabilityRecId Int @map("SO_Probability_RecID") - lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 - enteredBy String @map("Entered_By") @db.NVarChar(15) - dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 - id String @map("Id") @db.UniqueIdentifier + soPipelineRecId Int @id @map("SO_Pipeline_RecID") + seqNbr Int? @map("Seq_Nbr") + description String? @map("Description") @db.NVarChar(50) + funnelColor String? @map("Funnel_Color") @db.NVarChar(25) + surveyRecId Int? @map("Survey_RecID") + updatedBy String? @map("Updated_By") @db.NVarChar(15) + lastUpdate DateTime @map("Last_Update") @db.DateTime2 + soProbabilityRecId Int @map("SO_Probability_RecID") + lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + enteredBy String @map("Entered_By") @db.NVarChar(15) + dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 + id String @map("Id") @db.UniqueIdentifier opportunities Opportunity[] @@ -549,11 +549,11 @@ model SoType { } model SoUrgency { - soUrgencyRecId Int @id @map("SO_Urgency_RecID") - imageLink String? @map("Image_Link") @db.NVarChar(100) - description String @map("Description") @db.NVarChar(50) - sortOrder Int? @map("Sort_Order") - defaultFlag Boolean @map("Default_Flag") + soUrgencyRecId Int @id @map("SO_Urgency_RecID") + imageLink String? @map("Image_Link") @db.NVarChar(100) + description String @map("Description") @db.NVarChar(50) + sortOrder Int? @map("Sort_Order") + defaultFlag Boolean @map("Default_Flag") opportunities Opportunity[] @@ -579,37 +579,37 @@ model SoInterest { } model OwnerLevel { - ownerLevelRecId Int @id @map("Owner_Level_RecID") - ownerLevelId Int @map("Owner_Level_ID") @db.SmallInt - ownerLevelName String? @map("Owner_Level_Name") @db.NVarChar(50) - description String? @map("Description") @db.NVarChar(50) - memberId String? @map("Member_ID") @db.NVarChar(15) - notifyFlag Boolean @map("Notify_Flag") - reportsToRecId Int? @map("Reports_To_RecID") - salesTerritoryFlag Boolean @map("Sales_Territory_Flag") - lastUpdate DateTime @map("Last_Update") @db.DateTime2 - updatedBy String? @map("Updated_By") @db.NVarChar(15) - xrefId String? @map("Xref_ID") @db.NVarChar(10) - locationFlag Boolean? @map("Location_Flag") - salesRepId String? @map("SalesRep_ID") @db.NVarChar(50) - olAddressLine1 String? @map("OL_Address_Line1") @db.NVarChar(50) - olAddressLine2 String? @map("OL_Address_Line2") @db.NVarChar(50) - olCity String? @map("OL_City") @db.NVarChar(50) - olStateId String? @map("OL_State_ID") @db.NVarChar(50) - olZip String? @map("OL_Zip") @db.NVarChar(12) - olPhoneNbr String? @map("OL_PhoneNbr") @db.NVarChar(15) - olPhoneNbrFax String? @map("OL_Phonenbr_Fax") @db.NVarChar(15) - clientFlag Boolean @map("client_flag") - owaLink String? @map("OWA_Link") @db.NVarChar(100) - olCountryRecId Int? @map("OL_Country_RecID") - timeZoneRecId Int? @map("time_zone_recid") - officeCalendarRecId Int? @map("Office_Calendar_RecID") - lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 - avaValidatedFlag Boolean @map("Ava_Validated_Flag") - coreEntityId String? @map("Core_Entity_ID") @db.UniqueIdentifier - coreEntityUpdatedBy String? @map("Core_Entity_Updated_By") @db.NVarChar(15) + ownerLevelRecId Int @id @map("Owner_Level_RecID") + ownerLevelId Int @map("Owner_Level_ID") @db.SmallInt + ownerLevelName String? @map("Owner_Level_Name") @db.NVarChar(50) + description String? @map("Description") @db.NVarChar(50) + memberId String? @map("Member_ID") @db.NVarChar(15) + notifyFlag Boolean @map("Notify_Flag") + reportsToRecId Int? @map("Reports_To_RecID") + salesTerritoryFlag Boolean @map("Sales_Territory_Flag") + lastUpdate DateTime @map("Last_Update") @db.DateTime2 + updatedBy String? @map("Updated_By") @db.NVarChar(15) + xrefId String? @map("Xref_ID") @db.NVarChar(10) + locationFlag Boolean? @map("Location_Flag") + salesRepId String? @map("SalesRep_ID") @db.NVarChar(50) + olAddressLine1 String? @map("OL_Address_Line1") @db.NVarChar(50) + olAddressLine2 String? @map("OL_Address_Line2") @db.NVarChar(50) + olCity String? @map("OL_City") @db.NVarChar(50) + olStateId String? @map("OL_State_ID") @db.NVarChar(50) + olZip String? @map("OL_Zip") @db.NVarChar(12) + olPhoneNbr String? @map("OL_PhoneNbr") @db.NVarChar(15) + olPhoneNbrFax String? @map("OL_Phonenbr_Fax") @db.NVarChar(15) + clientFlag Boolean @map("client_flag") + owaLink String? @map("OWA_Link") @db.NVarChar(100) + olCountryRecId Int? @map("OL_Country_RecID") + timeZoneRecId Int? @map("time_zone_recid") + officeCalendarRecId Int? @map("Office_Calendar_RecID") + lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + avaValidatedFlag Boolean @map("Ava_Validated_Flag") + coreEntityId String? @map("Core_Entity_ID") @db.UniqueIdentifier + coreEntityUpdatedBy String? @map("Core_Entity_Updated_By") @db.NVarChar(15) coreEntityLastUpdateUtc DateTime? @map("Core_Entity_Last_Update_UTC") @db.DateTime2 - id String @map("Id") @db.UniqueIdentifier + id String @map("Id") @db.UniqueIdentifier opportunities Opportunity[] @@ -617,124 +617,141 @@ model OwnerLevel { @@schema("dbo") } +model Department { + departmentRecId Int @id @map("Department_RecID") + departmentName String? @map("Department_Name") @db.NVarChar(30) + lastUpdate DateTime @map("Last_Update") @db.DateTime2 + updatedBy String? @map("Updated_By") @db.NVarChar(30) + lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + enteredBy String @map("Entered_By") @db.NVarChar(15) + dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 + id String @map("Id") @db.UniqueIdentifier + + contacts Contact[] @relation("ContactDepartment") + + @@map("Department") + @@schema("dbo") +} + model Contact { - contactRecId Int @id @map("Contact_RecID") - companyRecId Int? @map("Company_RecID") - memberId String? @map("Member_ID") @db.NVarChar(15) - companyName String? @map("Company_Name") @db.NVarChar(50) - seqNbr Int? @map("Seq_Nbr") - firstName String? @map("First_Name") @db.NVarChar(50) - lastName String? @map("Last_Name") @db.NVarChar(50) - title String? @map("Title") @db.NVarChar(128) - relationship String? @map("Relationship") @db.NVarChar(50) - defaultFlag Boolean? @map("Default_Flag") - exchangeFlag Boolean? @map("Exchange_Flag") - lastUpdate DateTime @map("Last_Update") @db.DateTime2 - updatedBy String? @map("Updated_By") @db.NVarChar(15) - relationshipRecId Int? @map("Relationship_RecID") - contactStatusRecId Int? @map("Contact_Status_RecID") - gender String? @map("Gender") @db.Char(1) - nickName String? @map("NickName") @db.NVarChar(30) - dateBirth DateTime? @map("Date_Birth") @db.DateTime2 - marriedFlag Boolean @map("Married_Flag") - spouseName String? @map("Spouse_Name") @db.NVarChar(30) - dateAnniversary DateTime? @map("Date_Anniversary") @db.DateTime2 - childrenFlag Boolean @map("Children_Flag") - childrenInfo String? @map("Children_Info") @db.NVarChar(Max) - school String? @map("School") @db.NVarChar(50) - hobbies String? @map("Hobbies") @db.NVarChar(Max) - reportsToRecId Int? @map("Reports_To_RecID") - assistantRecId Int? @map("Assistant_RecID") - userfield1 String? @map("Userfield1") @db.NVarChar(50) - userfield2 String? @map("Userfield2") @db.NVarChar(50) - userfield3 String? @map("Userfield3") @db.NVarChar(50) - userfield4 String? @map("Userfield4") @db.NVarChar(50) - userfield5 String? @map("Userfield5") @db.NVarChar(50) - userfield6 String? @map("Userfield6") @db.NVarChar(50) - userfield7 String? @map("Userfield7") @db.NVarChar(50) - userfield8 String? @map("Userfield8") @db.NVarChar(50) - userfield9 String? @map("Userfield9") @db.NVarChar(50) - userfield10 String? @map("Userfield10") @db.NVarChar(50) - reportsToName String? @map("Reports_To_Name") @db.NVarChar(101) - assistantName String? @map("Assistant_Name") @db.NVarChar(101) - companyAddressRecId Int? @map("Company_Address_RecID") - personalAddressFlag Boolean @map("Personal_Address_Flag") - addressLine1 String? @map("Address_Line1") @db.NVarChar(50) - addressLine2 String? @map("Address_Line2") @db.NVarChar(50) - city String? @map("City") @db.NVarChar(50) - stateId String? @map("State_ID") @db.NVarChar(50) - zip String? @map("Zip") @db.NVarChar(12) - country String? @map("Country") @db.NVarChar(50) - defaultBillingFlag Boolean @map("Default_Billing_Flag") - exchangeGuid String? @map("exchange_guid") @db.NVarChar(200) - adminFlag Boolean? @map("Admin_Flag") - dateEntered DateTime @map("Date_Entered") @db.DateTime2 - exchangeHref String? @map("Exchange_Href") @db.NVarChar(500) - unsubscribeFlag Boolean @map("Unsubscribe_Flag") - inactiveFlag Boolean? @map("Inactive_Flag") - imageLink String? @map("Image_Link") @db.NVarChar(255) - mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier - sid String? @map("SID") @db.NVarChar(184) - departmentRecId Int? @map("Department_RecID") - lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 - dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 - enteredBy String? @map("Entered_By") @db.NVarChar(15) - defaultPhoneNbr String? @map("Default_PhoneNbr") @db.NVarChar(30) - defaultPhoneExtension String? @map("Default_PhoneExtension") @db.NVarChar(15) - defaultPhoneType String? @map("Default_Phone_Type") @db.NVarChar(30) - coreEntityContactId String? @map("Core_Entity_Contact_ID") @db.NVarChar(36) + contactRecId Int @id @map("Contact_RecID") + companyRecId Int? @map("Company_RecID") + memberId String? @map("Member_ID") @db.NVarChar(15) + companyName String? @map("Company_Name") @db.NVarChar(50) + seqNbr Int? @map("Seq_Nbr") + firstName String? @map("First_Name") @db.NVarChar(50) + lastName String? @map("Last_Name") @db.NVarChar(50) + title String? @map("Title") @db.NVarChar(128) + relationship String? @map("Relationship") @db.NVarChar(50) + defaultFlag Boolean? @map("Default_Flag") + exchangeFlag Boolean? @map("Exchange_Flag") + lastUpdate DateTime @map("Last_Update") @db.DateTime2 + updatedBy String? @map("Updated_By") @db.NVarChar(15) + relationshipRecId Int? @map("Relationship_RecID") + contactStatusRecId Int? @map("Contact_Status_RecID") + gender String? @map("Gender") @db.Char(1) + nickName String? @map("NickName") @db.NVarChar(30) + dateBirth DateTime? @map("Date_Birth") @db.DateTime2 + marriedFlag Boolean @map("Married_Flag") + spouseName String? @map("Spouse_Name") @db.NVarChar(30) + dateAnniversary DateTime? @map("Date_Anniversary") @db.DateTime2 + childrenFlag Boolean @map("Children_Flag") + childrenInfo String? @map("Children_Info") @db.NVarChar(Max) + school String? @map("School") @db.NVarChar(50) + hobbies String? @map("Hobbies") @db.NVarChar(Max) + reportsToRecId Int? @map("Reports_To_RecID") + assistantRecId Int? @map("Assistant_RecID") + userfield1 String? @map("Userfield1") @db.NVarChar(50) + userfield2 String? @map("Userfield2") @db.NVarChar(50) + userfield3 String? @map("Userfield3") @db.NVarChar(50) + userfield4 String? @map("Userfield4") @db.NVarChar(50) + userfield5 String? @map("Userfield5") @db.NVarChar(50) + userfield6 String? @map("Userfield6") @db.NVarChar(50) + userfield7 String? @map("Userfield7") @db.NVarChar(50) + userfield8 String? @map("Userfield8") @db.NVarChar(50) + userfield9 String? @map("Userfield9") @db.NVarChar(50) + userfield10 String? @map("Userfield10") @db.NVarChar(50) + reportsToName String? @map("Reports_To_Name") @db.NVarChar(101) + assistantName String? @map("Assistant_Name") @db.NVarChar(101) + companyAddressRecId Int? @map("Company_Address_RecID") + personalAddressFlag Boolean @map("Personal_Address_Flag") + addressLine1 String? @map("Address_Line1") @db.NVarChar(50) + addressLine2 String? @map("Address_Line2") @db.NVarChar(50) + city String? @map("City") @db.NVarChar(50) + stateId String? @map("State_ID") @db.NVarChar(50) + zip String? @map("Zip") @db.NVarChar(12) + country String? @map("Country") @db.NVarChar(50) + defaultBillingFlag Boolean @map("Default_Billing_Flag") + exchangeGuid String? @map("exchange_guid") @db.NVarChar(200) + adminFlag Boolean? @map("Admin_Flag") + dateEntered DateTime @map("Date_Entered") @db.DateTime2 + exchangeHref String? @map("Exchange_Href") @db.NVarChar(500) + unsubscribeFlag Boolean @map("Unsubscribe_Flag") + inactiveFlag Boolean? @map("Inactive_Flag") + imageLink String? @map("Image_Link") @db.NVarChar(255) + mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier + sid String? @map("SID") @db.NVarChar(184) + departmentRecId Int? @map("Department_RecID") + lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 + enteredBy String? @map("Entered_By") @db.NVarChar(15) + defaultPhoneNbr String? @map("Default_PhoneNbr") @db.NVarChar(30) + defaultPhoneExtension String? @map("Default_PhoneExtension") @db.NVarChar(15) + defaultPhoneType String? @map("Default_Phone_Type") @db.NVarChar(30) + coreEntityContactId String? @map("Core_Entity_Contact_ID") @db.NVarChar(36) lastUpdateUtcCesContact DateTime? @map("Last_Update_UTC_CES_Contact") @db.DateTime2 - updatedByCesContact String? @map("Updated_By_CES_Contact") @db.NVarChar(15) - nonSyncFlag Boolean @map("Non_Sync_Flag") - coreEntityReferenceId String? @map("Core_Entity_Reference_ID") @db.NVarChar(36) - m365ContactSyncFlag Boolean @map("M365_Contact_Sync_Flag") - id String? @map("Id") @db.UniqueIdentifier + updatedByCesContact String? @map("Updated_By_CES_Contact") @db.NVarChar(15) + nonSyncFlag Boolean @map("Non_Sync_Flag") + coreEntityReferenceId String? @map("Core_Entity_Reference_ID") @db.NVarChar(36) + m365ContactSyncFlag Boolean @map("M365_Contact_Sync_Flag") + id String? @map("Id") @db.UniqueIdentifier opportunities Opportunity[] @relation("OpportunityContact") + department Department? @relation("ContactDepartment", fields: [departmentRecId], references: [departmentRecId]) @@map("Contact") @@schema("dbo") } model CompanyAddress { - companyAddressRecId Int @id @map("Company_Address_RecID") - companyRecId Int @map("Company_RecID") - companyName String? @map("Company_Name") @db.NVarChar(50) - addressLine1 String? @map("Address_Line1") @db.NVarChar(50) - addressLine2 String? @map("Address_Line2") @db.NVarChar(50) - city String? @map("City") @db.NVarChar(50) - stateId String? @map("State_ID") @db.NVarChar(50) - zip String? @map("Zip") @db.NVarChar(12) - phoneNbr String? @map("PhoneNbr") @db.NVarChar(30) - phoneNbrFax String? @map("PhoneNbr_Fax") @db.NVarChar(30) - defaultFlag Boolean @map("Default_Flag") - defaultMailFlag Boolean @map("Default_Mail_Flag") - defaultShipFlag Boolean @map("Default_Ship_Flag") - defaultBillFlag Boolean @map("Default_Bill_Flag") - updatedBy String? @map("Updated_By") @db.NVarChar(15) - description String? @map("Description") @db.NVarChar(50) - taxCodeRecId Int? @map("tax_code_recid") - exReimb Decimal? @map("EX_Reimb") @db.Decimal(18, 2) - inactiveFlag Boolean @map("Inactive_Flag") - countryRecId Int? @map("Country_RecID") - officeCalendarRecId Int? @map("Office_Calendar_RecID") - timeZoneRecId Int? @map("Time_Zone_RecID") - lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 - dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 - enteredBy String @map("Entered_By") @db.NVarChar(15) - avaValidatedFlag Boolean @map("Ava_Validated_Flag") - mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier - customerUsageTypeRecId Int? @map("Customer_Usage_Type_RecID") - billSeparateFlag Boolean @map("Bill_Separate_Flag") - coreEntitySiteId String? @map("Core_Entity_Site_ID") @db.NVarChar(36) - lastUpdateUtcCesAddress DateTime @map("Last_Update_UTC_CES_Address") @db.DateTime2 - updatedByCesAddress String @map("Updated_By_CES_Address") @db.NVarChar(15) - lastUpdateUtcCesPhone DateTime @map("Last_Update_UTC_CES_Phone") @db.DateTime2 - updatedByCesPhone String @map("Updated_By_CES_Phone") @db.NVarChar(15) - phoneNbrExt String? @map("PhoneNbrExt") @db.NVarChar(15) + companyAddressRecId Int @id @map("Company_Address_RecID") + companyRecId Int @map("Company_RecID") + companyName String? @map("Company_Name") @db.NVarChar(50) + addressLine1 String? @map("Address_Line1") @db.NVarChar(50) + addressLine2 String? @map("Address_Line2") @db.NVarChar(50) + city String? @map("City") @db.NVarChar(50) + stateId String? @map("State_ID") @db.NVarChar(50) + zip String? @map("Zip") @db.NVarChar(12) + phoneNbr String? @map("PhoneNbr") @db.NVarChar(30) + phoneNbrFax String? @map("PhoneNbr_Fax") @db.NVarChar(30) + defaultFlag Boolean @map("Default_Flag") + defaultMailFlag Boolean @map("Default_Mail_Flag") + defaultShipFlag Boolean @map("Default_Ship_Flag") + defaultBillFlag Boolean @map("Default_Bill_Flag") + updatedBy String? @map("Updated_By") @db.NVarChar(15) + description String? @map("Description") @db.NVarChar(50) + taxCodeRecId Int? @map("tax_code_recid") + exReimb Decimal? @map("EX_Reimb") @db.Decimal(18, 2) + inactiveFlag Boolean @map("Inactive_Flag") + countryRecId Int? @map("Country_RecID") + officeCalendarRecId Int? @map("Office_Calendar_RecID") + timeZoneRecId Int? @map("Time_Zone_RecID") + lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 + enteredBy String @map("Entered_By") @db.NVarChar(15) + avaValidatedFlag Boolean @map("Ava_Validated_Flag") + mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier + customerUsageTypeRecId Int? @map("Customer_Usage_Type_RecID") + billSeparateFlag Boolean @map("Bill_Separate_Flag") + coreEntitySiteId String? @map("Core_Entity_Site_ID") @db.NVarChar(36) + lastUpdateUtcCesAddress DateTime @map("Last_Update_UTC_CES_Address") @db.DateTime2 + updatedByCesAddress String @map("Updated_By_CES_Address") @db.NVarChar(15) + lastUpdateUtcCesPhone DateTime @map("Last_Update_UTC_CES_Phone") @db.DateTime2 + updatedByCesPhone String @map("Updated_By_CES_Phone") @db.NVarChar(15) + phoneNbrExt String? @map("PhoneNbrExt") @db.NVarChar(15) lastUpdateUtcCesSite DateTime? @map("Last_Update_UTC_CES_Site") @db.DateTime - updatedByCesSite String? @map("Updated_By_CES_Site") @db.NVarChar(15) - id String? @map("Id") @db.UniqueIdentifier + updatedByCesSite String? @map("Updated_By_CES_Site") @db.NVarChar(15) + id String? @map("Id") @db.UniqueIdentifier opportunities Opportunity[] @relation("OpportunityAddress") @@ -788,26 +805,26 @@ model TaxCode { } model Currency { - currencyRecId Int @id @map("Currency_RecID") - currencyId String @map("Currency_ID") @db.NVarChar(10) - description String? @map("Description") @db.NVarChar(50) - currencySymbol String? @map("Currency_Symbol") @db.NVarChar(10) - lastUpdate DateTime @map("Last_Update") @db.DateTime2 - updatedBy String? @map("Updated_By") @db.NVarChar(15) - displayIdFlag Boolean @map("DisplayID_Flag") - displaySymbolFlag Boolean @map("DisplaySymbol_Flag") - isoCode String? @map("Iso_Code") @db.NVarChar(3) - lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 - dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 - enteredBy String @map("Entered_By") @db.NVarChar(15) - locale String? @map("Locale") @db.NVarChar(15) - thousandsSeparator String @map("Thousands_Separator") @db.NVarChar(10) - decimalSeparator String @map("Decimal_Separator") @db.NVarChar(10) - useParenthesesFlag Boolean @map("Use_Parentheses_Flag") - numDecimals Int @map("Num_Decimals") @db.TinyInt - rightAlignFlag Boolean @map("Right_Align_Flag") - updatedFlag Boolean @map("Updated_Flag") - id String @map("Id") @db.UniqueIdentifier + currencyRecId Int @id @map("Currency_RecID") + currencyId String @map("Currency_ID") @db.NVarChar(10) + description String? @map("Description") @db.NVarChar(50) + currencySymbol String? @map("Currency_Symbol") @db.NVarChar(10) + lastUpdate DateTime @map("Last_Update") @db.DateTime2 + updatedBy String? @map("Updated_By") @db.NVarChar(15) + displayIdFlag Boolean @map("DisplayID_Flag") + displaySymbolFlag Boolean @map("DisplaySymbol_Flag") + isoCode String? @map("Iso_Code") @db.NVarChar(3) + lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 + enteredBy String @map("Entered_By") @db.NVarChar(15) + locale String? @map("Locale") @db.NVarChar(15) + thousandsSeparator String @map("Thousands_Separator") @db.NVarChar(10) + decimalSeparator String @map("Decimal_Separator") @db.NVarChar(10) + useParenthesesFlag Boolean @map("Use_Parentheses_Flag") + numDecimals Int @map("Num_Decimals") @db.TinyInt + rightAlignFlag Boolean @map("Right_Align_Flag") + updatedFlag Boolean @map("Updated_Flag") + id String @map("Id") @db.UniqueIdentifier opportunities Opportunity[] @@ -851,79 +868,79 @@ model ContractType { } model PmProject { - pmProjectRecId Int @id @map("PM_Project_RecID") - companyRecId Int @map("Company_RecID") - projectId String @map("Project_ID") @db.NVarChar(100) - memberId String @map("Member_ID") @db.NVarChar(15) - notes String? @map("Notes") @db.NVarChar(Max) - dateStart DateTime @map("Date_Start") @db.Date - dateReq DateTime @map("Date_Req") @db.Date - closedBy String? @map("Closed_By") @db.NVarChar(15) - lastUpdate DateTime @map("Last_Update") @db.DateTime2 - updatedBy String? @map("Updated_By") @db.NVarChar(15) - contactRecId Int? @map("contact_recid") - companyAddressRecId Int? @map("company_address_recid") - downpayment Decimal @map("Downpayment") @db.Decimal(18, 2) - billingAmount Decimal @map("Billing_Amount") @db.Decimal(18, 2) - pmBillingMethodId String @map("PM_Billing_Method_ID") @db.Char(1) - billingUnitRecId Int @map("Billing_Unit_RecID") - billableFlag Boolean @map("Billable_Flag") - estRevenue Decimal @map("Est_Revenue") @db.Decimal(18, 2) - billingReference String? @map("Billing_Reference") @db.NVarChar(50) - pmTypeRecId Int? @map("PM_Type_RecID") - pmStatusRecId Int @map("PM_Status_RecID") - ownerLevelRecId Int @map("Owner_Level_RecID") - opportunityRecId Int? @map("Opportunity_RecID") - estHours Decimal? @map("Est_Hours") @db.Decimal(18, 2) - budgetFlag Boolean @map("Budget_Flag") - timeApproverId String? @map("Time_Approver_ID") @db.NVarChar(15) - expApproverId String? @map("Exp_Approver_ID") @db.NVarChar(15) - billingCompanyRecId Int? @map("Billing_Company_RecID") - billingAddressRecId Int? @map("Billing_Address_RecID") - billingContactRecId Int? @map("Billing_Contact_RecID") - billingAttention String? @map("Billing_Attention") @db.NVarChar(50) - expBillableFlag Boolean @map("Exp_Billable_Flag") - poAmount Decimal? @map("PO_Amount") @db.Decimal(18, 2) - restrictDpFlag Boolean @map("restrict_dp_flag") - billCompleteFlag Boolean @map("BillComplete_Flag") - invoiceFlag Boolean @map("Invoice_Flag") - expInvoiceFlag Boolean @map("Exp_Invoice_Flag") - prodInvoiceFlag Boolean @map("Prod_Invoice_Flag") - prodBillableFlag Boolean @map("Prod_Billable_Flag") - overrideFlag Boolean @map("Override_Flag") - agrHeaderRecId Int? @map("AGR_Header_RecID") - agrAmount Decimal @map("AGR_Amount") @db.Decimal(18, 2) - agrMonth Int? @map("AGR_Month") @db.SmallInt - agrYear Int? @map("AGR_Year") @db.SmallInt - billUnAppFlag Boolean @map("BillUnApp_Flag") - srBoardRecId Int @map("SR_Board_RecID") - orderHeaderRecId Int? @map("Order_Header_RecID") - notificationHistory String @map("Notification_History") @db.NVarChar(Max) - portalFlag Boolean @map("Portal_Flag") - billingStartUtc DateTime? @map("Billing_Start_UTC") @db.DateTime2 - estTimeCost Decimal @map("Est_Time_Cost") @db.Decimal(18, 2) - estProductCost Decimal @map("Est_Product_Cost") @db.Decimal(18, 2) - estExpenseCost Decimal @map("Est_Expense_Cost") @db.Decimal(18, 2) - estProductRevenue Decimal @map("Est_Product_Revenue") @db.Decimal(18, 2) - estExpenseRevenue Decimal @map("Est_Expense_Revenue") @db.Decimal(18, 2) - billingRateType String @map("Billing_Rate_Type") @db.NVarChar(15) - budgetAnalysisRecId Int @map("Budget_Analysis_RecID") - lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 - dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 - dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime2 - createdBy String @map("Created_By") @db.NVarChar(20) - showDependencies Boolean @map("Show_Dependencies") - showEstimates Boolean @map("Show_Estimates") - shippingCompanyRecId Int? @map("Shipping_Company_RecID") - shippingAddressRecId Int? @map("Shipping_Address_RecID") - shippingContactRecId Int? @map("Shipping_Contact_RecID") - billingTermsRecId Int? @map("Billing_Terms_RecID") - taxCodeRecId Int? @map("Tax_Code_RecID") - currencyRecId Int @map("Currency_RecID") - percentComplete Decimal? @map("Percent_Complete") @db.Decimal(5, 4) - overridePercentComplete Boolean @map("Override_Percent_Complete") - id String? @map("Id") @db.UniqueIdentifier - billingLogRecId Int? @map("Billing_Log_RecID") + pmProjectRecId Int @id @map("PM_Project_RecID") + companyRecId Int @map("Company_RecID") + projectId String @map("Project_ID") @db.NVarChar(100) + memberId String @map("Member_ID") @db.NVarChar(15) + notes String? @map("Notes") @db.NVarChar(Max) + dateStart DateTime @map("Date_Start") @db.Date + dateReq DateTime @map("Date_Req") @db.Date + closedBy String? @map("Closed_By") @db.NVarChar(15) + lastUpdate DateTime @map("Last_Update") @db.DateTime2 + updatedBy String? @map("Updated_By") @db.NVarChar(15) + contactRecId Int? @map("contact_recid") + companyAddressRecId Int? @map("company_address_recid") + downpayment Decimal @map("Downpayment") @db.Decimal(18, 2) + billingAmount Decimal @map("Billing_Amount") @db.Decimal(18, 2) + pmBillingMethodId String @map("PM_Billing_Method_ID") @db.Char(1) + billingUnitRecId Int @map("Billing_Unit_RecID") + billableFlag Boolean @map("Billable_Flag") + estRevenue Decimal @map("Est_Revenue") @db.Decimal(18, 2) + billingReference String? @map("Billing_Reference") @db.NVarChar(50) + pmTypeRecId Int? @map("PM_Type_RecID") + pmStatusRecId Int @map("PM_Status_RecID") + ownerLevelRecId Int @map("Owner_Level_RecID") + opportunityRecId Int? @map("Opportunity_RecID") + estHours Decimal? @map("Est_Hours") @db.Decimal(18, 2) + budgetFlag Boolean @map("Budget_Flag") + timeApproverId String? @map("Time_Approver_ID") @db.NVarChar(15) + expApproverId String? @map("Exp_Approver_ID") @db.NVarChar(15) + billingCompanyRecId Int? @map("Billing_Company_RecID") + billingAddressRecId Int? @map("Billing_Address_RecID") + billingContactRecId Int? @map("Billing_Contact_RecID") + billingAttention String? @map("Billing_Attention") @db.NVarChar(50) + expBillableFlag Boolean @map("Exp_Billable_Flag") + poAmount Decimal? @map("PO_Amount") @db.Decimal(18, 2) + restrictDpFlag Boolean @map("restrict_dp_flag") + billCompleteFlag Boolean @map("BillComplete_Flag") + invoiceFlag Boolean @map("Invoice_Flag") + expInvoiceFlag Boolean @map("Exp_Invoice_Flag") + prodInvoiceFlag Boolean @map("Prod_Invoice_Flag") + prodBillableFlag Boolean @map("Prod_Billable_Flag") + overrideFlag Boolean @map("Override_Flag") + agrHeaderRecId Int? @map("AGR_Header_RecID") + agrAmount Decimal @map("AGR_Amount") @db.Decimal(18, 2) + agrMonth Int? @map("AGR_Month") @db.SmallInt + agrYear Int? @map("AGR_Year") @db.SmallInt + billUnAppFlag Boolean @map("BillUnApp_Flag") + srBoardRecId Int @map("SR_Board_RecID") + orderHeaderRecId Int? @map("Order_Header_RecID") + notificationHistory String @map("Notification_History") @db.NVarChar(Max) + portalFlag Boolean @map("Portal_Flag") + billingStartUtc DateTime? @map("Billing_Start_UTC") @db.DateTime2 + estTimeCost Decimal @map("Est_Time_Cost") @db.Decimal(18, 2) + estProductCost Decimal @map("Est_Product_Cost") @db.Decimal(18, 2) + estExpenseCost Decimal @map("Est_Expense_Cost") @db.Decimal(18, 2) + estProductRevenue Decimal @map("Est_Product_Revenue") @db.Decimal(18, 2) + estExpenseRevenue Decimal @map("Est_Expense_Revenue") @db.Decimal(18, 2) + billingRateType String @map("Billing_Rate_Type") @db.NVarChar(15) + budgetAnalysisRecId Int @map("Budget_Analysis_RecID") + lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 + dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime2 + createdBy String @map("Created_By") @db.NVarChar(20) + showDependencies Boolean @map("Show_Dependencies") + showEstimates Boolean @map("Show_Estimates") + shippingCompanyRecId Int? @map("Shipping_Company_RecID") + shippingAddressRecId Int? @map("Shipping_Address_RecID") + shippingContactRecId Int? @map("Shipping_Contact_RecID") + billingTermsRecId Int? @map("Billing_Terms_RecID") + taxCodeRecId Int? @map("Tax_Code_RecID") + currencyRecId Int @map("Currency_RecID") + percentComplete Decimal? @map("Percent_Complete") @db.Decimal(5, 4) + overridePercentComplete Boolean @map("Override_Percent_Complete") + id String? @map("Id") @db.UniqueIdentifier + billingLogRecId Int? @map("Billing_Log_RecID") opportunities Opportunity[] @@ -967,75 +984,75 @@ model MarketingCampaign { } model AgrType { - agrTypeRecId Int @id @map("AGR_Type_RecID") - agrTypeDesc String? @map("AGR_Type_Desc") @db.NVarChar(50) - agrInactiveFlag Boolean @map("AGR_Inactive_Flag") - srUrgencyRecId Int? @map("SR_Urgency_RecID") - agrDetailTypeRecId Int? @map("AGR_Detail_Type_RecID") - billCycleRecId Int? @map("Bill_Cycle_RecID") - invoiceDesc String? @map("Invoice_Desc") @db.NVarChar(4000) - updatedBy String? @map("Updated_By") @db.NVarChar(15) - lastUpdate DateTime @map("Last_Update") @db.DateTime2 - billAmount Decimal? @map("Bill_Amount") @db.Decimal(18, 2) - oneTimeFlag Boolean @map("OneTime_Flag") - ownerLevelRecId Int? @map("Owner_Level_RecID") - billingUnitRecId Int? @map("Billing_Unit_RecID") - olRestrictFlag Boolean @map("OL_Restrict_Flag") - buRestrictFlag Boolean @map("BU_Restrict_Flag") - activityClassRecId Int? @map("Activity_Class_RecID") - activityTypeRecId Int? @map("Activity_Type_RecID") - topCommentFlag Boolean @map("TopComment_Flag") - bottomCommentFlag Boolean @map("BottomComment_Flag") - teInvCustFlag Boolean @map("TE_InvCust_Flag") - exInvCustFlag Boolean @map("EX_InvCust_Flag") - ivInvCustFlag Boolean @map("IV_InvCust_Flag") - teBillableFlag Boolean @map("TE_Billable_Flag") - teInvoiceFlag Boolean @map("TE_Invoice_Flag") - exBillableFlag Boolean @map("EX_Billable_Flag") - exInvoiceFlag Boolean @map("EX_Invoice_Flag") - ivBillableFlag Boolean @map("IV_Billable_Flag") - ivInvoiceFlag Boolean @map("IV_Invoice_Flag") - taxableFlag Boolean @map("Taxable_Flag") - teAmount Decimal? @map("TE_Amount") @db.Decimal(18, 2) - agrDefaultFlag Boolean @map("AGR_Default_Flag") - ppAmount Decimal? @map("PP_Amount") @db.Decimal(18, 2) - ppUnlimitedFlag Boolean @map("PP_Unlimited_Flag") - ppOneTimeFlag Boolean @map("PP_One_Time_Flag") - appCycleId String? @map("AppCycle_ID") @db.Char(1) - ppTimeFlag Boolean @map("PP_Time_Flag") - ppExpensesFlag Boolean @map("PP_Expenses_Flag") - ppProductsFlag Boolean @map("PP_Products_Flag") - ppExpireFlag Boolean @map("PP_Expire_Flag") - ppCarryoverFlag Boolean @map("PP_Carryover_Flag") - carryoverDays Int? @map("Carryover_Days") - overrunFlag Boolean @map("Overrun_Flag") - overrunLimit Int? @map("Overrun_Limit") - prepayFlag Boolean @map("Prepay_Flag") - preSufFlag Boolean @map("PreSuf_Flag") - invoicePreSuf String? @map("Invoice_PreSuf") @db.NVarChar(5) - restrictDpFlag Boolean @map("Restrict_DP_Flag") - billingTermsRecId Int? @map("Billing_Terms_RecID") - srSlaRecId Int? @map("SR_SLA_RecID") - chargeFirmFlag Boolean @map("Charge_Firm_Flag") - cycleBasisId String? @map("CycleBasis_ID") @db.Char(1) - ppTaxFlag Boolean @map("PP_Tax_Flag") - pmTypeRecId Int? @map("PM_Type_RecID") - compRateOption String? @map("Comp_Rate_Option") @db.Char(1) - compRateAmount Decimal? @map("Comp_Rate_Amount") @db.Decimal(18, 2) - compLimitOption String? @map("Comp_Limit_Option") @db.Char(1) - compLimitAmount Decimal? @map("Comp_Limit_Amount") @db.Decimal(18, 2) - copyWorkRolesFlag Boolean @map("Copy_Work_Roles_Flag") - copyWorkTypesFlag Boolean @map("Copy_Work_Types_Flag") - prorateFlag Boolean @map("Prorate_Flag") - blInvTemplateSetupRecId Int? @map("BL_InvTemplate_Setup_RecID") - integrationXref String? @map("Integration_Xref") @db.NVarChar(50) - emailTemplateRecId Int? @map("Email_Template_RecID") - lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 - enteredBy String @map("Entered_By") @db.NVarChar(15) - dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 - autoInvoiceFlag Boolean @map("Auto_Invoice_Flag") - invoiceProratedAdditionsFlag Boolean @map("Invoice_Prorated_Additions_Flag") - id String @map("Id") @db.UniqueIdentifier + agrTypeRecId Int @id @map("AGR_Type_RecID") + agrTypeDesc String? @map("AGR_Type_Desc") @db.NVarChar(50) + agrInactiveFlag Boolean @map("AGR_Inactive_Flag") + srUrgencyRecId Int? @map("SR_Urgency_RecID") + agrDetailTypeRecId Int? @map("AGR_Detail_Type_RecID") + billCycleRecId Int? @map("Bill_Cycle_RecID") + invoiceDesc String? @map("Invoice_Desc") @db.NVarChar(4000) + updatedBy String? @map("Updated_By") @db.NVarChar(15) + lastUpdate DateTime @map("Last_Update") @db.DateTime2 + billAmount Decimal? @map("Bill_Amount") @db.Decimal(18, 2) + oneTimeFlag Boolean @map("OneTime_Flag") + ownerLevelRecId Int? @map("Owner_Level_RecID") + billingUnitRecId Int? @map("Billing_Unit_RecID") + olRestrictFlag Boolean @map("OL_Restrict_Flag") + buRestrictFlag Boolean @map("BU_Restrict_Flag") + activityClassRecId Int? @map("Activity_Class_RecID") + activityTypeRecId Int? @map("Activity_Type_RecID") + topCommentFlag Boolean @map("TopComment_Flag") + bottomCommentFlag Boolean @map("BottomComment_Flag") + teInvCustFlag Boolean @map("TE_InvCust_Flag") + exInvCustFlag Boolean @map("EX_InvCust_Flag") + ivInvCustFlag Boolean @map("IV_InvCust_Flag") + teBillableFlag Boolean @map("TE_Billable_Flag") + teInvoiceFlag Boolean @map("TE_Invoice_Flag") + exBillableFlag Boolean @map("EX_Billable_Flag") + exInvoiceFlag Boolean @map("EX_Invoice_Flag") + ivBillableFlag Boolean @map("IV_Billable_Flag") + ivInvoiceFlag Boolean @map("IV_Invoice_Flag") + taxableFlag Boolean @map("Taxable_Flag") + teAmount Decimal? @map("TE_Amount") @db.Decimal(18, 2) + agrDefaultFlag Boolean @map("AGR_Default_Flag") + ppAmount Decimal? @map("PP_Amount") @db.Decimal(18, 2) + ppUnlimitedFlag Boolean @map("PP_Unlimited_Flag") + ppOneTimeFlag Boolean @map("PP_One_Time_Flag") + appCycleId String? @map("AppCycle_ID") @db.Char(1) + ppTimeFlag Boolean @map("PP_Time_Flag") + ppExpensesFlag Boolean @map("PP_Expenses_Flag") + ppProductsFlag Boolean @map("PP_Products_Flag") + ppExpireFlag Boolean @map("PP_Expire_Flag") + ppCarryoverFlag Boolean @map("PP_Carryover_Flag") + carryoverDays Int? @map("Carryover_Days") + overrunFlag Boolean @map("Overrun_Flag") + overrunLimit Int? @map("Overrun_Limit") + prepayFlag Boolean @map("Prepay_Flag") + preSufFlag Boolean @map("PreSuf_Flag") + invoicePreSuf String? @map("Invoice_PreSuf") @db.NVarChar(5) + restrictDpFlag Boolean @map("Restrict_DP_Flag") + billingTermsRecId Int? @map("Billing_Terms_RecID") + srSlaRecId Int? @map("SR_SLA_RecID") + chargeFirmFlag Boolean @map("Charge_Firm_Flag") + cycleBasisId String? @map("CycleBasis_ID") @db.Char(1) + ppTaxFlag Boolean @map("PP_Tax_Flag") + pmTypeRecId Int? @map("PM_Type_RecID") + compRateOption String? @map("Comp_Rate_Option") @db.Char(1) + compRateAmount Decimal? @map("Comp_Rate_Amount") @db.Decimal(18, 2) + compLimitOption String? @map("Comp_Limit_Option") @db.Char(1) + compLimitAmount Decimal? @map("Comp_Limit_Amount") @db.Decimal(18, 2) + copyWorkRolesFlag Boolean @map("Copy_Work_Roles_Flag") + copyWorkTypesFlag Boolean @map("Copy_Work_Types_Flag") + prorateFlag Boolean @map("Prorate_Flag") + blInvTemplateSetupRecId Int? @map("BL_InvTemplate_Setup_RecID") + integrationXref String? @map("Integration_Xref") @db.NVarChar(50) + emailTemplateRecId Int? @map("Email_Template_RecID") + lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + enteredBy String @map("Entered_By") @db.NVarChar(15) + dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2 + autoInvoiceFlag Boolean @map("Auto_Invoice_Flag") + invoiceProratedAdditionsFlag Boolean @map("Invoice_Prorated_Additions_Flag") + id String @map("Id") @db.UniqueIdentifier opportunities Opportunity[] @@ -1044,133 +1061,133 @@ model AgrType { } model SrService { - srServiceRecId Int @id @map("SR_Service_RecID") - srTypeRecId Int? @map("SR_Type_RecID") - srLocationRecId Int? @map("SR_Location_RecID") - srStatusRecId Int @map("SR_Status_RecID") - srSourceRecId Int? @map("SR_Source_RecID") - srUrgencyRecId Int @map("SR_Urgency_RecID") - srTeamRecId Int? @map("SR_Team_RecID") - enteredBy String? @map("Entered_By") @db.NVarChar(15) - enteredNotifyFlag Boolean @map("Entered_Notify_Flag") - dateEntered DateTime? @map("Date_Entered") @db.DateTime - dateReq DateTime? @map("Date_Req") @db.Date - companyRecId Int? @map("Company_RecID") - contactRecId Int? @map("Contact_RecID") - assignedByRecId Int? @map("Assigned_By_RecID") - assignedNotifyFlag Boolean @map("Assigned_Notify_Flag") - billingUnitRecId Int? @map("Billing_Unit_RecID") - redFlag Boolean @map("Red_Flag") - updatedBy String? @map("Updated_By") @db.NVarChar(15) - lastUpdate DateTime? @map("Last_Update") @db.DateTime - addressLine1 String? @map("Address_Line1") @db.NVarChar(50) - addressLine2 String? @map("Address_Line2") @db.NVarChar(50) - city String? @map("City") @db.NVarChar(50) - stateId String? @map("State_ID") @db.NVarChar(50) - zip String? @map("Zip") @db.NVarChar(12) - contactName String? @map("Contact_Name") @db.NVarChar(62) - phoneNbr String? @map("PhoneNbr") @db.NVarChar(20) - extension String? @map("Extension") @db.NVarChar(15) - ownerLevelRecId Int @map("Owner_Level_RecID") - emailAddress String? @map("Email_Address") @db.NVarChar(250) - summary String? @map("Summary") @db.NVarChar(100) - publishFlag Boolean @map("Publish_Flag") - closedBy String? @map("Closed_By") @db.NVarChar(15) - dateClosed DateTime? @map("Date_Closed") @db.DateTime - hoursBudget Decimal? @map("Hours_Budget") @db.Decimal(18, 2) - timeBillableFlag Boolean? @map("Time_Billable_Flag") - timeBillableFlagAlt Boolean? @map("TimeBillable_Flag") - expBillableFlag Boolean? @map("ExpBillable_Flag") - activityClassRecId Int? @map("Activity_Class_RecID") - activityTypeRecId Int? @map("Activity_Type_RecID") - poNumber String? @map("PO_Number") @db.NVarChar(50) - reference String? @map("Reference") @db.NVarChar(50) - billCompleteFlag Boolean? @map("BillComplete_Flag") - billUnappFlag Boolean? @map("BillUnapp_Flag") - billMethod String? @map("Bill_Method") @db.Char(1) - billSrFlag Boolean? @map("BillSR_Flag") - billingAmount Decimal? @map("Billing_Amount") @db.Decimal(18, 2) - companyAddressRecId Int? @map("Company_Address_RecID") - timeInvoiceFlag Boolean? @map("TimeInvoice_Flag") - expInvoiceFlag Boolean? @map("ExpInvoice_Flag") - prodInvoiceFlag Boolean? @map("ProdInvoice_Flag") - prodBillableFlag Boolean? @map("ProdBillable_Flag") - agrHeaderRecId Int? @map("AGR_Header_RecID") - overrideFlag Boolean? @map("Override_Flag") - srBillingMethodId String? @map("SR_Billing_Method_ID") @db.Char(1) - agrAmount Decimal? @map("AGR_Amount") @db.Decimal(18, 2) - agrMonth Int? @map("AGR_Month") @db.SmallInt - agrYear Int? @map("AGR_Year") @db.SmallInt - srSeverityRecId Int? @map("SR_Severity_RecID") - srImpactRecId Int? @map("SR_Impact_RecID") - srBoardRecId Int @map("SR_Board_RecID") - billingCompanyRecId Int? @map("Billing_Company_RecID") - billingAddressRecId Int? @map("Billing_Address_RecID") - externalHoursWorked Decimal? @map("External_Hours_Worked") @db.Decimal(18, 0) - opportunityRecId Int? @map("Opportunity_RecID") - mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier - approvedFlag Boolean @map("Approved_Flag") - externalXref String? @map("External_Xref") @db.NVarChar(100) - siteName String? @map("Site_Name") @db.NVarChar(50) - subDateAccepted DateTime? @map("Sub_Date_Accepted") @db.DateTime - subCompanyName String? @map("Sub_Company_Name") @db.NVarChar(50) - subCompanyRecId Int? @map("Sub_Company_RecID") - subContactName String? @map("Sub_Contact_Name") @db.NVarChar(62) - subContactRecId Int? @map("Sub_Contact_RecID") - subEmailAddress String? @map("Sub_Email_Address") @db.NVarChar(250) - subPhoneNbr String? @map("Sub_PhoneNbr") @db.NVarChar(30) - subExtension String? @map("Sub_Extension") @db.NVarChar(15) - subBillingMethodId String? @map("Sub_Billing_Method_ID") @db.Char(1) - subBillingAmount Decimal? @map("Sub_Billing_Amount") @db.Decimal(18, 2) - subTicketNbr String? @map("Sub_Ticket_Nbr") @db.NVarChar(25) - subOverrideFlag Boolean? @map("Sub_Override_Flag") - rejectedFlag Boolean @map("Rejected_Flag") - dateRejected DateTime? @map("Date_Rejected") @db.DateTime - cnSurveyCompletedFlag Boolean @map("Cn_Survey_Completed_Flag") - pmPhaseRecId Int? @map("PM_Phase_RecID") - wbsCode String? @map("WBS_Code") @db.VarChar(50) - recType String @map("Rec_Type") @db.Char(1) - emailContactFlag Boolean? @map("EmailContact_Flag") - emailResourceFlag Boolean? @map("EmailResource_Flag") - emailCcFlag Boolean? @map("EmailCC_Flag") - emailCc String? @map("EmailCC") @db.NVarChar(4000) - custUpdateFlag String? @map("CustUpdate_Flag") @db.Char(1) - countryRecId Int? @map("Country_RecID") - kbCategoryRecId Int? @map("KB_Category_RecID") - kbSubCategoryRecId Int? @map("KB_SubCategory_RecID") - kbLinkRecId Int? @map("KB_Link_RecID") - kbLinkType String? @map("KB_Link_Type") @db.Char(1) - srSlaRecId Int? @map("SR_SLA_RecID") - orderHeaderRecId Int? @map("Order_Header_RecID") - expBillableFlagAlt Boolean? @map("Exp_Billable_Flag") - srSubTypeRecId Int? @map("SR_SubType_RecID") - dateEnteredUtc DateTime? @map("Date_Entered_UTC") @db.DateTime - lastUpdatedUtc DateTime? @map("Last_Update_UTC") @db.DateTime - dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime - subDateAcceptedUtc DateTime? @map("Sub_Date_Accepted_UTC") @db.DateTime - dateRejectedUtc DateTime? @map("Date_Rejected_UTC") @db.DateTime - srSubTypeItemRecId Int? @map("SR_SubTypeItem_RecID") - restrictDownpaymentFlag Boolean @map("Restrict_Downpayment_Flag") - estStartDateUtc DateTime? @map("Est_Start_Date_UTC") @db.Date - avaValidatedFlag Boolean @map("Ava_Validated_Flag") - ticketOwnerRecId Int? @map("Ticket_Owner_RecID") - billingContactRecId Int? @map("Billing_Contact_RecID") - billingTermsRecId Int? @map("Billing_Terms_RecID") - taxCodeRecId Int? @map("Tax_Code_RecID") - shippingCompanyRecId Int? @map("Shipping_Company_RecID") - shippingAddressRecId Int? @map("Shipping_Address_RecID") - shippingContactRecId Int? @map("Shipping_Contact_RecID") - estTimeRevenue Decimal @map("Est_Time_Revenue") @db.Decimal(18, 2) - estExpenseRevenue Decimal @map("Est_Expense_Revenue") @db.Decimal(18, 2) - estProductRevenue Decimal @map("Est_Product_Revenue") @db.Decimal(18, 2) - estTimeCost Decimal @map("Est_Time_Cost") @db.Decimal(18, 2) - estExpenseCost Decimal @map("Est_Expense_Cost") @db.Decimal(18, 2) - estProductCost Decimal @map("Est_Product_Cost") @db.Decimal(18, 2) - currencyRecId Int @map("Currency_RecID") - srServiceRecIdComputed String? @map("SR_Service_RecID_Computed") @db.NVarChar(10) - isClosedFlag Boolean @map("IsClosed_Flag") - parentRecId Int? @map("Parent_RecID") - latestSentimentScore Decimal? @map("Latest_Sentiment_Score") @db.Decimal(9, 2) + srServiceRecId Int @id @map("SR_Service_RecID") + srTypeRecId Int? @map("SR_Type_RecID") + srLocationRecId Int? @map("SR_Location_RecID") + srStatusRecId Int @map("SR_Status_RecID") + srSourceRecId Int? @map("SR_Source_RecID") + srUrgencyRecId Int @map("SR_Urgency_RecID") + srTeamRecId Int? @map("SR_Team_RecID") + enteredBy String? @map("Entered_By") @db.NVarChar(15) + enteredNotifyFlag Boolean @map("Entered_Notify_Flag") + dateEntered DateTime? @map("Date_Entered") @db.DateTime + dateReq DateTime? @map("Date_Req") @db.Date + companyRecId Int? @map("Company_RecID") + contactRecId Int? @map("Contact_RecID") + assignedByRecId Int? @map("Assigned_By_RecID") + assignedNotifyFlag Boolean @map("Assigned_Notify_Flag") + billingUnitRecId Int? @map("Billing_Unit_RecID") + redFlag Boolean @map("Red_Flag") + updatedBy String? @map("Updated_By") @db.NVarChar(15) + lastUpdate DateTime? @map("Last_Update") @db.DateTime + addressLine1 String? @map("Address_Line1") @db.NVarChar(50) + addressLine2 String? @map("Address_Line2") @db.NVarChar(50) + city String? @map("City") @db.NVarChar(50) + stateId String? @map("State_ID") @db.NVarChar(50) + zip String? @map("Zip") @db.NVarChar(12) + contactName String? @map("Contact_Name") @db.NVarChar(62) + phoneNbr String? @map("PhoneNbr") @db.NVarChar(20) + extension String? @map("Extension") @db.NVarChar(15) + ownerLevelRecId Int @map("Owner_Level_RecID") + emailAddress String? @map("Email_Address") @db.NVarChar(250) + summary String? @map("Summary") @db.NVarChar(100) + publishFlag Boolean @map("Publish_Flag") + closedBy String? @map("Closed_By") @db.NVarChar(15) + dateClosed DateTime? @map("Date_Closed") @db.DateTime + hoursBudget Decimal? @map("Hours_Budget") @db.Decimal(18, 2) + timeBillableFlag Boolean? @map("Time_Billable_Flag") + timeBillableFlagAlt Boolean? @map("TimeBillable_Flag") + expBillableFlag Boolean? @map("ExpBillable_Flag") + activityClassRecId Int? @map("Activity_Class_RecID") + activityTypeRecId Int? @map("Activity_Type_RecID") + poNumber String? @map("PO_Number") @db.NVarChar(50) + reference String? @map("Reference") @db.NVarChar(50) + billCompleteFlag Boolean? @map("BillComplete_Flag") + billUnappFlag Boolean? @map("BillUnapp_Flag") + billMethod String? @map("Bill_Method") @db.Char(1) + billSrFlag Boolean? @map("BillSR_Flag") + billingAmount Decimal? @map("Billing_Amount") @db.Decimal(18, 2) + companyAddressRecId Int? @map("Company_Address_RecID") + timeInvoiceFlag Boolean? @map("TimeInvoice_Flag") + expInvoiceFlag Boolean? @map("ExpInvoice_Flag") + prodInvoiceFlag Boolean? @map("ProdInvoice_Flag") + prodBillableFlag Boolean? @map("ProdBillable_Flag") + agrHeaderRecId Int? @map("AGR_Header_RecID") + overrideFlag Boolean? @map("Override_Flag") + srBillingMethodId String? @map("SR_Billing_Method_ID") @db.Char(1) + agrAmount Decimal? @map("AGR_Amount") @db.Decimal(18, 2) + agrMonth Int? @map("AGR_Month") @db.SmallInt + agrYear Int? @map("AGR_Year") @db.SmallInt + srSeverityRecId Int? @map("SR_Severity_RecID") + srImpactRecId Int? @map("SR_Impact_RecID") + srBoardRecId Int @map("SR_Board_RecID") + billingCompanyRecId Int? @map("Billing_Company_RecID") + billingAddressRecId Int? @map("Billing_Address_RecID") + externalHoursWorked Decimal? @map("External_Hours_Worked") @db.Decimal(18, 0) + opportunityRecId Int? @map("Opportunity_RecID") + mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier + approvedFlag Boolean @map("Approved_Flag") + externalXref String? @map("External_Xref") @db.NVarChar(100) + siteName String? @map("Site_Name") @db.NVarChar(50) + subDateAccepted DateTime? @map("Sub_Date_Accepted") @db.DateTime + subCompanyName String? @map("Sub_Company_Name") @db.NVarChar(50) + subCompanyRecId Int? @map("Sub_Company_RecID") + subContactName String? @map("Sub_Contact_Name") @db.NVarChar(62) + subContactRecId Int? @map("Sub_Contact_RecID") + subEmailAddress String? @map("Sub_Email_Address") @db.NVarChar(250) + subPhoneNbr String? @map("Sub_PhoneNbr") @db.NVarChar(30) + subExtension String? @map("Sub_Extension") @db.NVarChar(15) + subBillingMethodId String? @map("Sub_Billing_Method_ID") @db.Char(1) + subBillingAmount Decimal? @map("Sub_Billing_Amount") @db.Decimal(18, 2) + subTicketNbr String? @map("Sub_Ticket_Nbr") @db.NVarChar(25) + subOverrideFlag Boolean? @map("Sub_Override_Flag") + rejectedFlag Boolean @map("Rejected_Flag") + dateRejected DateTime? @map("Date_Rejected") @db.DateTime + cnSurveyCompletedFlag Boolean @map("Cn_Survey_Completed_Flag") + pmPhaseRecId Int? @map("PM_Phase_RecID") + wbsCode String? @map("WBS_Code") @db.VarChar(50) + recType String @map("Rec_Type") @db.Char(1) + emailContactFlag Boolean? @map("EmailContact_Flag") + emailResourceFlag Boolean? @map("EmailResource_Flag") + emailCcFlag Boolean? @map("EmailCC_Flag") + emailCc String? @map("EmailCC") @db.NVarChar(4000) + custUpdateFlag String? @map("CustUpdate_Flag") @db.Char(1) + countryRecId Int? @map("Country_RecID") + kbCategoryRecId Int? @map("KB_Category_RecID") + kbSubCategoryRecId Int? @map("KB_SubCategory_RecID") + kbLinkRecId Int? @map("KB_Link_RecID") + kbLinkType String? @map("KB_Link_Type") @db.Char(1) + srSlaRecId Int? @map("SR_SLA_RecID") + orderHeaderRecId Int? @map("Order_Header_RecID") + expBillableFlagAlt Boolean? @map("Exp_Billable_Flag") + srSubTypeRecId Int? @map("SR_SubType_RecID") + dateEnteredUtc DateTime? @map("Date_Entered_UTC") @db.DateTime + lastUpdatedUtc DateTime? @map("Last_Update_UTC") @db.DateTime + dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime + subDateAcceptedUtc DateTime? @map("Sub_Date_Accepted_UTC") @db.DateTime + dateRejectedUtc DateTime? @map("Date_Rejected_UTC") @db.DateTime + srSubTypeItemRecId Int? @map("SR_SubTypeItem_RecID") + restrictDownpaymentFlag Boolean @map("Restrict_Downpayment_Flag") + estStartDateUtc DateTime? @map("Est_Start_Date_UTC") @db.Date + avaValidatedFlag Boolean @map("Ava_Validated_Flag") + ticketOwnerRecId Int? @map("Ticket_Owner_RecID") + billingContactRecId Int? @map("Billing_Contact_RecID") + billingTermsRecId Int? @map("Billing_Terms_RecID") + taxCodeRecId Int? @map("Tax_Code_RecID") + shippingCompanyRecId Int? @map("Shipping_Company_RecID") + shippingAddressRecId Int? @map("Shipping_Address_RecID") + shippingContactRecId Int? @map("Shipping_Contact_RecID") + estTimeRevenue Decimal @map("Est_Time_Revenue") @db.Decimal(18, 2) + estExpenseRevenue Decimal @map("Est_Expense_Revenue") @db.Decimal(18, 2) + estProductRevenue Decimal @map("Est_Product_Revenue") @db.Decimal(18, 2) + estTimeCost Decimal @map("Est_Time_Cost") @db.Decimal(18, 2) + estExpenseCost Decimal @map("Est_Expense_Cost") @db.Decimal(18, 2) + estProductCost Decimal @map("Est_Product_Cost") @db.Decimal(18, 2) + currencyRecId Int @map("Currency_RecID") + srServiceRecIdComputed String? @map("SR_Service_RecID_Computed") @db.NVarChar(10) + isClosedFlag Boolean @map("IsClosed_Flag") + parentRecId Int? @map("Parent_RecID") + latestSentimentScore Decimal? @map("Latest_Sentiment_Score") @db.Decimal(9, 2) opportunities Opportunity[] @@ -1228,17 +1245,17 @@ model SoActivity { } model SoNote { - soNotesRecId Int @id @map("SO_Notes_RecID") - opportunityRecId Int? @map("Opportunity_RecID") - seqNbr Int? @map("Seq_Nbr") - noteTypeRecId Int? @map("Note_Type_RecID") - notes String? @map("Notes") @db.NVarChar(Max) - soFlag Boolean @map("SO_Flag") - enteredBy String? @map("Entered_By") @db.NVarChar(15) - lastUpdate DateTime @map("Last_Update") @db.DateTime2 - updatedBy String? @map("Updated_By") @db.NVarChar(15) - mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier - lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + soNotesRecId Int @id @map("SO_Notes_RecID") + opportunityRecId Int? @map("Opportunity_RecID") + seqNbr Int? @map("Seq_Nbr") + noteTypeRecId Int? @map("Note_Type_RecID") + notes String? @map("Notes") @db.NVarChar(Max) + soFlag Boolean @map("SO_Flag") + enteredBy String? @map("Entered_By") @db.NVarChar(15) + lastUpdate DateTime @map("Last_Update") @db.DateTime2 + updatedBy String? @map("Updated_By") @db.NVarChar(15) + mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier + lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2 opportunity Opportunity? @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction) @@ -1247,29 +1264,29 @@ model SoNote { } model SoForecastDtl { - soForecastDtlRecId Int @id @map("SO_Forecast_Dtl_RecID") - opportunityRecId Int @map("Opportunity_RecID") - description String? @map("Description") @db.NVarChar(50) - revenue Decimal? @map("Revenue") @db.Decimal(18, 2) - cost Decimal? @map("Cost") @db.Decimal(18, 2) - soOppStatusRecId Int? @map("SO_Opp_Status_RecID") - includeFlag Boolean @map("Include_Flag") - quoteWerksDocNo String? @map("QuoteWerks_DocNO") @db.NVarChar(20) - quoteWerksDocName String? @map("QuoteWerks_DocName") @db.NVarChar(255) - updatedBy String? @map("Updated_By") @db.NVarChar(15) - lastUpdate DateTime @map("Last_Update") @db.DateTime2 - soForecastTypeId String? @map("SO_Forecast_Type_ID") @db.NVarChar(2) - linkFlag Boolean @map("Link_Flag") - recurringRevenue Decimal? @map("Recurring_Revenue") @db.Decimal(18, 2) - recurringCost Decimal? @map("Recurring_Cost") @db.Decimal(18, 2) - recurringDateStart DateTime? @map("Recurring_Date_Start") @db.DateTime2 - recurringDateEnd DateTime? @map("Recurring_Date_End") @db.DateTime2 - billCycleRecId Int? @map("Bill_Cycle_RecID") - cycleBasisId String? @map("Cycle_Basis_ID") @db.Char(1) - recurringFlag Boolean @map("Recurring_Flag") - productFlag Boolean @map("Product_Flag") - mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier - lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2 + soForecastDtlRecId Int @id @map("SO_Forecast_Dtl_RecID") + opportunityRecId Int @map("Opportunity_RecID") + description String? @map("Description") @db.NVarChar(50) + revenue Decimal? @map("Revenue") @db.Decimal(18, 2) + cost Decimal? @map("Cost") @db.Decimal(18, 2) + soOppStatusRecId Int? @map("SO_Opp_Status_RecID") + includeFlag Boolean @map("Include_Flag") + quoteWerksDocNo String? @map("QuoteWerks_DocNO") @db.NVarChar(20) + quoteWerksDocName String? @map("QuoteWerks_DocName") @db.NVarChar(255) + updatedBy String? @map("Updated_By") @db.NVarChar(15) + lastUpdate DateTime @map("Last_Update") @db.DateTime2 + soForecastTypeId String? @map("SO_Forecast_Type_ID") @db.NVarChar(2) + linkFlag Boolean @map("Link_Flag") + recurringRevenue Decimal? @map("Recurring_Revenue") @db.Decimal(18, 2) + recurringCost Decimal? @map("Recurring_Cost") @db.Decimal(18, 2) + recurringDateStart DateTime? @map("Recurring_Date_Start") @db.DateTime2 + recurringDateEnd DateTime? @map("Recurring_Date_End") @db.DateTime2 + billCycleRecId Int? @map("Bill_Cycle_RecID") + cycleBasisId String? @map("Cycle_Basis_ID") @db.Char(1) + recurringFlag Boolean @map("Recurring_Flag") + productFlag Boolean @map("Product_Flag") + mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier + lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2 opportunity Opportunity @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction) diff --git a/dalpuri/src/index.ts b/dalpuri/src/index.ts index ae1b316..e69de29 100644 --- a/dalpuri/src/index.ts +++ b/dalpuri/src/index.ts @@ -1,3 +0,0 @@ -import { startServer } from "./api/server"; - -startServer(); diff --git a/dalpuri/src/translations/company.ts b/dalpuri/src/translations/company.ts new file mode 100644 index 0000000..3d690dd --- /dev/null +++ b/dalpuri/src/translations/company.ts @@ -0,0 +1,7 @@ +import { Company as CwCompany } from "../../generated/prisma/client"; +import { Company as ApiCompany } from "../../../api/generated/prisma/client"; +import { Translation } from "./types"; + +const companyTranslation: Translation = { + values: [{ from: "" }], +}; diff --git a/dalpuri/src/translations/types.ts b/dalpuri/src/translations/types.ts new file mode 100644 index 0000000..fc7cb88 --- /dev/null +++ b/dalpuri/src/translations/types.ts @@ -0,0 +1,18 @@ +/** + * kF - keys From + * kT - keys To + */ +export type TranslationEntry = { + from: keyof kF; + to: keyof kT; +} & (kF extends kT + ? { + process?: (value: kF[keyof kF]) => kT[keyof kT]; + } + : { + process: (value: kF[keyof kF]) => kT[keyof kT]; + }); + +export interface Translation { + values: TranslationEntry[]; +} diff --git a/dalpuri/temp-export-opportunities.ts b/dalpuri/temp-export-opportunities.ts index 5b0151f..1471ea5 100644 --- a/dalpuri/temp-export-opportunities.ts +++ b/dalpuri/temp-export-opportunities.ts @@ -1,4 +1,4 @@ -import fetchOpportunities from "./src/collectors/fetchOpportunities"; +import fetchOpportunities from "./old-src/collectors/fetchOpportunities"; fetchOpportunities({ include: [ @@ -13,7 +13,7 @@ fetchOpportunities({ const { writeFileSync } = require("fs"); writeFileSync("examples/opportunity-with-relations.json", jsonData); console.log( - `Exported ${opportunities.length} opportunities to examples/opportunity-with-relations.json`, + `Exported ${opportunities.length} opportunities to examples/opportunity-with-relations.json` ); process.exit(0); });