150 lines
4.9 KiB
Plaintext
150 lines
4.9 KiB
Plaintext
/// 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 invoice {
|
|
id BigInt @id @default(autoincrement())
|
|
date_orig BigInt?
|
|
process_status Int? @db.TinyInt
|
|
billing_status Int? @db.TinyInt
|
|
refund_status Int? @db.TinyInt
|
|
print_status Int? @db.TinyInt
|
|
account_id BigInt?
|
|
total_amt Float?
|
|
billed_amt Float?
|
|
due_date BigInt?
|
|
notes String? @db.MediumText
|
|
template_message String? @db.MediumText
|
|
email_status Int? @db.TinyInt
|
|
working_order String? @db.VarChar(64)
|
|
correction Int @default(0) @db.TinyInt
|
|
ppa_charge Int @default(0) @db.TinyInt
|
|
credit_code_id Int @default(0) @db.TinyInt
|
|
|
|
@@index([account_id], map: "account_id")
|
|
@@index([billing_status], map: "billing_status")
|
|
@@index([date_orig], map: "date_orig")
|
|
@@index([refund_status], map: "refund_status")
|
|
}
|
|
|
|
/// 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 invoice_bk {
|
|
id BigInt @id @default(autoincrement())
|
|
date_orig BigInt?
|
|
process_status Int? @db.TinyInt
|
|
billing_status Int? @db.TinyInt
|
|
refund_status Int? @db.TinyInt
|
|
print_status Int? @db.TinyInt
|
|
account_id BigInt?
|
|
total_amt Float?
|
|
billed_amt Float?
|
|
due_date BigInt?
|
|
notes String? @db.MediumText
|
|
template_message String? @db.MediumText
|
|
email_status Int? @db.TinyInt
|
|
working_order String? @db.VarChar(64)
|
|
correction Int @default(0) @db.TinyInt
|
|
ppa_charge Int @default(0) @db.TinyInt
|
|
credit_code_id Int @default(0) @db.TinyInt
|
|
|
|
@@index([account_id], map: "account_id")
|
|
@@index([billing_status], map: "billing_status")
|
|
@@index([date_orig], map: "date_orig")
|
|
@@index([refund_status], map: "refund_status")
|
|
}
|
|
|
|
model invoice_call {
|
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
date BigInt @db.UnsignedBigInt
|
|
number String @db.VarChar(10)
|
|
amount Float
|
|
}
|
|
|
|
model invoice_item {
|
|
id BigInt @id @default(autoincrement())
|
|
service_id BigInt?
|
|
invoice_id BigInt?
|
|
sku String? @db.VarChar(128)
|
|
quantity Float @default(0)
|
|
product_name String? @db.VarChar(512)
|
|
unitary_price Float?
|
|
nosub Boolean @default(false)
|
|
delivery_name String? @db.VarChar(32)
|
|
|
|
@@index([invoice_id], map: "invoice_id")
|
|
}
|
|
|
|
model invoice_item_bk {
|
|
id BigInt @id @default(autoincrement())
|
|
service_id BigInt?
|
|
invoice_id BigInt?
|
|
sku String? @db.VarChar(128)
|
|
quantity Float @default(0)
|
|
product_name String? @db.VarChar(512)
|
|
unitary_price Float?
|
|
nosub Boolean @default(false)
|
|
delivery_name String? @db.VarChar(32)
|
|
|
|
@@index([invoice_id], map: "invoice_id")
|
|
}
|
|
|
|
model invoice_msg_template {
|
|
id BigInt @id @default(autoincrement())
|
|
name String? @db.VarChar(32)
|
|
message String? @db.MediumText
|
|
}
|
|
|
|
model invoice_tax {
|
|
id BigInt @id @default(autoincrement())
|
|
invoice_id BigInt?
|
|
tax_name String? @db.VarChar(128)
|
|
tax_description String? @db.VarChar(128)
|
|
tax_rate Float?
|
|
amount Float?
|
|
|
|
@@index([invoice_id], map: "invoice_id")
|
|
}
|
|
|
|
model invoice_tax_bk {
|
|
id BigInt @id @default(autoincrement())
|
|
invoice_id BigInt?
|
|
tax_name String? @db.VarChar(128)
|
|
tax_description String? @db.VarChar(128)
|
|
tax_rate Float?
|
|
amount Float?
|
|
|
|
@@index([invoice_id], map: "invoice_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 accord_paiement {
|
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
account_id Int @db.UnsignedInt
|
|
date_accord BigInt
|
|
date_echeance BigInt
|
|
date_coupure BigInt @db.UnsignedBigInt
|
|
raison_changement String? @db.Text
|
|
montant Decimal @db.Decimal(10, 2)
|
|
method Int @default(0) @db.UnsignedTinyInt
|
|
ferie Boolean @default(false)
|
|
note String? @db.Text
|
|
status Int @default(-1) @db.TinyInt
|
|
staff_id Int @default(1) @db.UnsignedInt
|
|
date_create String @db.VarChar(16)
|
|
|
|
@@index([account_id], map: "account_id")
|
|
}
|
|
|
|
model autologin {
|
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
token String @db.VarChar(32)
|
|
date String @db.VarChar(16)
|
|
staff Int @db.UnsignedInt
|
|
}
|
|
|
|
model statement {
|
|
id BigInt @id @default(autoincrement())
|
|
date BigInt?
|
|
type String? @db.VarChar(2)
|
|
number BigInt?
|
|
reference String? @db.MediumText
|
|
amt Float?
|
|
paid_amt Float?
|
|
} |