初始版本,目前线上可用

This commit is contained in:
2025-11-19 12:49:16 +08:00
commit cb7f1c45e8
178 changed files with 30336 additions and 0 deletions

View File

@@ -0,0 +1,143 @@
import { Entity, Column, Index } from "typeorm";
import { BaseEntity } from "@/abstrClass/BaseEntity";
import dayjs from "dayjs";
@Entity("deceased_retail")
export class DeceasedRetail extends BaseEntity {
@Index()
@Column("int", {
name: "deceased_id",
comment: "逝者ID",
default: 0,
})
deceasedId: number;
@Column("varchar", {
name: "deceased_name",
comment: "购买人",
length: 255,
default: "",
})
deceasedName: string;
@Column("varchar", {
name: "buyer",
comment: "购买人",
length: 255,
default: "",
})
buyer: string;
@Column("datetime", {
name: "purchase_date",
comment: "录单日期",
default: () => "CURRENT_TIMESTAMP", // 默认值为当前时间
transformer: {
to(value: Date) {
return value;
},
from(value) {
return dayjs(new Date(value)).format("YYYY-MM-DD HH:mm:ss");
},
},
})
purchaseDate: Date;
@Column("datetime", {
name: "checkout_date",
comment: "录单日期",
default: () => "CURRENT_TIMESTAMP", // 默认值为当前时间
transformer: {
to(value: Date) {
return value;
},
from(value) {
return dayjs(new Date(value)).format("YYYY-MM-DD HH:mm:ss");
},
},
})
checkoutDate: Date;
@Column("varchar", {
name: "handler",
comment: "经办人",
length: 255,
default: "",
})
handler: string;
@Column("decimal", {
name: "sales_amount",
comment: "销售金额",
precision: 10,
scale: 2,
default: 0.0,
})
salesAmount: number;
@Column("varchar", {
name: "guide",
comment: "引导员",
length: 255,
default: "",
})
guide: string;
@Column("varchar", {
name: "service_items",
comment: "服务项目列表",
})
serviceItems: string;
// 0未结账、1已结账
@Column("int", {
name: "retail_state",
comment: "结账状态",
default: 0,
})
retailState: number;
// 0正常、1已作废
@Column("int", {
name: "cancel_state",
comment: "作废状态",
default: 0,
})
cancelState: number;
// 0服务单、1有逝者零售单 2 无逝者零售单
@Column("int", {
name: "retail_type",
comment: "单子类型",
default: 0,
})
retailType: number;
//无逝者零售单
@Column("varchar", {
name: "family_name",
comment: "购买人",
length: 255,
default: "",
})
familyName: string;
@Column("varchar", {
name: "family_phone",
comment: "购买人电话",
length: 255,
default: 0,
})
familyPhone: string;
@Column({ comment: "所在省", default: "" })
province: string; // 所在省
@Column({ comment: "所在市", default: "" })
city: string; // 所在市
@Column({ comment: "所在区域", default: "" })
area: string; // 所在区域
@Column({ comment: "详细地址", default: "" })
address: string; // 详细地址
}
export default DeceasedRetail;