fix(erp): 修复费用类型定义和出差开始时间字段命名问题
- 修正 ExpenseType 常量定义中的类型错误,从 PaymentType 改为 ExpenseType - 在 ExpenseItem 结构体中添加 Type 字段用于费用类型标识 - 修正出差开始时间字段名从 TraveStartAt 改为 TravelStartAt,统一结构体和数据库字段命名 - 更新相关 JSON 标签以保持字段映射一致性
This commit is contained in:
@@ -167,6 +167,6 @@ const (
|
||||
type ExpenseType = int64
|
||||
|
||||
const (
|
||||
ExpenseTypeNormal PaymentType = 1 // 普通费用
|
||||
ExpenseTypeTrave PaymentType = 2 // 差旅费
|
||||
ExpenseTypeNormal ExpenseType = 1 // 普通费用
|
||||
ExpenseTypeTrave ExpenseType = 2 // 差旅费
|
||||
)
|
||||
|
||||
@@ -47,6 +47,7 @@ type ExpenseCount struct {
|
||||
}
|
||||
type ExpenseItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Type int64 `json:"type"`
|
||||
ExpenseSerial string `json:"expenseSerial"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
@@ -96,7 +97,7 @@ type ExpenseAdd struct {
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
TravelStaffIds []int64 // 出差员工
|
||||
TraveStartAt *time.Time // 出差开始日期
|
||||
TravelStartAt *time.Time // 出差开始日期
|
||||
TravelEndAt *time.Time // 出差结束日期
|
||||
TravelLocation string // 地点
|
||||
TravelReason string // 出差事由
|
||||
@@ -126,7 +127,7 @@ type ReplyExpenseInfo struct {
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
TravelStaffIds []int64 `json:"travelStaffIds"`
|
||||
TraveStartAt *time.Time `json:"traveStartAt"`
|
||||
TravelStartAt *time.Time `json:"travelStartAt"`
|
||||
TravelEndAt *time.Time `json:"travelEndAt"`
|
||||
TravelLocation string `json:"travelLocation"`
|
||||
TravelReason string `json:"travelReason"`
|
||||
|
||||
Reference in New Issue
Block a user