3660 lines
279 KiB
Plaintext
3660 lines
279 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = "postgresql://postgres:password@10.10.2.14:5432/postgres?schema=public"
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_books {
|
|
country String @db.VarChar
|
|
branch_type Int @default(0) @db.SmallInt
|
|
company_id Int
|
|
company_uu_id String @db.VarChar
|
|
branch_id Int
|
|
branch_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_books_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
companies_account_books_branch_idTocompanies companies @relation("account_books_branch_idTocompanies", fields: [branch_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_account_books_company_idTocompanies companies @relation("account_books_company_idTocompanies", fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
account_detail account_detail[]
|
|
account_master account_master[]
|
|
|
|
@@index([company_id, expiry_starts], map: "account_companies_book_ndx_00")
|
|
@@index([created_at], map: "ix_account_books_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_books_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_books_ref_id")
|
|
@@index([ref_int], map: "ix_account_books_ref_int")
|
|
@@index([updated_at], map: "ix_account_books_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_code_parser {
|
|
account_code_1 String @db.VarChar
|
|
account_code_2 String @db.VarChar
|
|
account_code_3 String @db.VarChar
|
|
account_code_4 String @default("") @db.VarChar
|
|
account_code_5 String @default("") @db.VarChar
|
|
account_code_6 String @default("") @db.VarChar
|
|
account_code_id Int
|
|
account_code_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_code_parser_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_codes account_codes @relation(fields: [account_code_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([account_code_id], map: "_account_code_parser_ndx_00")
|
|
@@index([created_at], map: "ix_account_code_parser_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_code_parser_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_code_parser_ref_id")
|
|
@@index([ref_int], map: "ix_account_code_parser_ref_int")
|
|
@@index([updated_at], map: "ix_account_code_parser_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_codes {
|
|
account_code String @db.VarChar(48)
|
|
comment_line String @db.VarChar(128)
|
|
is_receive_or_debit Boolean
|
|
product_id Int @default(0)
|
|
nvi_id String @default("") @db.VarChar(48)
|
|
status_id Int @default(0) @db.SmallInt
|
|
account_code_seperator String @default(".") @db.VarChar(1)
|
|
system_id Int @default(0) @db.SmallInt
|
|
locked Int @default(0) @db.SmallInt
|
|
company_id Int
|
|
company_uu_id String @db.VarChar
|
|
customer_id Int
|
|
customer_uu_id String @db.VarChar
|
|
person_id Int
|
|
person_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_codes_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_code_parser account_code_parser[]
|
|
companies_account_codes_company_idTocompanies companies @relation("account_codes_company_idTocompanies", fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_account_codes_customer_idTocompanies companies @relation("account_codes_customer_idTocompanies", fields: [customer_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people people @relation(fields: [person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
account_detail account_detail[]
|
|
|
|
@@index([created_at], map: "ix_account_codes_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_codes_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_codes_ref_id")
|
|
@@index([ref_int], map: "ix_account_codes_ref_int")
|
|
@@index([updated_at], map: "ix_account_codes_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_delay_interest {
|
|
interest_turn String @default("akdi") @db.VarChar(10)
|
|
interest_rate Decimal @default(0) @db.Decimal(10, 2)
|
|
delay_day Int @default(0)
|
|
daily_rate Decimal @default(0) @db.Decimal(20, 6)
|
|
interest Decimal @default(0) @db.Decimal(20, 6)
|
|
bsmv Decimal @default(0) @db.Decimal(20, 6)
|
|
kkdf Decimal @default(0) @db.Decimal(20, 6)
|
|
total Decimal @default(0) @db.Decimal(20, 6)
|
|
account_record_bank_date DateTime? @db.Timestamptz(6)
|
|
book_payment_process_date DateTime? @db.Timestamptz(6)
|
|
debt Decimal @db.Decimal(20, 6)
|
|
approving_at DateTime? @db.Timestamptz(6)
|
|
approved_record Boolean @default(false)
|
|
approving_person_id Int?
|
|
approving_person_uu_id String? @db.VarChar
|
|
account_records_id Int
|
|
account_records_uu_id String @db.VarChar(100)
|
|
build_decision_book_payment_id Int
|
|
build_decision_book_payment_uu_id String? @db.VarChar(100)
|
|
new_build_decision_book_payment_id Int?
|
|
new_build_decision_book_payment_uu_id String? @db.VarChar
|
|
ref_int Int?
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_delay_interest_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
bank_resp_company_id Int?
|
|
bank_resp_company_uu_id String? @db.VarChar
|
|
account_records account_records @relation(fields: [account_records_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_payments build_decision_book_payments @relation(fields: [build_decision_book_payment_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([account_records_id, build_decision_book_payment_id], map: "_account_delay_interest_ndx_00")
|
|
@@index([created_at], map: "ix_account_delay_interest_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_delay_interest_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_delay_interest_ref_id")
|
|
@@index([ref_int], map: "ix_account_delay_interest_ref_int")
|
|
@@index([updated_at], map: "ix_account_delay_interest_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_detail {
|
|
doc_date DateTime @db.Timestamptz(6)
|
|
line_no Int @db.SmallInt
|
|
receive_debit String @db.VarChar(1)
|
|
debit Decimal @db.Decimal(20, 6)
|
|
department String @default("") @db.VarChar(24)
|
|
special_code String @default("") @db.VarChar(12)
|
|
account_ref Int @default(0)
|
|
account_fiche_ref Int @default(0)
|
|
center_ref Int @default(0)
|
|
general_code String @default("") @db.VarChar(32)
|
|
credit Decimal @default(0) @db.Decimal(20, 6)
|
|
currency_type String @default("TL") @db.VarChar(4)
|
|
exchange_rate Decimal @default(0) @db.Decimal(20, 6)
|
|
debit_cur Decimal @default(0) @db.Decimal(20, 6)
|
|
credit_cur Decimal @default(0) @db.Decimal(20, 6)
|
|
discount_cur Decimal @default(0) @db.Decimal(20, 6)
|
|
amount Decimal @default(0) @db.Decimal(20, 6)
|
|
cross_account_code String @default("") @db.VarChar(32)
|
|
inf_index Decimal @default(0) @db.Decimal(20, 6)
|
|
not_inflated Int @default(0) @db.SmallInt
|
|
not_calculated Int @default(0) @db.SmallInt
|
|
comment_line1 String @default("") @db.VarChar(64)
|
|
comment_line2 String @default("") @db.VarChar(64)
|
|
comment_line3 String @default("") @db.VarChar(64)
|
|
comment_line4 String @default("") @db.VarChar(64)
|
|
comment_line5 String @default("") @db.VarChar(64)
|
|
comment_line6 String @default("") @db.VarChar(64)
|
|
owner_acc_ref Int @default(0)
|
|
from_where Int @default(0)
|
|
orj_eid Int @default(0)
|
|
canceled Int @default(0) @db.SmallInt
|
|
cross_ref Int @default(0)
|
|
data_center_id String @default("") @db.VarChar
|
|
data_center_rec_num Int @default(0)
|
|
status_id Int @default(0) @db.SmallInt
|
|
plug_type_id Int?
|
|
plug_type_uu_id String @db.VarChar
|
|
account_header_id Int
|
|
account_header_uu_id String @db.VarChar
|
|
account_code_id Int
|
|
account_code_uu_id String @db.VarChar
|
|
account_master_id Int
|
|
account_master_uu_id String @db.VarChar
|
|
project_id Int
|
|
project_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_detail_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_codes account_codes @relation(fields: [account_code_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
account_books account_books @relation(fields: [account_header_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
account_master account_master @relation(fields: [account_master_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown api_enum_dropdown? @relation(fields: [plug_type_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_projects build_decision_book_projects @relation(fields: [project_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([account_master_id, doc_date, line_no, account_header_id], map: "_account_detail_ndx_00")
|
|
@@index([created_at], map: "ix_account_detail_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_detail_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_detail_ref_id")
|
|
@@index([ref_int], map: "ix_account_detail_ref_int")
|
|
@@index([updated_at], map: "ix_account_detail_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_master {
|
|
doc_date DateTime @db.Timestamptz(6)
|
|
plug_type String @db.VarChar
|
|
plug_number Int
|
|
special_code String @default("") @db.VarChar(12)
|
|
authorization_code String @default("") @db.VarChar(12)
|
|
doc_code String @default("") @db.VarChar(12)
|
|
doc_type Int @default(0) @db.SmallInt
|
|
comment_line1 String @default("") @db.VarChar
|
|
comment_line2 String @default("") @db.VarChar
|
|
comment_line3 String @default("") @db.VarChar
|
|
comment_line4 String @default("") @db.VarChar
|
|
comment_line5 String @default("") @db.VarChar
|
|
comment_line6 String @default("") @db.VarChar
|
|
project_code String @default("") @db.VarChar(12)
|
|
module_no String @default("") @db.VarChar
|
|
journal_no Int @default(0)
|
|
status_id Int @default(0) @db.SmallInt
|
|
canceled Boolean @default(false)
|
|
print_count Int @default(0) @db.SmallInt
|
|
total_active Decimal @default(0) @db.Decimal(20, 6)
|
|
total_passive Decimal @default(0) @db.Decimal(20, 6)
|
|
total_active_1 Decimal @default(0) @db.Decimal(20, 6)
|
|
total_passive_1 Decimal @default(0) @db.Decimal(20, 6)
|
|
total_active_2 Decimal @default(0) @db.Decimal(20, 6)
|
|
total_passive_2 Decimal @default(0) @db.Decimal(20, 6)
|
|
total_active_3 Decimal @default(0) @db.Decimal(20, 6)
|
|
total_passive_3 Decimal @default(0) @db.Decimal(20, 6)
|
|
total_active_4 Decimal @default(0) @db.Decimal(20, 6)
|
|
total_passive_4 Decimal @default(0) @db.Decimal(20, 6)
|
|
cross_ref Int @default(0)
|
|
data_center_id String @default("") @db.VarChar
|
|
data_center_rec_num Int @default(0)
|
|
account_header_id Int
|
|
account_header_uu_id String @db.VarChar
|
|
project_item_id Int
|
|
project_item_uu_id String @db.VarChar
|
|
department_id Int
|
|
department_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_master_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_detail account_detail[]
|
|
account_books account_books @relation(fields: [account_header_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
departments departments @relation(fields: [department_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_projects build_decision_book_projects @relation(fields: [project_item_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([doc_date, account_header_id], map: "_account_master_ndx_00")
|
|
@@index([created_at], map: "ix_account_master_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_master_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_master_ref_id")
|
|
@@index([ref_int], map: "ix_account_master_ref_int")
|
|
@@index([updated_at], map: "ix_account_master_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_record_exchanges {
|
|
are_currency String @db.VarChar(5)
|
|
are_exchange_rate Decimal @default(1) @db.Decimal(18, 6)
|
|
usd_exchange_rate_value Decimal? @default(0) @db.Decimal(18, 6)
|
|
eur_exchange_rate_value Decimal? @default(0) @db.Decimal(18, 6)
|
|
gbp_exchange_rate_value Decimal? @default(0) @db.Decimal(18, 6)
|
|
cny_exchange_rate_value Decimal? @default(0) @db.Decimal(18, 6)
|
|
account_records_id Int
|
|
account_records_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_record_exchanges_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_records account_records @relation(fields: [account_records_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([account_records_id], map: "_account_record_exchanges_ndx_00")
|
|
@@index([created_at], map: "ix_account_record_exchanges_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_record_exchanges_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_record_exchanges_ref_id")
|
|
@@index([ref_int], map: "ix_account_record_exchanges_ref_int")
|
|
@@index([updated_at], map: "ix_account_record_exchanges_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_records {
|
|
iban String @db.VarChar(64)
|
|
bank_date DateTime @db.Timestamptz(6)
|
|
currency_value Decimal @db.Decimal(20, 6)
|
|
bank_balance Decimal @db.Decimal(20, 6)
|
|
currency String @db.VarChar(5)
|
|
additional_balance Decimal @db.Decimal(20, 6)
|
|
channel_branch String @db.VarChar(120)
|
|
process_name String @db.VarChar
|
|
process_type String @db.VarChar
|
|
process_comment String @db.VarChar
|
|
process_garbage String? @db.VarChar
|
|
bank_reference_code String @db.VarChar
|
|
add_comment_note String @default("") @db.VarChar
|
|
is_receipt_mail_send Boolean @default(false)
|
|
found_from String? @default("") @db.VarChar
|
|
similarity Decimal @default(0) @db.Decimal(20, 6)
|
|
remainder_balance Decimal @default(0) @db.Decimal(20, 6)
|
|
bank_date_y Int
|
|
bank_date_m Int @db.SmallInt
|
|
bank_date_w Int @db.SmallInt
|
|
bank_date_d Int @db.SmallInt
|
|
approving_accounting_record Boolean @default(false)
|
|
accounting_receipt_date DateTime @default(dbgenerated("'1900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
accounting_receipt_number Int @default(0)
|
|
status_id Int @default(0) @db.SmallInt
|
|
approved_record Boolean @default(false)
|
|
is_predicted Boolean @default(false)
|
|
import_file_name String? @db.VarChar
|
|
receive_debit Int?
|
|
receive_debit_uu_id String? @db.VarChar
|
|
budget_type Int?
|
|
budget_type_uu_id String? @db.VarChar
|
|
company_id Int?
|
|
company_uu_id String? @db.VarChar
|
|
send_company_id Int?
|
|
send_company_uu_id String? @db.VarChar
|
|
send_person_id Int?
|
|
send_person_uu_id String? @db.VarChar
|
|
approving_accounting_person Int?
|
|
approving_accounting_person_uu_id String? @db.VarChar
|
|
living_space_id Int?
|
|
living_space_uu_id String? @db.VarChar
|
|
customer_id Int?
|
|
customer_uu_id String? @db.VarChar
|
|
build_id Int?
|
|
build_uu_id String? @db.VarChar
|
|
build_parts_id Int?
|
|
build_parts_uu_id String? @db.VarChar
|
|
build_decision_book_id Int?
|
|
build_decision_book_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_records_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
payment_result_type Int?
|
|
payment_result_type_uu_id String? @db.VarChar
|
|
is_commission_applied Boolean @default(false)
|
|
account_delay_interest account_delay_interest[]
|
|
account_record_exchanges account_record_exchanges[]
|
|
people_account_records_approving_accounting_personTopeople people? @relation("account_records_approving_accounting_personTopeople", fields: [approving_accounting_person], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown_account_records_budget_typeToapi_enum_dropdown api_enum_dropdown? @relation("account_records_budget_typeToapi_enum_dropdown", fields: [budget_type], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book build_decision_book? @relation(fields: [build_decision_book_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build build? @relation(fields: [build_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_parts build_parts? @relation(fields: [build_parts_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_account_records_company_idTocompanies companies? @relation("account_records_company_idTocompanies", fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people_account_records_customer_idTopeople people? @relation("account_records_customer_idTopeople", fields: [customer_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_living_space build_living_space? @relation(fields: [living_space_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown_account_records_payment_result_typeToapi_enum_dropdown api_enum_dropdown? @relation("account_records_payment_result_typeToapi_enum_dropdown", fields: [payment_result_type], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown_account_records_receive_debitToapi_enum_dropdown api_enum_dropdown? @relation("account_records_receive_debitToapi_enum_dropdown", fields: [receive_debit], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_account_records_send_company_idTocompanies companies? @relation("account_records_send_company_idTocompanies", fields: [send_company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people_account_records_send_person_idTopeople people? @relation("account_records_send_person_idTopeople", fields: [send_person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
account_records_model_train account_records_model_train[]
|
|
account_records_predict account_records_predict[]
|
|
build_decision_book_payments build_decision_book_payments[]
|
|
|
|
@@unique([iban, bank_date, bank_reference_code, bank_balance], map: "_budget_records_ndx_01")
|
|
@@index([is_receipt_mail_send, bank_date], map: "_budget_records_ndx_00")
|
|
@@index([status_id, bank_date], map: "_budget_records_ndx_02")
|
|
@@index([created_at], map: "ix_account_records_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_records_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_records_ref_id")
|
|
@@index([ref_int], map: "ix_account_records_ref_int")
|
|
@@index([updated_at], map: "ix_account_records_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_records_model_train {
|
|
start_index Int
|
|
end_index Int
|
|
search_text String @db.VarChar
|
|
category_id Int
|
|
category_uu_id String @db.VarChar(100)
|
|
account_records_id Int
|
|
account_records_uu_id String @db.VarChar(100)
|
|
ref_int Int?
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_records_model_train_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
is_model_trained Boolean @default(false)
|
|
trained_at DateTime? @db.Timestamptz(6)
|
|
account_records account_records @relation(fields: [account_records_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown api_enum_dropdown @relation(fields: [category_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_account_records_model_train_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_records_model_train_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_records_model_train_ref_id")
|
|
@@index([ref_int], map: "ix_account_records_model_train_ref_int")
|
|
@@index([updated_at], map: "ix_account_records_model_train_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model account_records_predict {
|
|
account_records_id Int
|
|
account_records_uu_id String @db.VarChar(100)
|
|
prediction_result String
|
|
treshold Decimal? @db.Decimal(18, 6)
|
|
is_first_prediction Boolean @default(false)
|
|
is_approved Boolean @default(false)
|
|
approved_at DateTime? @db.Timestamptz(6)
|
|
ref_int Int?
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_account_records_predict_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
prediction_model String @db.VarChar
|
|
prediction_field String @default("") @db.VarChar
|
|
account_records account_records @relation(fields: [account_records_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_account_records_predict_created_at")
|
|
@@index([cryp_uu_id], map: "ix_account_records_predict_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_account_records_predict_ref_id")
|
|
@@index([ref_int], map: "ix_account_records_predict_ref_int")
|
|
@@index([updated_at], map: "ix_account_records_predict_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model address_city {
|
|
city_code String @db.VarChar(24)
|
|
city_name String @db.VarChar
|
|
licence_plate String? @db.VarChar(24)
|
|
phone_code String? @db.VarChar(36)
|
|
gov_code String? @db.VarChar(128)
|
|
address_geographic_id BigInt?
|
|
state_id Int
|
|
state_uu_id String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_address_city_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
address_state address_state @relation(fields: [state_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
address_district address_district[]
|
|
|
|
@@unique([state_id, city_code], map: "_address_city_ndx_01")
|
|
@@index([created_at], map: "ix_address_city_created_at")
|
|
@@index([cryp_uu_id], map: "ix_address_city_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_address_city_ref_id")
|
|
@@index([ref_int], map: "ix_address_city_ref_int")
|
|
@@index([updated_at], map: "ix_address_city_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model address_country {
|
|
country_code String @unique(map: "_address_country_ndx_01") @db.VarChar(16)
|
|
country_name String @db.VarChar
|
|
money_code String? @db.VarChar(12)
|
|
language String? @db.VarChar
|
|
address_geographic_id BigInt?
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_address_country_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
address_state address_state[]
|
|
|
|
@@index([money_code], map: "_address_country_ndx_00")
|
|
@@index([created_at], map: "ix_address_country_created_at")
|
|
@@index([cryp_uu_id], map: "ix_address_country_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_address_country_ref_id")
|
|
@@index([ref_int], map: "ix_address_country_ref_int")
|
|
@@index([updated_at], map: "ix_address_country_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model address_district {
|
|
district_code String @db.VarChar(16)
|
|
district_name String @db.VarChar
|
|
phone_code String? @db.VarChar(36)
|
|
gov_code String? @db.VarChar(128)
|
|
address_geographic_id BigInt?
|
|
city_id Int
|
|
city_uu_id String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_address_district_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
address_city address_city @relation(fields: [city_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
address_locality address_locality[]
|
|
address_neighborhood address_neighborhood[]
|
|
|
|
@@unique([city_id, district_code], map: "_address_district_ndx_01")
|
|
@@index([created_at], map: "ix_address_district_created_at")
|
|
@@index([cryp_uu_id], map: "ix_address_district_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_address_district_ref_id")
|
|
@@index([ref_int], map: "ix_address_district_ref_int")
|
|
@@index([updated_at], map: "ix_address_district_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model address_geographic_locations {
|
|
geo_table String @db.VarChar
|
|
geo_id Int
|
|
geo_name String @db.VarChar
|
|
geo_latitude Decimal @default(0) @db.Decimal(20, 6)
|
|
geo_longitude Decimal @default(0) @db.Decimal(20, 6)
|
|
geo_altitude Decimal @default(0) @db.Decimal(20, 6)
|
|
geo_description String
|
|
geo_area_size Decimal? @default(0) @db.Decimal(20, 2)
|
|
geo_population BigInt?
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_address_geographic_locations_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
|
|
@@index([geo_table, geo_id], map: "_address_geographic_locations_ndx_00")
|
|
@@index([geo_latitude, geo_longitude], map: "_address_geographic_locations_ndx_01")
|
|
@@index([created_at], map: "ix_address_geographic_locations_created_at")
|
|
@@index([cryp_uu_id], map: "ix_address_geographic_locations_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_address_geographic_locations_ref_id")
|
|
@@index([ref_int], map: "ix_address_geographic_locations_ref_int")
|
|
@@index([updated_at], map: "ix_address_geographic_locations_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model address_locality {
|
|
locality_code String @db.VarChar(16)
|
|
locality_name String @db.VarChar
|
|
type_code String? @db.VarChar
|
|
type_description String? @db.VarChar
|
|
gov_code String? @db.VarChar(128)
|
|
address_show Boolean @default(true)
|
|
address_geographic_id BigInt?
|
|
district_id Int
|
|
district_uu_id String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_address_locality_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
address_district address_district @relation(fields: [district_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
address_neighborhood address_neighborhood[]
|
|
|
|
@@unique([district_id, locality_code], map: "_address_locality_ndx_01")
|
|
@@index([created_at], map: "ix_address_locality_created_at")
|
|
@@index([cryp_uu_id], map: "ix_address_locality_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_address_locality_ref_id")
|
|
@@index([ref_int], map: "ix_address_locality_ref_int")
|
|
@@index([updated_at], map: "ix_address_locality_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model address_neighborhood {
|
|
neighborhood_code String @db.VarChar(16)
|
|
neighborhood_name String @db.VarChar
|
|
type_code String? @db.VarChar
|
|
type_description String? @db.VarChar
|
|
gov_code String? @db.VarChar(128)
|
|
address_show Boolean @default(true)
|
|
address_geographic_id BigInt?
|
|
district_id Int?
|
|
district_uu_id String @default("") @db.VarChar
|
|
locality_id Int?
|
|
locality_uu_id String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_address_neighborhood_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
address_district address_district? @relation(fields: [district_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
address_locality address_locality? @relation(fields: [locality_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
address_street address_street[]
|
|
|
|
@@unique([locality_id, neighborhood_code], map: "_address_neighborhood_ndx_01")
|
|
@@index([created_at], map: "ix_address_neighborhood_created_at")
|
|
@@index([cryp_uu_id], map: "ix_address_neighborhood_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_address_neighborhood_ref_id")
|
|
@@index([ref_int], map: "ix_address_neighborhood_ref_int")
|
|
@@index([updated_at], map: "ix_address_neighborhood_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model address_postcode {
|
|
street_id Int
|
|
street_uu_id String @default("") @db.VarChar
|
|
postcode String @db.VarChar(32)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_address_postcode_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
address_street address_street @relation(fields: [street_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
relationship_employee2postcode relationship_employee2postcode[]
|
|
|
|
@@index([created_at], map: "ix_address_postcode_created_at")
|
|
@@index([cryp_uu_id], map: "ix_address_postcode_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_address_postcode_ref_id")
|
|
@@index([ref_int], map: "ix_address_postcode_ref_int")
|
|
@@index([updated_at], map: "ix_address_postcode_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model address_state {
|
|
state_code String @db.VarChar(16)
|
|
state_name String @db.VarChar
|
|
licence_plate String? @db.VarChar(24)
|
|
phone_code String? @db.VarChar(36)
|
|
gov_code String? @db.VarChar(128)
|
|
address_geographic_id BigInt?
|
|
country_id Int
|
|
country_uu_id String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_address_state_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
address_city address_city[]
|
|
address_country address_country @relation(fields: [country_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([country_id, state_code], map: "_address_state_ndx_01")
|
|
@@index([created_at], map: "ix_address_state_created_at")
|
|
@@index([cryp_uu_id], map: "ix_address_state_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_address_state_ref_id")
|
|
@@index([ref_int], map: "ix_address_state_ref_int")
|
|
@@index([updated_at], map: "ix_address_state_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model address_street {
|
|
street_code String @db.VarChar(16)
|
|
street_name String @db.VarChar
|
|
type_code String? @db.VarChar
|
|
type_description String? @db.VarChar
|
|
gov_code String? @db.VarChar(128)
|
|
address_geographic_id BigInt?
|
|
neighborhood_id Int
|
|
neighborhood_uu_id String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_address_street_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
address_postcode address_postcode[]
|
|
address_neighborhood address_neighborhood @relation(fields: [neighborhood_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
addresses addresses[]
|
|
|
|
@@unique([neighborhood_id, street_code], map: "_address_street_ndx_01")
|
|
@@index([created_at], map: "ix_address_street_created_at")
|
|
@@index([cryp_uu_id], map: "ix_address_street_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_address_street_ref_id")
|
|
@@index([ref_int], map: "ix_address_street_ref_int")
|
|
@@index([updated_at], map: "ix_address_street_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model addresses {
|
|
build_number String @db.VarChar(24)
|
|
door_number String? @db.VarChar(24)
|
|
floor_number String? @db.VarChar(24)
|
|
comment_address String @db.VarChar
|
|
letter_address String @db.VarChar
|
|
short_letter_address String @db.VarChar
|
|
latitude Decimal @default(0) @db.Decimal(20, 12)
|
|
longitude Decimal @default(0) @db.Decimal(20, 12)
|
|
street_id Int
|
|
street_uu_id String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_addresses_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
address_street address_street @relation(fields: [street_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build build[]
|
|
build_sites build_sites[]
|
|
companies companies[]
|
|
|
|
@@index([created_at], map: "ix_addresses_created_at")
|
|
@@index([cryp_uu_id], map: "ix_addresses_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_addresses_ref_id")
|
|
@@index([ref_int], map: "ix_addresses_ref_int")
|
|
@@index([updated_at], map: "ix_addresses_updated_at")
|
|
}
|
|
|
|
model alembic_version {
|
|
version_num String @id(map: "alembic_version_pkc") @db.VarChar(32)
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model api_enum_dropdown {
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_api_enum_dropdown_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
enum_class String @db.VarChar
|
|
key String @db.VarChar
|
|
value String @db.VarChar
|
|
description String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
lang String @default("tr") @db.VarChar
|
|
account_detail account_detail[]
|
|
account_records_account_records_budget_typeToapi_enum_dropdown account_records[] @relation("account_records_budget_typeToapi_enum_dropdown")
|
|
account_records_account_records_payment_result_typeToapi_enum_dropdown account_records[] @relation("account_records_payment_result_typeToapi_enum_dropdown")
|
|
account_records_account_records_receive_debitToapi_enum_dropdown account_records[] @relation("account_records_receive_debitToapi_enum_dropdown")
|
|
account_records_model_train account_records_model_train[]
|
|
build build[]
|
|
build_area build_area[]
|
|
build_companies_providing build_companies_providing[]
|
|
build_decision_book_items build_decision_book_items[]
|
|
build_decision_book_payments build_decision_book_payments[]
|
|
build_parts_build_parts_part_direction_idToapi_enum_dropdown build_parts[] @relation("build_parts_part_direction_idToapi_enum_dropdown")
|
|
build_parts_build_parts_part_type_idToapi_enum_dropdown build_parts[] @relation("build_parts_part_type_idToapi_enum_dropdown")
|
|
build_person_providing build_person_providing[]
|
|
decision_book_budget_master decision_book_budget_master[]
|
|
|
|
@@index([created_at], map: "ix_api_enum_dropdown_created_at")
|
|
@@index([cryp_uu_id], map: "ix_api_enum_dropdown_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_api_enum_dropdown_ref_id")
|
|
@@index([ref_int], map: "ix_api_enum_dropdown_ref_int")
|
|
@@index([updated_at], map: "ix_api_enum_dropdown_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model application2employee {
|
|
employee_id Int
|
|
employee_uu_id String @db.VarChar
|
|
service_id Int
|
|
service_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_application2employee_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
employees employees @relation(fields: [employee_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
services services @relation(fields: [service_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([employee_uu_id, service_uu_id], map: "application2employee_employee_to_service")
|
|
@@index([created_at], map: "ix_application2employee_created_at")
|
|
@@index([cryp_uu_id], map: "ix_application2employee_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_application2employee_ref_id")
|
|
@@index([ref_int], map: "ix_application2employee_ref_int")
|
|
@@index([updated_at], map: "ix_application2employee_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model application2employee_extra {
|
|
employee_id Int
|
|
employee_uu_id String @db.VarChar
|
|
application_id Int
|
|
application_uu_id String @db.VarChar
|
|
site_url String @db.VarChar
|
|
application_code String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_application2employee_extra_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
applications applications @relation(fields: [application_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
employees employees @relation(fields: [employee_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([employee_id, site_url, application_id], map: "application_to_employee")
|
|
@@index([created_at], map: "ix_application2employee_extra_created_at")
|
|
@@index([cryp_uu_id], map: "ix_application2employee_extra_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_application2employee_extra_ref_id")
|
|
@@index([ref_int], map: "ix_application2employee_extra_ref_int")
|
|
@@index([updated_at], map: "ix_application2employee_extra_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model application2occupant {
|
|
build_living_space_id Int
|
|
build_living_space_uu_id String @db.VarChar
|
|
service_id Int
|
|
service_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_application2occupant_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_living_space build_living_space @relation(fields: [build_living_space_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
services services @relation(fields: [service_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([build_living_space_uu_id, service_uu_id], map: "application2occupant_occupant_to_service")
|
|
@@index([created_at], map: "ix_application2occupant_created_at")
|
|
@@index([cryp_uu_id], map: "ix_application2occupant_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_application2occupant_ref_id")
|
|
@@index([ref_int], map: "ix_application2occupant_ref_int")
|
|
@@index([updated_at], map: "ix_application2occupant_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model application2occupant_extra {
|
|
build_living_space_id Int
|
|
build_living_space_uu_id String @db.VarChar
|
|
application_id Int
|
|
application_uu_id String @db.VarChar
|
|
site_url String @db.VarChar
|
|
application_code String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_application2occupant_extra_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
applications applications @relation(fields: [application_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_living_space build_living_space @relation(fields: [build_living_space_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([build_living_space_id, site_url, application_id], map: "application_to_occupant")
|
|
@@index([created_at], map: "ix_application2occupant_extra_created_at")
|
|
@@index([cryp_uu_id], map: "ix_application2occupant_extra_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_application2occupant_extra_ref_id")
|
|
@@index([ref_int], map: "ix_application2occupant_extra_ref_int")
|
|
@@index([updated_at], map: "ix_application2occupant_extra_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model applications {
|
|
name String @db.VarChar
|
|
site_url String @db.VarChar
|
|
application_code String @db.VarChar
|
|
application_type String @db.VarChar
|
|
application_for String @default("EMP") @db.VarChar
|
|
description String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_applications_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
application2employee_extra application2employee_extra[]
|
|
application2occupant_extra application2occupant_extra[]
|
|
services2applications services2applications[]
|
|
|
|
@@index([created_at], map: "ix_applications_created_at")
|
|
@@index([cryp_uu_id], map: "ix_applications_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_applications_ref_id")
|
|
@@index([ref_int], map: "ix_applications_ref_int")
|
|
@@index([updated_at], map: "ix_applications_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build {
|
|
gov_address_code String @unique @default("") @db.VarChar
|
|
build_name String @db.VarChar
|
|
build_no String @db.VarChar(8)
|
|
max_floor Int @default(1)
|
|
underground_floor Int @default(0)
|
|
build_date DateTime @default(dbgenerated("'1900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
decision_period_date DateTime @default(dbgenerated("'1900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
tax_no String @default("") @db.VarChar(24)
|
|
lift_count Int @default(0)
|
|
heating_system Boolean @default(true)
|
|
cooling_system Boolean @default(false)
|
|
hot_water_system Boolean @default(false)
|
|
block_service_man_count Int @default(0)
|
|
security_service_man_count Int @default(0)
|
|
garage_count Int @default(0)
|
|
management_room_id Int?
|
|
site_id Int?
|
|
site_uu_id String? @db.VarChar
|
|
address_id Int
|
|
address_uu_id String @db.VarChar
|
|
build_types_id Int
|
|
build_types_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_records account_records[]
|
|
addresses addresses @relation(fields: [address_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown api_enum_dropdown @relation(fields: [build_types_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_sites build_sites? @relation(fields: [site_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_area build_area[]
|
|
build_companies_providing build_companies_providing[]
|
|
build_decision_book build_decision_book[]
|
|
build_ibans build_ibans[]
|
|
build_management build_management[]
|
|
build_parts build_parts[]
|
|
build_person_providing build_person_providing[]
|
|
company_delay_interest company_delay_interest[]
|
|
relationship_employee2build relationship_employee2build[]
|
|
|
|
@@index([gov_address_code], map: "_builds_ndx_00")
|
|
@@index([build_name, build_no], map: "_builds_ndx_01")
|
|
@@index([created_at], map: "ix_build_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_ref_id")
|
|
@@index([ref_int], map: "ix_build_ref_int")
|
|
@@index([updated_at], map: "ix_build_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_area {
|
|
area_name String @default("") @db.VarChar
|
|
area_code String @default("") @db.VarChar
|
|
area_type String @default("GREEN") @db.VarChar
|
|
area_direction String @default("NN") @db.VarChar(2)
|
|
area_gross_size Decimal @default(0) @db.Decimal(20, 6)
|
|
area_net_size Decimal @default(0) @db.Decimal(20, 6)
|
|
width Int? @default(0)
|
|
size Int? @default(0)
|
|
build_id Int
|
|
build_uu_id String @db.VarChar
|
|
part_type_id Int?
|
|
part_type_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_area_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build build @relation(fields: [build_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown api_enum_dropdown? @relation(fields: [part_type_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([build_id, area_code], map: "_edm_build_parts_area_ndx_00")
|
|
@@index([created_at], map: "ix_build_area_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_area_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_area_ref_id")
|
|
@@index([ref_int], map: "ix_build_area_ref_int")
|
|
@@index([updated_at], map: "ix_build_area_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_companies_providing {
|
|
build_id Int
|
|
build_uu_id String? @db.VarChar
|
|
company_id Int
|
|
company_uu_id String? @db.VarChar
|
|
provide_id Int?
|
|
provide_uu_id String? @db.VarChar
|
|
contract_id Int?
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_companies_providing_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build build @relation(fields: [build_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_build_companies_providing_company_idTocompanies companies @relation("build_companies_providing_company_idTocompanies", fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_build_companies_providing_contract_idTocompanies companies? @relation("build_companies_providing_contract_idTocompanies", fields: [contract_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown api_enum_dropdown? @relation(fields: [provide_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([build_id, company_id, provide_id], map: "_build_companies_providing_ndx_00")
|
|
@@index([created_at], map: "ix_build_companies_providing_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_companies_providing_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_companies_providing_ref_id")
|
|
@@index([ref_int], map: "ix_build_companies_providing_ref_int")
|
|
@@index([updated_at], map: "ix_build_companies_providing_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book {
|
|
decision_book_pdf_path String? @default("") @db.VarChar
|
|
resp_company_fix_wage Decimal @default(0) @db.Decimal(10, 2)
|
|
is_out_sourced Boolean @default(false)
|
|
meeting_date DateTime @default(dbgenerated("'1900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
decision_type String @default("RBM") @db.VarChar(3)
|
|
meeting_is_completed Boolean @default(false)
|
|
meeting_completed_date DateTime? @db.Timestamptz(6)
|
|
build_id Int
|
|
build_uu_id String? @db.VarChar
|
|
resp_company_id Int
|
|
resp_company_uu_id String? @db.VarChar
|
|
contact_id Int?
|
|
contact_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_records account_records[]
|
|
build build @relation(fields: [build_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
contracts contracts? @relation(fields: [contact_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies companies @relation(fields: [resp_company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_invitations build_decision_book_invitations[]
|
|
build_decision_book_items build_decision_book_items[]
|
|
build_decision_book_payments build_decision_book_payments[]
|
|
build_decision_book_person build_decision_book_person[]
|
|
build_decision_book_projects build_decision_book_projects[]
|
|
decision_book_budget_books decision_book_budget_books[]
|
|
decision_book_budget_codes decision_book_budget_codes[]
|
|
|
|
@@index([meeting_date, build_id], map: "build_decision_book_ndx_011")
|
|
@@index([created_at], map: "ix_build_decision_book_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_invitations {
|
|
build_id Int
|
|
build_uu_id String? @db.VarChar
|
|
decision_book_id Int
|
|
decision_book_uu_id String? @db.VarChar
|
|
invitation_type String @db.VarChar
|
|
invitation_attempt Int @default(1) @db.SmallInt
|
|
living_part_count Int @default(1) @db.SmallInt
|
|
living_part_percentage Decimal @default(0.51) @db.Decimal(10, 2)
|
|
message String?
|
|
planned_date DateTime @db.Timestamptz(6)
|
|
planned_date_expires DateTime @db.Timestamptz(6)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_invitations_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book build_decision_book @relation(fields: [decision_book_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_person build_decision_book_person[]
|
|
build_decision_book_person_occupants build_decision_book_person_occupants[]
|
|
|
|
@@unique([invitation_type, planned_date, invitation_attempt], map: "_build_decision_book_invitations_ndx_01")
|
|
@@index([created_at], map: "ix_build_decision_book_invitations_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_invitations_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_invitations_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_invitations_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_invitations_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_items {
|
|
item_order Int @db.SmallInt
|
|
item_comment String
|
|
item_objection String?
|
|
info_is_completed Boolean @default(false)
|
|
is_payment_created Boolean @default(false)
|
|
info_type_id Int?
|
|
info_type_uu_id String? @db.VarChar
|
|
build_decision_book_id Int
|
|
build_decision_book_uu_id String? @db.VarChar
|
|
item_short_comment String? @db.VarChar(24)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_items_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book build_decision_book @relation(fields: [build_decision_book_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown api_enum_dropdown? @relation(fields: [info_type_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_items_unapproved_build_decision_book_items_unapproved_build_decision_book_itemTobuild_decision_book_items build_decision_book_items_unapproved[] @relation("build_decision_book_items_unapproved_build_decision_book_itemTobuild_decision_book_items")
|
|
build_decision_book_items_unapproved_build_decision_book_items_unapproved_decision_book_item_idTobuild_decision_book_items build_decision_book_items_unapproved[] @relation("build_decision_book_items_unapproved_decision_book_item_idTobuild_decision_book_items")
|
|
build_decision_book_legal build_decision_book_legal[]
|
|
build_decision_book_payments build_decision_book_payments[]
|
|
build_decision_book_projects build_decision_book_projects[]
|
|
|
|
@@unique([build_decision_book_id, item_order], map: "_build_decision_book_item_ndx_02")
|
|
@@index([build_decision_book_id], map: "_build_decision_book_item_ndx_01")
|
|
@@index([created_at], map: "ix_build_decision_book_items_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_items_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_items_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_items_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_items_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_items_unapproved {
|
|
item_objection String
|
|
item_order Int @db.SmallInt
|
|
decision_book_item_id Int
|
|
decision_book_item_uu_id String? @db.VarChar
|
|
person_id Int
|
|
person_uu_id String? @db.VarChar
|
|
build_decision_book_item Int
|
|
build_decision_book_item_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_items_unapproved_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book_items_build_decision_book_items_unapproved_build_decision_book_itemTobuild_decision_book_items build_decision_book_items @relation("build_decision_book_items_unapproved_build_decision_book_itemTobuild_decision_book_items", fields: [build_decision_book_item], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "build_decision_book_items_unappro_build_decision_book_item_fkey")
|
|
build_decision_book_items_build_decision_book_items_unapproved_decision_book_item_idTobuild_decision_book_items build_decision_book_items @relation("build_decision_book_items_unapproved_decision_book_item_idTobuild_decision_book_items", fields: [decision_book_item_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people people @relation(fields: [person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([build_decision_book_item], map: "_build_decision_book_item_unapproved_ndx_01")
|
|
@@index([created_at], map: "ix_build_decision_book_items_unapproved_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_items_unapproved_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_items_unapproved_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_items_unapproved_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_items_unapproved_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_legal {
|
|
period_start_date DateTime @db.Timestamptz(6)
|
|
lawsuits_decision_number String @db.VarChar
|
|
lawsuits_decision_date DateTime @db.Timestamptz(6)
|
|
period_stop_date DateTime @default(dbgenerated("'2099-12-31 23:59:59+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
decision_book_pdf_path String? @default("") @db.VarChar
|
|
resp_company_total_wage Decimal? @default(0) @db.Decimal(10, 2)
|
|
contact_agreement_path String? @default("") @db.VarChar
|
|
contact_agreement_date DateTime? @default(dbgenerated("'1900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
meeting_date DateTime @default(dbgenerated("'1900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
lawsuits_type String @default("C") @db.VarChar(1)
|
|
lawsuits_name String @db.VarChar(128)
|
|
lawsuits_note String @db.VarChar(512)
|
|
lawyer_cost Decimal @db.Decimal(20, 2)
|
|
mediator_lawyer_cost Decimal @db.Decimal(20, 2)
|
|
other_cost Decimal @db.Decimal(20, 2)
|
|
legal_cost Decimal @db.Decimal(20, 2)
|
|
approved_cost Decimal @db.Decimal(20, 2)
|
|
total_price Decimal @db.Decimal(20, 2)
|
|
build_db_item_id Int
|
|
build_db_item_uu_id String? @db.VarChar
|
|
resp_attorney_id Int
|
|
resp_attorney_uu_id String? @db.VarChar
|
|
resp_attorney_company_id Int
|
|
resp_attorney_company_uu_id String? @db.VarChar
|
|
mediator_lawyer_person_id Int
|
|
mediator_lawyer_person_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_legal_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book_items build_decision_book_items @relation(fields: [build_db_item_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people_build_decision_book_legal_mediator_lawyer_person_idTopeople people @relation("build_decision_book_legal_mediator_lawyer_person_idTopeople", fields: [mediator_lawyer_person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies companies @relation(fields: [resp_attorney_company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people_build_decision_book_legal_resp_attorney_idTopeople people @relation("build_decision_book_legal_resp_attorney_idTopeople", fields: [resp_attorney_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([meeting_date], map: "_build_decision_book_legal_ndx_00")
|
|
@@index([created_at], map: "ix_build_decision_book_legal_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_legal_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_legal_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_legal_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_legal_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_payments {
|
|
payment_plan_time_periods String @db.VarChar(10)
|
|
process_date DateTime @db.Timestamptz(6)
|
|
payment_amount Decimal @db.Decimal(16, 2)
|
|
currency String @default("TRY") @db.VarChar(8)
|
|
payment_types_id Int?
|
|
payment_types_uu_id String? @db.VarChar
|
|
period_time String @db.VarChar(12)
|
|
process_date_y Int @db.SmallInt
|
|
process_date_m Int @db.SmallInt
|
|
build_decision_book_item_id Int
|
|
build_decision_book_item_uu_id String @db.VarChar
|
|
build_parts_id Int
|
|
build_parts_uu_id String @db.VarChar
|
|
decision_book_project_id Int?
|
|
decision_book_project_uu_id String? @db.VarChar
|
|
account_records_id Int?
|
|
account_records_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_payments_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
account_is_debit Boolean? @default(true)
|
|
build_decision_book_id Int?
|
|
build_decision_book_uu_id String? @db.VarChar
|
|
ref_int Int?
|
|
is_closed Boolean @default(false)
|
|
debt_to_pay Decimal @default(0) @db.Decimal(16, 2)
|
|
debt_paid Decimal @default(0) @db.Decimal(16, 2)
|
|
account_delay_interest account_delay_interest[]
|
|
account_records account_records? @relation(fields: [account_records_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book build_decision_book? @relation(fields: [build_decision_book_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_items build_decision_book_items @relation(fields: [build_decision_book_item_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_parts build_parts @relation(fields: [build_parts_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_projects build_decision_book_projects? @relation(fields: [decision_book_project_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown api_enum_dropdown? @relation(fields: [payment_types_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([uu_id, ref_id, build_decision_book_item_id, build_parts_id, payment_plan_time_periods, process_date, payment_types_id, account_records_id, account_is_debit], map: "build_decision_book_payments_detail_ndx_00")
|
|
@@index([account_records_id], map: "build_decision_book_payments_detail_ndx_01")
|
|
@@index([created_at], map: "ix_build_decision_book_payments_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_payments_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_payments_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_payments_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_payments_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_person {
|
|
dues_percent_discount Int @default(0) @db.SmallInt
|
|
dues_fix_discount Decimal @default(0) @db.Decimal(10, 2)
|
|
dues_discount_approval_date DateTime @default(dbgenerated("'1900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
send_date DateTime @db.Timestamptz(6)
|
|
is_attending Boolean @default(false)
|
|
confirmed_date DateTime? @db.Timestamptz(6)
|
|
token String @default("") @db.VarChar
|
|
vicarious_person_id Int?
|
|
vicarious_person_uu_id String? @db.VarChar
|
|
invite_id Int
|
|
invite_uu_id String @db.VarChar
|
|
build_decision_book_id Int
|
|
build_decision_book_uu_id String @db.VarChar
|
|
build_living_space_id Int
|
|
build_living_space_uu_id String? @db.VarChar
|
|
person_id Int
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_person_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book build_decision_book @relation(fields: [build_decision_book_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_living_space build_living_space @relation(fields: [build_living_space_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_invitations build_decision_book_invitations @relation(fields: [invite_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people_build_decision_book_person_person_idTopeople people @relation("build_decision_book_person_person_idTopeople", fields: [person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people_build_decision_book_person_vicarious_person_idTopeople people? @relation("build_decision_book_person_vicarious_person_idTopeople", fields: [vicarious_person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_person_occupants build_decision_book_person_occupants[]
|
|
|
|
@@unique([build_decision_book_id, invite_id, build_living_space_id], map: "_build_decision_book_person_ndx_01")
|
|
@@index([created_at], map: "ix_build_decision_book_person_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_person_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_person_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_person_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_person_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_person_occupants {
|
|
build_decision_book_person_id Int
|
|
build_decision_book_person_uu_id String? @db.VarChar
|
|
invite_id Int?
|
|
invite_uu_id String? @db.VarChar
|
|
occupant_type_id Int
|
|
occupant_type_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_person_occupants_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book_person build_decision_book_person @relation(fields: [build_decision_book_person_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "build_decision_book_person_oc_build_decision_book_person_i_fkey")
|
|
build_decision_book_invitations build_decision_book_invitations? @relation(fields: [invite_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
occupant_types occupant_types @relation(fields: [occupant_type_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([build_decision_book_person_id, occupant_type_id], map: "_build_decision_book_person_occupants_ndx_01")
|
|
@@index([created_at], map: "ix_build_decision_book_person_occupants_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_person_occupants_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_person_occupants_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_person_occupants_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_person_occupants_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_project_items {
|
|
item_header String @db.VarChar
|
|
item_comment String
|
|
attachment_pdf_path String? @default("") @db.VarChar
|
|
item_estimated_cost Decimal @default(0) @db.Decimal(16, 2)
|
|
item_short_comment String? @db.VarChar(24)
|
|
build_decision_book_project_id Int
|
|
build_decision_book_project_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_project_items_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book_projects build_decision_book_projects @relation(fields: [build_decision_book_project_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "build_decision_book_project_i_build_decision_book_project__fkey")
|
|
|
|
@@index([created_at], map: "ix_build_decision_book_project_items_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_project_items_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_project_items_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_project_items_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_project_items_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_project_person {
|
|
dues_percent_discount Int @default(0) @db.SmallInt
|
|
job_fix_wage Decimal @default(0) @db.Decimal(10, 2)
|
|
bid_price Decimal @default(0) @db.Decimal(10, 2)
|
|
decision_price Decimal @default(0) @db.Decimal(10, 2)
|
|
build_decision_book_project_id Int
|
|
build_decision_book_project_uu_id String? @db.VarChar
|
|
living_space_id Int
|
|
living_space_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_project_person_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book_projects build_decision_book_projects @relation(fields: [build_decision_book_project_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "build_decision_book_project_p_build_decision_book_project__fkey")
|
|
build_living_space build_living_space @relation(fields: [living_space_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_build_decision_book_project_person_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_project_person_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_decision_book_project_person_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_project_person_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_project_person_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_decision_book_projects {
|
|
project_no String? @db.VarChar(12)
|
|
project_name String @db.VarChar
|
|
project_start_date DateTime @db.Timestamptz(6)
|
|
project_stop_date DateTime @default(dbgenerated("'2099-12-31 23:59:59+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
project_type String @default("C") @db.VarChar
|
|
project_note String
|
|
decision_book_pdf_path String? @default("") @db.VarChar
|
|
is_completed Boolean @default(false)
|
|
status_code Int? @db.SmallInt
|
|
resp_company_fix_wage Decimal @default(0) @db.Decimal(10, 2)
|
|
is_out_sourced Boolean @default(false)
|
|
meeting_date DateTime @default(dbgenerated("'1900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
currency String @default("TRY") @db.VarChar(8)
|
|
bid_price Decimal @default(0) @db.Decimal(16, 4)
|
|
approved_price Decimal @default(0) @db.Decimal(16, 4)
|
|
final_price Decimal @default(0) @db.Decimal(16, 4)
|
|
contact_id Int?
|
|
contact_uu_id String? @db.VarChar
|
|
build_decision_book_id Int
|
|
build_decision_book_uu_id String? @db.VarChar
|
|
build_decision_book_item_id Int
|
|
build_decision_book_item_uu_id String? @db.VarChar
|
|
project_response_living_space_id Int?
|
|
project_response_living_space_uu_id String? @db.VarChar
|
|
resp_company_id Int?
|
|
resp_company_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_decision_book_projects_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_detail account_detail[]
|
|
account_master account_master[]
|
|
build_decision_book_payments build_decision_book_payments[]
|
|
build_decision_book_project_items build_decision_book_project_items[]
|
|
build_decision_book_project_person build_decision_book_project_person[]
|
|
build_decision_book build_decision_book @relation(fields: [build_decision_book_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book_items build_decision_book_items @relation(fields: [build_decision_book_item_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
contracts contracts? @relation(fields: [contact_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_living_space build_living_space? @relation(fields: [project_response_living_space_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies companies? @relation(fields: [resp_company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([project_no, project_start_date], map: "_build_decision_book_project_ndx_00")
|
|
@@index([created_at], map: "ix_build_decision_book_projects_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_decision_book_projects_cryp_uu_id")
|
|
@@index([meeting_date], map: "ix_build_decision_book_projects_meeting_date")
|
|
@@index([ref_id], map: "ix_build_decision_book_projects_ref_id")
|
|
@@index([ref_int], map: "ix_build_decision_book_projects_ref_int")
|
|
@@index([updated_at], map: "ix_build_decision_book_projects_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_iban_description {
|
|
iban String @db.VarChar
|
|
group_id Int @db.SmallInt
|
|
search_word String @db.VarChar
|
|
customer_id Int?
|
|
customer_uu_id String? @db.VarChar
|
|
company_id Int?
|
|
company_uu_id String? @db.VarChar
|
|
build_parts_id Int?
|
|
build_parts_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_iban_description_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_parts build_parts? @relation(fields: [build_parts_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies companies? @relation(fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people people? @relation(fields: [customer_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([iban, search_word, group_id], map: "_search_iban_description_ndx_00")
|
|
@@index([created_at], map: "ix_build_iban_description_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_iban_description_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_iban_description_ref_id")
|
|
@@index([ref_int], map: "ix_build_iban_description_ref_int")
|
|
@@index([search_word], map: "ix_build_iban_description_search_word")
|
|
@@index([updated_at], map: "ix_build_iban_description_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_ibans {
|
|
iban String @default("") @db.VarChar(40)
|
|
start_date DateTime @db.Timestamptz(6)
|
|
stop_date DateTime @default(dbgenerated("'2900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
bank_code String @default("TR0000000000000") @db.VarChar(24)
|
|
xcomment String @default("????") @db.VarChar(64)
|
|
build_id Int?
|
|
build_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_ibans_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build build? @relation(fields: [build_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([iban, start_date], map: "_build_ibans_ndx_01")
|
|
@@index([build_uu_id], map: "ix_build_ibans_build_uu_id")
|
|
@@index([created_at], map: "ix_build_ibans_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_ibans_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_ibans_ref_id")
|
|
@@index([ref_int], map: "ix_build_ibans_ref_int")
|
|
@@index([updated_at], map: "ix_build_ibans_updated_at")
|
|
}
|
|
|
|
model user_types {
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_user_types_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
type String @db.VarChar
|
|
description String @default("") @db.VarChar
|
|
type_token String @default("") @db.VarChar
|
|
token String @default("") @db.VarChar
|
|
occupant_types occupant_types[]
|
|
staff staff[]
|
|
|
|
@@index([type], map: "ix_user_types_type")
|
|
@@index([token], map: "ix_user_types_token")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_living_space {
|
|
fix_value Decimal @default(0) @db.Decimal(20, 6)
|
|
fix_percent Decimal @default(0) @db.Decimal(6, 2)
|
|
agreement_no String @default("") @db.VarChar
|
|
marketing_process Boolean @default(false)
|
|
marketing_layer Int @default(0)
|
|
build_parts_id Int
|
|
build_parts_uu_id String @db.VarChar
|
|
person_id Int
|
|
person_uu_id String @db.VarChar
|
|
occupant_type_id Int
|
|
occupant_type_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_living_space_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_records account_records[]
|
|
application2occupant application2occupant[]
|
|
application2occupant_extra application2occupant_extra[]
|
|
build_decision_book_person build_decision_book_person[]
|
|
build_decision_book_project_person build_decision_book_project_person[]
|
|
build_decision_book_projects build_decision_book_projects[]
|
|
build_parts build_parts @relation(fields: [build_parts_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
occupant_types occupant_types @relation(fields: [occupant_type_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people people @relation(fields: [person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
event2occupant event2occupant[]
|
|
event2occupant_extra event2occupant_extra[]
|
|
|
|
@@index([build_parts_id], map: "ix_build_living_space_build_parts_id")
|
|
@@index([created_at], map: "ix_build_living_space_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_living_space_cryp_uu_id")
|
|
@@index([person_id], map: "ix_build_living_space_person_id")
|
|
@@index([ref_id], map: "ix_build_living_space_ref_id")
|
|
@@index([ref_int], map: "ix_build_living_space_ref_int")
|
|
@@index([updated_at], map: "ix_build_living_space_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_management {
|
|
discounted_percentage Decimal @default(0.00) @db.Decimal(6, 2)
|
|
discounted_price Decimal @default(0.00) @db.Decimal(20, 2)
|
|
calculated_price Decimal @default(0.00) @db.Decimal(20, 2)
|
|
occupant_type Int
|
|
occupant_type_uu_id String @db.VarChar
|
|
build_id Int
|
|
build_uu_id String @db.VarChar
|
|
build_parts_id Int
|
|
build_parts_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_management_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build build @relation(fields: [build_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_parts build_parts @relation(fields: [build_parts_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
occupant_types occupant_types @relation(fields: [occupant_type], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([build_parts_id, occupant_type, expiry_starts], map: "build_management_ndx_00")
|
|
@@index([build_parts_id], map: "ix_build_management_build_parts_id")
|
|
@@index([created_at], map: "ix_build_management_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_management_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_management_ref_id")
|
|
@@index([ref_int], map: "ix_build_management_ref_int")
|
|
@@index([updated_at], map: "ix_build_management_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_parts {
|
|
address_gov_code String @db.VarChar
|
|
part_no Int @default(0)
|
|
part_level Int @default(0)
|
|
part_code String @default("") @db.VarChar
|
|
part_gross_size Int @default(0)
|
|
part_net_size Int @default(0)
|
|
default_accessory String @default("0")
|
|
human_livable Boolean @default(true)
|
|
due_part_key String @default("") @db.VarChar
|
|
build_id Int
|
|
build_uu_id String @db.VarChar
|
|
part_direction_id Int?
|
|
part_direction_uu_id String? @db.VarChar
|
|
part_type_id Int
|
|
part_type_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_parts_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_records account_records[]
|
|
build_decision_book_payments build_decision_book_payments[]
|
|
build_iban_description build_iban_description[]
|
|
build_living_space build_living_space[]
|
|
build_management build_management[]
|
|
build build @relation(fields: [build_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown_build_parts_part_direction_idToapi_enum_dropdown api_enum_dropdown? @relation("build_parts_part_direction_idToapi_enum_dropdown", fields: [part_direction_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown_build_parts_part_type_idToapi_enum_dropdown api_enum_dropdown @relation("build_parts_part_type_idToapi_enum_dropdown", fields: [part_type_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
decision_book_budget_codes decision_book_budget_codes[]
|
|
part2employee part2employee[]
|
|
|
|
@@unique([build_id, part_no], map: "build_parts_ndx_1")
|
|
@@index([created_at], map: "ix_build_parts_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_parts_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_parts_ref_id")
|
|
@@index([ref_int], map: "ix_build_parts_ref_int")
|
|
@@index([updated_at], map: "ix_build_parts_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_person_providing {
|
|
build_id Int
|
|
build_uu_id String? @db.VarChar
|
|
people_id Int
|
|
people_uu_id String? @db.VarChar
|
|
provide_id Int?
|
|
provide_uu_id String? @db.VarChar
|
|
contract_id Int?
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_person_providing_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build build @relation(fields: [build_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies companies? @relation(fields: [contract_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people people @relation(fields: [people_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown api_enum_dropdown? @relation(fields: [provide_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([build_id, people_id, provide_id], map: "_build_person_providing_ndx_00")
|
|
@@index([created_at], map: "ix_build_person_providing_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_person_providing_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_person_providing_ref_id")
|
|
@@index([ref_int], map: "ix_build_person_providing_ref_int")
|
|
@@index([updated_at], map: "ix_build_person_providing_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_sites {
|
|
site_name String @db.VarChar(24)
|
|
site_no String @db.VarChar(8)
|
|
address_id Int
|
|
address_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_sites_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build build[]
|
|
addresses addresses @relation(fields: [address_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([site_no, site_name], map: "_sites_ndx_01")
|
|
@@index([created_at], map: "ix_build_sites_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_sites_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_sites_ref_id")
|
|
@@index([ref_int], map: "ix_build_sites_ref_int")
|
|
@@index([updated_at], map: "ix_build_sites_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model build_types {
|
|
function_code String @default("") @db.VarChar(12)
|
|
type_code String @default("") @db.VarChar(12)
|
|
lang String @default("TR") @db.VarChar(4)
|
|
type_name String @default("") @db.VarChar(48)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_build_types_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
|
|
@@unique([type_code, function_code, lang], map: "_build_types_ndx_00")
|
|
@@index([created_at], map: "ix_build_types_created_at")
|
|
@@index([cryp_uu_id], map: "ix_build_types_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_build_types_ref_id")
|
|
@@index([ref_int], map: "ix_build_types_ref_int")
|
|
@@index([updated_at], map: "ix_build_types_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model companies {
|
|
formal_name String @db.VarChar
|
|
company_type String @db.VarChar
|
|
commercial_type String @db.VarChar
|
|
tax_no String @unique(map: "_company_ndx_01") @db.VarChar
|
|
public_name String @db.VarChar
|
|
company_tag String @db.VarChar
|
|
default_lang_type String @default("TR") @db.VarChar
|
|
default_money_type String @default("TL") @db.VarChar
|
|
is_commercial Boolean @default(false)
|
|
is_blacklist Boolean @default(false)
|
|
parent_id Int?
|
|
workplace_no String? @db.VarChar
|
|
official_address_id Int?
|
|
official_address_uu_id String? @db.VarChar
|
|
top_responsible_company_id Int?
|
|
top_responsible_company_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_companies_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_books_account_books_branch_idTocompanies account_books[] @relation("account_books_branch_idTocompanies")
|
|
account_books_account_books_company_idTocompanies account_books[] @relation("account_books_company_idTocompanies")
|
|
account_codes_account_codes_company_idTocompanies account_codes[] @relation("account_codes_company_idTocompanies")
|
|
account_codes_account_codes_customer_idTocompanies account_codes[] @relation("account_codes_customer_idTocompanies")
|
|
account_records_account_records_company_idTocompanies account_records[] @relation("account_records_company_idTocompanies")
|
|
account_records_account_records_send_company_idTocompanies account_records[] @relation("account_records_send_company_idTocompanies")
|
|
build_companies_providing_build_companies_providing_company_idTocompanies build_companies_providing[] @relation("build_companies_providing_company_idTocompanies")
|
|
build_companies_providing_build_companies_providing_contract_idTocompanies build_companies_providing[] @relation("build_companies_providing_contract_idTocompanies")
|
|
build_decision_book build_decision_book[]
|
|
build_decision_book_legal build_decision_book_legal[]
|
|
build_decision_book_projects build_decision_book_projects[]
|
|
build_iban_description build_iban_description[]
|
|
build_person_providing build_person_providing[]
|
|
addresses addresses? @relation(fields: [official_address_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies companies? @relation("companiesTocompanies", fields: [top_responsible_company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
other_companies companies[] @relation("companiesTocompanies")
|
|
company_delay_interest company_delay_interest[]
|
|
contracts contracts[]
|
|
decision_book_budget_books_decision_book_budget_books_branch_idTocompanies decision_book_budget_books[] @relation("decision_book_budget_books_branch_idTocompanies")
|
|
decision_book_budget_books_decision_book_budget_books_company_idTocompanies decision_book_budget_books[] @relation("decision_book_budget_books_company_idTocompanies")
|
|
decision_book_budget_codes decision_book_budget_codes[]
|
|
departments departments[]
|
|
relationship_duty_company_relationship_duty_company_member_idTocompanies relationship_duty_company[] @relation("relationship_duty_company_member_idTocompanies")
|
|
relationship_duty_company_relationship_duty_company_owner_idTocompanies relationship_duty_company[] @relation("relationship_duty_company_owner_idTocompanies")
|
|
relationship_duty_company_relationship_duty_company_parent_idTocompanies relationship_duty_company[] @relation("relationship_duty_company_parent_idTocompanies")
|
|
relationship_duty_people relationship_duty_people[]
|
|
relationship_employee2build relationship_employee2build[]
|
|
relationship_employee2postcode relationship_employee2postcode[]
|
|
|
|
@@index([formal_name, public_name], map: "_company_ndx_02")
|
|
@@index([created_at], map: "ix_companies_created_at")
|
|
@@index([cryp_uu_id], map: "ix_companies_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_companies_ref_id")
|
|
@@index([ref_int], map: "ix_companies_ref_int")
|
|
@@index([updated_at], map: "ix_companies_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model company_delay_interest {
|
|
company_id Int?
|
|
company_uu_id String? @db.VarChar
|
|
build_id Int?
|
|
build_uu_id String? @db.VarChar
|
|
daily_interest_type String? @db.VarChar(24)
|
|
daily_interest_rate Decimal @default(0) @db.Decimal(20, 6)
|
|
bsmv_rate Decimal @default(0) @db.Decimal(20, 6)
|
|
kkdf_rate Decimal @default(0) @db.Decimal(20, 6)
|
|
start_date DateTime @db.Timestamptz(6)
|
|
stop_date DateTime @default(dbgenerated("'2900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
ref_int Int?
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_company_delay_interest_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
build build? @relation(fields: [build_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies companies? @relation(fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([company_id, build_id, start_date], map: "_company_delay_interest_ndx_01")
|
|
@@index([company_id, build_id], map: "ix_company_delay_interest_build_uu_id")
|
|
@@index([created_at], map: "ix_company_delay_interest_created_at")
|
|
@@index([cryp_uu_id], map: "ix_company_delay_interest_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_company_delay_interest_ref_id")
|
|
@@index([ref_int], map: "ix_company_delay_interest_ref_int")
|
|
@@index([updated_at], map: "ix_company_delay_interest_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model contracts {
|
|
contract_type String @db.VarChar(5)
|
|
contract_title String @db.VarChar(255)
|
|
contract_details String
|
|
contract_terms String
|
|
contract_code String @unique(map: "_contract_ndx_01") @db.VarChar(100)
|
|
contract_date DateTime @default(dbgenerated("'2099-12-31 23:59:59+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
company_id Int?
|
|
company_uu_id String @default("") @db.VarChar
|
|
person_id Int?
|
|
person_uu_id String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_contracts_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book build_decision_book[]
|
|
build_decision_book_projects build_decision_book_projects[]
|
|
companies companies? @relation(fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people people? @relation(fields: [person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_contracts_created_at")
|
|
@@index([cryp_uu_id], map: "ix_contracts_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_contracts_ref_id")
|
|
@@index([ref_int], map: "ix_contracts_ref_int")
|
|
@@index([updated_at], map: "ix_contracts_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model credentials {
|
|
credential_token String @default("") @db.VarChar
|
|
user_id Int
|
|
user_uu_id String @default("") @db.VarChar
|
|
person_id Int
|
|
person_uu_id String @default("") @db.VarChar
|
|
name String @default("") @db.VarChar
|
|
surname String @default("") @db.VarChar
|
|
email String @default("") @db.VarChar
|
|
phone String @default("") @db.VarChar
|
|
is_verified Boolean @default(false)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_credentials_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
people people @relation(fields: [person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
users users @relation(fields: [user_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_credentials_created_at")
|
|
@@index([cryp_uu_id], map: "ix_credentials_cryp_uu_id")
|
|
@@index([email], map: "ix_credentials_email")
|
|
@@index([name], map: "ix_credentials_name")
|
|
@@index([person_uu_id], map: "ix_credentials_person_uu_id")
|
|
@@index([phone], map: "ix_credentials_phone")
|
|
@@index([ref_id], map: "ix_credentials_ref_id")
|
|
@@index([ref_int], map: "ix_credentials_ref_int")
|
|
@@index([surname], map: "ix_credentials_surname")
|
|
@@index([updated_at], map: "ix_credentials_updated_at")
|
|
@@index([user_uu_id], map: "ix_credentials_user_uu_id")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model decision_book_budget_books {
|
|
country String @db.VarChar
|
|
branch_type Int @default(0) @db.SmallInt
|
|
company_id Int
|
|
company_uu_id String @db.VarChar
|
|
branch_id Int?
|
|
branch_uu_id String? @db.VarChar
|
|
build_decision_book_id Int
|
|
build_decision_book_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_decision_book_budget_books_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
companies_decision_book_budget_books_branch_idTocompanies companies? @relation("decision_book_budget_books_branch_idTocompanies", fields: [branch_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_decision_book build_decision_book @relation(fields: [build_decision_book_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_decision_book_budget_books_company_idTocompanies companies @relation("decision_book_budget_books_company_idTocompanies", fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
decision_book_budget_master decision_book_budget_master[]
|
|
|
|
@@index([company_id, created_at], map: "_decision_book_budget_companies_book_ndx_00")
|
|
@@index([created_at], map: "ix_decision_book_budget_books_created_at")
|
|
@@index([cryp_uu_id], map: "ix_decision_book_budget_books_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_decision_book_budget_books_ref_id")
|
|
@@index([ref_int], map: "ix_decision_book_budget_books_ref_int")
|
|
@@index([updated_at], map: "ix_decision_book_budget_books_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model decision_book_budget_codes {
|
|
budget_code String @db.VarChar(48)
|
|
comment_line String
|
|
build_decision_book_id Int?
|
|
build_decision_book_uu_id String? @db.VarChar
|
|
build_parts_id Int?
|
|
build_parts_uu_id String? @db.VarChar
|
|
company_id Int?
|
|
company_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_decision_book_budget_codes_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book build_decision_book? @relation(fields: [build_decision_book_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_parts build_parts? @relation(fields: [build_parts_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies companies? @relation(fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
decision_book_budgets decision_book_budgets[]
|
|
|
|
@@index([budget_code, created_at], map: "_decision_book_budget_codes_ndx_00")
|
|
@@index([company_id, created_at], map: "_decision_book_budget_codes_ndx_01")
|
|
@@index([created_at], map: "ix_decision_book_budget_codes_created_at")
|
|
@@index([cryp_uu_id], map: "ix_decision_book_budget_codes_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_decision_book_budget_codes_ref_id")
|
|
@@index([ref_int], map: "ix_decision_book_budget_codes_ref_int")
|
|
@@index([updated_at], map: "ix_decision_book_budget_codes_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model decision_book_budget_master {
|
|
budget_type String @db.VarChar(50)
|
|
currency String @default("TRY") @db.VarChar(8)
|
|
total_budget Decimal @db.Decimal(10, 2)
|
|
tracking_period_id Int?
|
|
tracking_period_uu_id String? @db.VarChar
|
|
budget_books_id Int
|
|
budget_books_uu_id String? @db.VarChar
|
|
department_id Int
|
|
department_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_decision_book_budget_master_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
decision_book_budget_books decision_book_budget_books @relation(fields: [budget_books_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
departments departments @relation(fields: [department_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
api_enum_dropdown api_enum_dropdown? @relation(fields: [tracking_period_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
decision_book_budgets decision_book_budgets[]
|
|
|
|
@@index([created_at], map: "ix_decision_book_budget_master_created_at")
|
|
@@index([cryp_uu_id], map: "ix_decision_book_budget_master_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_decision_book_budget_master_ref_id")
|
|
@@index([ref_int], map: "ix_decision_book_budget_master_ref_int")
|
|
@@index([updated_at], map: "ix_decision_book_budget_master_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model decision_book_budgets {
|
|
process_date DateTime @db.Timestamptz(6)
|
|
budget_codes_id Int
|
|
total_budget Decimal @db.Decimal(10, 2)
|
|
used_budget Decimal @db.Decimal(10, 2)
|
|
remaining_budget Decimal @db.Decimal(10, 2)
|
|
decision_book_budget_master_id Int
|
|
decision_book_budget_master_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_decision_book_budgets_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
decision_book_budget_codes decision_book_budget_codes @relation(fields: [budget_codes_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
decision_book_budget_master decision_book_budget_master @relation(fields: [decision_book_budget_master_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([decision_book_budget_master_uu_id, process_date], map: "_decision_book_budgets_ndx_00")
|
|
@@index([created_at], map: "ix_decision_book_budgets_created_at")
|
|
@@index([cryp_uu_id], map: "ix_decision_book_budgets_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_decision_book_budgets_ref_id")
|
|
@@index([ref_int], map: "ix_decision_book_budgets_ref_int")
|
|
@@index([updated_at], map: "ix_decision_book_budgets_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model departments {
|
|
parent_department_id Int? @default(0)
|
|
department_code String @db.VarChar(16)
|
|
department_name String @db.VarChar(128)
|
|
department_description String @default("") @db.VarChar
|
|
company_id Int
|
|
company_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_departments_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
account_master account_master[]
|
|
decision_book_budget_master decision_book_budget_master[]
|
|
companies companies @relation(fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
duties duties[]
|
|
|
|
@@index([created_at], map: "ix_departments_created_at")
|
|
@@index([cryp_uu_id], map: "ix_departments_cryp_uu_id")
|
|
@@index([department_code], map: "ix_departments_department_code")
|
|
@@index([ref_id], map: "ix_departments_ref_id")
|
|
@@index([ref_int], map: "ix_departments_ref_int")
|
|
@@index([updated_at], map: "ix_departments_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model duties {
|
|
users_default_duty Int?
|
|
company_id Int
|
|
company_uu_id String @db.VarChar
|
|
duties_id Int
|
|
duties_uu_id String @db.VarChar
|
|
department_id Int
|
|
department_uu_id String @db.VarChar
|
|
management_duty Boolean? @default(false)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_duties_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
departments departments @relation(fields: [department_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
duty_duties_duties_idToduty duty @relation("duties_duties_idToduty", fields: [duties_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
duty_duties_users_default_dutyToduty duty? @relation("duties_users_default_dutyToduty", fields: [users_default_duty], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
relationship_duty_company relationship_duty_company[]
|
|
relationship_duty_people relationship_duty_people[]
|
|
staff staff[]
|
|
|
|
@@unique([company_id, duties_id, department_id], map: "duty_ndx_00")
|
|
@@index([created_at], map: "ix_duties_created_at")
|
|
@@index([cryp_uu_id], map: "ix_duties_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_duties_ref_id")
|
|
@@index([ref_int], map: "ix_duties_ref_int")
|
|
@@index([updated_at], map: "ix_duties_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model duty {
|
|
duty_name String @unique @db.VarChar
|
|
duty_code String @db.VarChar
|
|
duty_description String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_duty_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
duties_duties_duties_idToduty duties[] @relation("duties_duties_idToduty")
|
|
duties_duties_users_default_dutyToduty duties[] @relation("duties_users_default_dutyToduty")
|
|
|
|
@@index([created_at], map: "ix_duty_created_at")
|
|
@@index([cryp_uu_id], map: "ix_duty_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_duty_ref_id")
|
|
@@index([ref_int], map: "ix_duty_ref_int")
|
|
@@index([updated_at], map: "ix_duty_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model employee_history {
|
|
staff_id Int
|
|
staff_uu_id String @db.VarChar
|
|
people_id Int
|
|
people_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_employee_history_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
people people @relation(fields: [people_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
staff staff @relation(fields: [staff_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([people_id, staff_id], map: "_employee_history_ndx_00")
|
|
@@index([created_at], map: "ix_employee_history_created_at")
|
|
@@index([cryp_uu_id], map: "ix_employee_history_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_employee_history_ref_id")
|
|
@@index([ref_int], map: "ix_employee_history_ref_int")
|
|
@@index([updated_at], map: "ix_employee_history_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model employee_salaries {
|
|
gross_salary Decimal @db.Decimal(20, 6)
|
|
net_salary Decimal @db.Decimal(20, 6)
|
|
people_id Int
|
|
people_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_employee_salaries_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
people people @relation(fields: [people_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([people_id, expiry_starts], map: "_employee_salaries_ndx_00")
|
|
@@index([created_at], map: "ix_employee_salaries_created_at")
|
|
@@index([cryp_uu_id], map: "ix_employee_salaries_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_employee_salaries_ref_id")
|
|
@@index([ref_int], map: "ix_employee_salaries_ref_int")
|
|
@@index([updated_at], map: "ix_employee_salaries_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model employees {
|
|
staff_id Int
|
|
staff_uu_id String @db.VarChar
|
|
people_id Int?
|
|
people_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_employees_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
application2employee application2employee[]
|
|
application2employee_extra application2employee_extra[]
|
|
people people? @relation(fields: [people_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
staff staff @relation(fields: [staff_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
event2employee event2employee[]
|
|
event2employee_extra event2employee_extra[]
|
|
part2employee part2employee[]
|
|
relationship_employee2build relationship_employee2build[]
|
|
relationship_employee2postcode relationship_employee2postcode[]
|
|
|
|
@@unique([people_id, staff_id], map: "employees_ndx_00")
|
|
@@index([created_at], map: "ix_employees_created_at")
|
|
@@index([cryp_uu_id], map: "ix_employees_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_employees_ref_id")
|
|
@@index([ref_int], map: "ix_employees_ref_int")
|
|
@@index([updated_at], map: "ix_employees_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model endpoint_restriction {
|
|
operation_uu_id String @unique @db.VarChar
|
|
endpoint_function String @default("") @db.VarChar
|
|
endpoint_name String @default("") @db.VarChar
|
|
endpoint_method String @default("") @db.VarChar
|
|
endpoint_desc String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_endpoint_restriction_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
events events[]
|
|
|
|
@@unique([operation_uu_id, endpoint_method, endpoint_name], map: "idx_endpoint_restriction_operation_uu_id")
|
|
@@index([created_at], map: "ix_endpoint_restriction_created_at")
|
|
@@index([cryp_uu_id], map: "ix_endpoint_restriction_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_endpoint_restriction_ref_id")
|
|
@@index([ref_int], map: "ix_endpoint_restriction_ref_int")
|
|
@@index([updated_at], map: "ix_endpoint_restriction_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model event2employee {
|
|
employee_id Int
|
|
employee_uu_id String @db.VarChar
|
|
event_service_id Int
|
|
event_service_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_event2employee_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
employees employees @relation(fields: [employee_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
services services @relation(fields: [event_service_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([employee_id, event_service_id], map: "event2employee_employee_to_event")
|
|
@@index([created_at], map: "ix_event2employee_created_at")
|
|
@@index([cryp_uu_id], map: "ix_event2employee_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_event2employee_ref_id")
|
|
@@index([ref_int], map: "ix_event2employee_ref_int")
|
|
@@index([updated_at], map: "ix_event2employee_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model event2employee_extra {
|
|
employee_id Int
|
|
employee_uu_id String @db.VarChar
|
|
event_id Int
|
|
event_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_event2employee_extra_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
employees employees @relation(fields: [employee_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
events events @relation(fields: [event_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([employee_id, event_id], map: "event2employee_extra_employee_to_event")
|
|
@@index([created_at], map: "ix_event2employee_extra_created_at")
|
|
@@index([cryp_uu_id], map: "ix_event2employee_extra_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_event2employee_extra_ref_id")
|
|
@@index([ref_int], map: "ix_event2employee_extra_ref_int")
|
|
@@index([updated_at], map: "ix_event2employee_extra_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model event2occupant {
|
|
build_living_space_id Int
|
|
build_living_space_uu_id String @db.VarChar
|
|
event_service_id Int
|
|
event_service_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_event2occupant_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_living_space build_living_space @relation(fields: [build_living_space_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
services services @relation(fields: [event_service_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([build_living_space_id, event_service_id], map: "event2occupant_bind_event_to_occupant")
|
|
@@index([created_at], map: "ix_event2occupant_created_at")
|
|
@@index([cryp_uu_id], map: "ix_event2occupant_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_event2occupant_ref_id")
|
|
@@index([ref_int], map: "ix_event2occupant_ref_int")
|
|
@@index([updated_at], map: "ix_event2occupant_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model event2occupant_extra {
|
|
build_living_space_id Int
|
|
build_living_space_uu_id String @db.VarChar
|
|
event_id Int
|
|
event_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_event2occupant_extra_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_living_space build_living_space @relation(fields: [build_living_space_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
events events @relation(fields: [event_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([build_living_space_id, event_id], map: "event2occupant_extra_bind_event_to_occupant")
|
|
@@index([created_at], map: "ix_event2occupant_extra_created_at")
|
|
@@index([cryp_uu_id], map: "ix_event2occupant_extra_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_event2occupant_extra_ref_id")
|
|
@@index([ref_int], map: "ix_event2occupant_extra_ref_int")
|
|
@@index([updated_at], map: "ix_event2occupant_extra_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model events {
|
|
function_code String @unique @db.VarChar
|
|
function_class String @db.VarChar
|
|
description String @default("") @db.VarChar
|
|
property_description String @default("") @db.VarChar
|
|
marketing_layer Int? @default(3) @db.SmallInt
|
|
cost Decimal @default(0.00) @db.Decimal(20, 2)
|
|
unit_price Decimal @default(0.00) @db.Decimal(20, 2)
|
|
endpoint_code String @db.VarChar
|
|
endpoint_id Int?
|
|
endpoint_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_events_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
event2employee_extra event2employee_extra[]
|
|
event2occupant_extra event2occupant_extra[]
|
|
endpoint_restriction endpoint_restriction? @relation(fields: [endpoint_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
module_price module_price[]
|
|
services2events services2events[]
|
|
|
|
@@index([created_at], map: "ix_events_created_at")
|
|
@@index([cryp_uu_id], map: "ix_events_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_events_ref_id")
|
|
@@index([ref_int], map: "ix_events_ref_int")
|
|
@@index([updated_at], map: "ix_events_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model module_price {
|
|
campaign_code String @db.VarChar
|
|
module_id Int
|
|
module_uu_id String @db.VarChar
|
|
service_id Int
|
|
service_uu_id String @db.VarChar
|
|
event_id Int
|
|
event_uu_id String @db.VarChar
|
|
is_counted_percentage Decimal @default(0.00) @db.Decimal(6, 2)
|
|
discounted_price Decimal @default(0.00) @db.Decimal(20, 2)
|
|
calculated_price Decimal @default(0.00) @db.Decimal(20, 2)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_module_price_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
events events @relation(fields: [event_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
modules modules @relation(fields: [module_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
services services @relation(fields: [service_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_module_price_created_at")
|
|
@@index([cryp_uu_id], map: "ix_module_price_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_module_price_ref_id")
|
|
@@index([ref_int], map: "ix_module_price_ref_int")
|
|
@@index([updated_at], map: "ix_module_price_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model modules {
|
|
module_name String @db.VarChar
|
|
module_description String @default("") @db.VarChar
|
|
module_code String @db.VarChar
|
|
module_layer Int
|
|
is_default_module Boolean? @default(false)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_modules_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
module_price module_price[]
|
|
services services[]
|
|
|
|
@@index([created_at], map: "ix_modules_created_at")
|
|
@@index([cryp_uu_id], map: "ix_modules_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_modules_ref_id")
|
|
@@index([ref_int], map: "ix_modules_ref_int")
|
|
@@index([updated_at], map: "ix_modules_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model occupant_types {
|
|
occupant_type String @db.VarChar
|
|
occupant_description String @default("") @db.VarChar
|
|
occupant_code String @default("") @db.VarChar
|
|
occupant_category String @default("") @db.VarChar
|
|
occupant_category_type String @default("") @db.VarChar
|
|
// function_retriever String @default("") @db.VarChar
|
|
user_type_id Int?
|
|
user_type_uu_id String? @db.VarChar
|
|
occupant_is_unique Boolean @default(false)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_occupant_types_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
build_decision_book_person_occupants build_decision_book_person_occupants[]
|
|
build_living_space build_living_space[]
|
|
build_management build_management[]
|
|
user_types user_types? @relation(fields: [user_type_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_occupant_types_created_at")
|
|
@@index([cryp_uu_id], map: "ix_occupant_types_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_occupant_types_ref_id")
|
|
@@index([ref_int], map: "ix_occupant_types_ref_int")
|
|
@@index([updated_at], map: "ix_occupant_types_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model part2employee {
|
|
build_id Int
|
|
part_id Int
|
|
employee_id Int
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_part2employee_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
employees employees @relation(fields: [employee_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build_parts build_parts @relation(fields: [part_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([employee_id, part_id], map: "_part2employee_ndx_00")
|
|
@@index([created_at], map: "ix_part2employee_created_at")
|
|
@@index([cryp_uu_id], map: "ix_part2employee_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_part2employee_ref_id")
|
|
@@index([ref_int], map: "ix_part2employee_ref_int")
|
|
@@index([updated_at], map: "ix_part2employee_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model people {
|
|
firstname String @db.VarChar
|
|
surname String @db.VarChar(24)
|
|
middle_name String @default("") @db.VarChar
|
|
sex_code String @db.VarChar(1)
|
|
person_ref String @default("") @db.VarChar
|
|
person_tag String @default("") @db.VarChar
|
|
father_name String @default("") @db.VarChar
|
|
mother_name String @default("") @db.VarChar
|
|
country_code String @default("TR") @db.VarChar(4)
|
|
national_identity_id String @unique(map: "person_ndx_001") @default("") @db.VarChar
|
|
birth_place String @default("") @db.VarChar
|
|
birth_date DateTime @default(dbgenerated("'1900-01-01 00:00:00+00'::timestamp with time zone")) @db.Timestamptz(6)
|
|
tax_no String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_people_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
birthname String? @db.VarChar
|
|
account_codes account_codes[]
|
|
account_records_account_records_approving_accounting_personTopeople account_records[] @relation("account_records_approving_accounting_personTopeople")
|
|
account_records_account_records_customer_idTopeople account_records[] @relation("account_records_customer_idTopeople")
|
|
account_records_account_records_send_person_idTopeople account_records[] @relation("account_records_send_person_idTopeople")
|
|
build_decision_book_items_unapproved build_decision_book_items_unapproved[]
|
|
build_decision_book_legal_build_decision_book_legal_mediator_lawyer_person_idTopeople build_decision_book_legal[] @relation("build_decision_book_legal_mediator_lawyer_person_idTopeople")
|
|
build_decision_book_legal_build_decision_book_legal_resp_attorney_idTopeople build_decision_book_legal[] @relation("build_decision_book_legal_resp_attorney_idTopeople")
|
|
build_decision_book_person_build_decision_book_person_person_idTopeople build_decision_book_person[] @relation("build_decision_book_person_person_idTopeople")
|
|
build_decision_book_person_build_decision_book_person_vicarious_person_idTopeople build_decision_book_person[] @relation("build_decision_book_person_vicarious_person_idTopeople")
|
|
build_iban_description build_iban_description[]
|
|
build_living_space build_living_space[]
|
|
build_person_providing build_person_providing[]
|
|
contracts contracts[]
|
|
credentials credentials[]
|
|
employee_history employee_history[]
|
|
employee_salaries employee_salaries[]
|
|
employees employees[]
|
|
relationship_duty_people relationship_duty_people[]
|
|
users users[]
|
|
|
|
@@index([created_at], map: "ix_people_created_at")
|
|
@@index([cryp_uu_id], map: "ix_people_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_people_ref_id")
|
|
@@index([ref_int], map: "ix_people_ref_int")
|
|
@@index([updated_at], map: "ix_people_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model relationship_duty_company {
|
|
owner_id Int
|
|
duties_id Int
|
|
member_id Int
|
|
parent_id Int?
|
|
relationship_type String? @default("Commercial") @db.VarChar
|
|
child_count Int
|
|
show_only Boolean @default(false)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_relationship_duty_company_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
duties duties @relation(fields: [duties_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_relationship_duty_company_member_idTocompanies companies @relation("relationship_duty_company_member_idTocompanies", fields: [member_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_relationship_duty_company_owner_idTocompanies companies @relation("relationship_duty_company_owner_idTocompanies", fields: [owner_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
companies_relationship_duty_company_parent_idTocompanies companies? @relation("relationship_duty_company_parent_idTocompanies", fields: [parent_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([duties_id, owner_id, member_id, relationship_type], map: "_company_relationship_ndx_01")
|
|
@@index([created_at], map: "ix_relationship_duty_company_created_at")
|
|
@@index([cryp_uu_id], map: "ix_relationship_duty_company_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_relationship_duty_company_ref_id")
|
|
@@index([ref_int], map: "ix_relationship_duty_company_ref_int")
|
|
@@index([updated_at], map: "ix_relationship_duty_company_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model relationship_duty_people {
|
|
company_id Int
|
|
duties_id Int
|
|
member_id Int
|
|
relationship_type String? @default("Employee") @db.VarChar
|
|
show_only Boolean @default(false)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_relationship_duty_people_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
companies companies @relation(fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
duties duties @relation(fields: [duties_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
people people @relation(fields: [member_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([company_id, duties_id, member_id, relationship_type], map: "person_relationship_ndx_01")
|
|
@@index([created_at], map: "ix_relationship_duty_people_created_at")
|
|
@@index([cryp_uu_id], map: "ix_relationship_duty_people_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_relationship_duty_people_ref_id")
|
|
@@index([ref_int], map: "ix_relationship_duty_people_ref_int")
|
|
@@index([updated_at], map: "ix_relationship_duty_people_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model relationship_employee2build {
|
|
company_id Int
|
|
employee_id Int
|
|
member_id Int
|
|
relationship_type String? @default("Employee") @db.VarChar
|
|
show_only Boolean @default(false)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_relationship_employee2build_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
companies companies @relation(fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
employees employees @relation(fields: [employee_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
build build @relation(fields: [member_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@unique([company_id, employee_id, member_id, relationship_type], map: "relationship_build_employee_ndx_00")
|
|
@@index([created_at], map: "ix_relationship_employee2build_created_at")
|
|
@@index([cryp_uu_id], map: "ix_relationship_employee2build_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_relationship_employee2build_ref_id")
|
|
@@index([ref_int], map: "ix_relationship_employee2build_ref_int")
|
|
@@index([updated_at], map: "ix_relationship_employee2build_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model relationship_employee2postcode {
|
|
company_id Int?
|
|
employee_id Int
|
|
member_id Int
|
|
relationship_type String? @default("Employee") @db.VarChar
|
|
show_only Boolean @default(false)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_relationship_employee2postcode_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
companies companies? @relation(fields: [company_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
employees employees @relation(fields: [employee_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
address_postcode address_postcode @relation(fields: [member_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_relationship_employee2postcode_created_at")
|
|
@@index([cryp_uu_id], map: "ix_relationship_employee2postcode_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_relationship_employee2postcode_ref_id")
|
|
@@index([ref_int], map: "ix_relationship_employee2postcode_ref_int")
|
|
@@index([updated_at], map: "ix_relationship_employee2postcode_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model services {
|
|
module_id Int
|
|
module_uu_id String @db.VarChar
|
|
service_name String @db.VarChar
|
|
service_description String @default("") @db.VarChar
|
|
service_code String? @db.VarChar
|
|
related_responsibility String @default("") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_services_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
application2employee application2employee[]
|
|
application2occupant application2occupant[]
|
|
event2employee event2employee[]
|
|
event2occupant event2occupant[]
|
|
module_price module_price[]
|
|
modules modules @relation(fields: [module_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
services2applications services2applications[]
|
|
services2events services2events[]
|
|
|
|
@@index([created_at], map: "ix_services_created_at")
|
|
@@index([cryp_uu_id], map: "ix_services_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_services_ref_id")
|
|
@@index([ref_int], map: "ix_services_ref_int")
|
|
@@index([updated_at], map: "ix_services_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model services2applications {
|
|
application_id Int
|
|
application_uu_id String @db.VarChar
|
|
service_id Int
|
|
service_uu_id String @db.VarChar
|
|
application_code String @db.VarChar
|
|
site_url String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_services2applications_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
applications applications @relation(fields: [application_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
services services @relation(fields: [service_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_services2applications_created_at")
|
|
@@index([cryp_uu_id], map: "ix_services2applications_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_services2applications_ref_id")
|
|
@@index([ref_int], map: "ix_services2applications_ref_int")
|
|
@@index([updated_at], map: "ix_services2applications_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model services2events {
|
|
service_id Int
|
|
service_uu_id String @db.VarChar
|
|
event_id Int
|
|
event_uu_id String @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_services2events_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
events events @relation(fields: [event_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
services services @relation(fields: [service_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_services2events_created_at")
|
|
@@index([cryp_uu_id], map: "ix_services2events_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_services2events_ref_id")
|
|
@@index([ref_int], map: "ix_services2events_ref_int")
|
|
@@index([updated_at], map: "ix_services2events_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model staff {
|
|
staff_description String @default("") @db.VarChar
|
|
staff_name String @db.VarChar
|
|
staff_code String @db.VarChar
|
|
duties_id Int
|
|
duties_uu_id String @db.VarChar
|
|
// function_retriever String @default("") @db.VarChar
|
|
user_type_id Int?
|
|
user_type_uu_id String? @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_staff_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
employee_history employee_history[]
|
|
employees employees[]
|
|
duties duties @relation(fields: [duties_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
user_types user_types? @relation(fields: [user_type_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_staff_created_at")
|
|
@@index([cryp_uu_id], map: "ix_staff_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_staff_ref_id")
|
|
@@index([ref_int], map: "ix_staff_ref_int")
|
|
@@index([updated_at], map: "ix_staff_updated_at")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model users {
|
|
user_tag String @default("") @db.VarChar(64)
|
|
user_type String @default("employee") @db.VarChar(32)
|
|
email String @default("") @db.VarChar(128)
|
|
phone_number String @default("") @db.VarChar
|
|
via String @default("111") @db.VarChar
|
|
avatar String @default("") @db.VarChar
|
|
hash_password String @default("") @db.VarChar(256)
|
|
password_token String @default("") @db.VarChar(256)
|
|
remember_me Boolean @default(false)
|
|
password_expires_day Int @default(30)
|
|
password_expiry_begins DateTime @default(now()) @db.Timestamptz(6)
|
|
related_company String @db.VarChar
|
|
person_id Int
|
|
person_uu_id String @default("") @db.VarChar
|
|
local_timezone String? @default("GMT+3") @db.VarChar
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_users_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
default_language String @default("tr") @db.VarChar
|
|
ref_int Int?
|
|
credentials credentials[]
|
|
people people @relation(fields: [person_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
users_tokens users_tokens[]
|
|
domain_data domain_data[] @relation("UserDomainData")
|
|
|
|
@@index([created_at], map: "ix_users_created_at")
|
|
@@index([cryp_uu_id], map: "ix_users_cryp_uu_id")
|
|
@@index([email], map: "ix_users_email")
|
|
@@index([person_uu_id], map: "ix_users_person_uu_id")
|
|
@@index([phone_number], map: "ix_users_phone_number")
|
|
@@index([ref_id], map: "ix_users_ref_id")
|
|
@@index([ref_int], map: "ix_users_ref_int")
|
|
@@index([updated_at], map: "ix_users_updated_at")
|
|
@@index([user_tag], map: "ix_users_user_tag")
|
|
}
|
|
|
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
model users_tokens {
|
|
user_id Int
|
|
token_type String @default("RememberMe") @db.VarChar(16)
|
|
token String @default("") @db.VarChar
|
|
domain String @default("") @db.VarChar
|
|
expires_at DateTime @db.Timestamptz(6)
|
|
ref_id String? @db.VarChar(100)
|
|
replication_id Int @default(0) @db.SmallInt
|
|
cryp_uu_id String? @db.VarChar
|
|
created_credentials_token String? @db.VarChar
|
|
updated_credentials_token String? @db.VarChar
|
|
confirmed_credentials_token String? @db.VarChar
|
|
is_confirmed Boolean @default(false)
|
|
deleted Boolean @default(false)
|
|
active Boolean @default(true)
|
|
is_notification_send Boolean @default(false)
|
|
is_email_send Boolean @default(false)
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "ix_users_tokens_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
expiry_starts DateTime @default(now()) @db.Timestamptz(6)
|
|
expiry_ends DateTime @default(now()) @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
ref_int Int?
|
|
users users @relation(fields: [user_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
|
|
@@index([created_at], map: "ix_users_tokens_created_at")
|
|
@@index([cryp_uu_id], map: "ix_users_tokens_cryp_uu_id")
|
|
@@index([ref_id], map: "ix_users_tokens_ref_id")
|
|
@@index([ref_int], map: "ix_users_tokens_ref_int")
|
|
@@index([updated_at], map: "ix_users_tokens_updated_at")
|
|
}
|
|
|
|
model password_history {
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "password_history_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
userUUID String @map("user_uuid") @db.Uuid
|
|
password String @db.VarChar
|
|
old_password_first String @db.VarChar
|
|
old_password_first_modified_at DateTime @db.Timestamptz(6)
|
|
old_password_second String @db.VarChar
|
|
old_password_second_modified_at DateTime @db.Timestamptz(6)
|
|
old_password_third String @db.VarChar
|
|
old_password_third_modified_at DateTime @db.Timestamptz(6)
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
|
|
@@index([created_at], map: "ix_password_history_created_at")
|
|
@@index([uu_id], map: "idx_password_history_uu_id")
|
|
@@index([updated_at], map: "ix_password_history_updated_at")
|
|
}
|
|
|
|
model domain_data {
|
|
id Int @id @default(autoincrement())
|
|
uu_id String @unique(map: "domain_data_uu_id") @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
userUUID String @map("user_uuid") @db.Uuid
|
|
otherDomainsList String[] @map("other_domains_list")
|
|
mainDomain String? @map("main_domain")
|
|
modifiedAt Float @map("modified_at")
|
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
users users @relation("UserDomainData", fields: [userUUID], references: [uu_id], onDelete: NoAction, onUpdate: NoAction, map: "domain_data_users_fkey")
|
|
|
|
@@index([created_at], map: "ix_domain_data_created_at")
|
|
@@index([uu_id], map: "idx_domain_data_uu_id")
|
|
@@index([updated_at], map: "ix_domain_data_updated_at")
|
|
}
|
|
|
|
enum tabledefs {
|
|
PKEY_INTERNAL
|
|
PKEY_EXTERNAL
|
|
FKEYS_INTERNAL
|
|
FKEYS_EXTERNAL
|
|
COMMENTS
|
|
FKEYS_NONE
|
|
INCLUDE_TRIGGERS
|
|
NO_TRIGGERS
|
|
}
|