forked from free-lancers/electricity_bill_calc_service
feat(withdraw):完成公示撤回及审核相关的功能。
This commit is contained in:
@@ -26,3 +26,23 @@ type Park struct {
|
||||
func (Park) TableName() string {
|
||||
return "park"
|
||||
}
|
||||
|
||||
type ParkSimplified struct {
|
||||
Id string `xorm:"varchar(120) pk not null" json:"id"`
|
||||
UserId string `xorm:"varchar(120) not null" json:"userId"`
|
||||
Name string `xorm:"varchar(70) not null" json:"name"`
|
||||
Abbr *string `xorm:"varchar(50)" json:"abbr"`
|
||||
Area decimal.NullDecimal `xorm:"numeric(14,2)" json:"area"`
|
||||
TenementQuantity decimal.NullDecimal `xorm:"numeric(8,0)" json:"tenement"`
|
||||
Capacity decimal.NullDecimal `xorm:"numeric(16,2)" json:"capacity"`
|
||||
Category int8 `xorm:"smallint not null" json:"category"`
|
||||
SubmeterType int8 `xorm:"'meter_04kv_type' smallint not null" json:"meter04kvType"`
|
||||
Region *string `xorm:"varchar(10)" json:"region"`
|
||||
Address *string `xorm:"varchar(120)" json:"address"`
|
||||
Contact *string `xorm:"varchar(100)" json:"contact"`
|
||||
Phone *string `xorm:"varchar(50)" json:"phone"`
|
||||
}
|
||||
|
||||
func (ParkSimplified) TableName() string {
|
||||
return "park"
|
||||
}
|
||||
|
@@ -60,3 +60,29 @@ func (p *ParkNewestReport) AfterLoad() {
|
||||
p.Report = nil
|
||||
}
|
||||
}
|
||||
|
||||
type ReportIndexSimplified struct {
|
||||
Id string `xorm:"varchar(120) pk not null" json:"id"`
|
||||
ParkId string `xorm:"varchar(120) not null" json:"parkId"`
|
||||
Period time.Time `xorm:"date not null" json:"period" time_format:"simple_date" time_location:"shanghai"`
|
||||
StepState Steps `xorm:"text not null json" json:"stepState"`
|
||||
Published bool `xorm:"bool not null default false" json:"published"`
|
||||
PublishedAt *time.Time `xorm:"timestampz" json:"publishedAt" time_format:"simple_datetime" time_location:"shanghai"`
|
||||
Withdraw int8 `xorm:"smallint not null default 0" json:"withdraw"`
|
||||
LastWithdrawAppliedAt *time.Time `xorm:"timestampz" json:"lastWithdrawAppliedAt" time_format:"simple_datetime" time_location:"shanghai"`
|
||||
LastWithdrawAuditAt *time.Time `xorm:"timestampz" json:"lastWithdrawAuditAt" time_format:"simple_datetime" time_location:"shanghai"`
|
||||
}
|
||||
|
||||
func (ReportIndexSimplified) TableName() string {
|
||||
return "report"
|
||||
}
|
||||
|
||||
type JoinedReportForWithdraw struct {
|
||||
Report ReportIndexSimplified `xorm:"extends" json:"report"`
|
||||
Park ParkSimplified `xorm:"extends" json:"park"`
|
||||
User UserDetailSimplified `xorm:"extends" json:"user"`
|
||||
}
|
||||
|
||||
func (JoinedReportForWithdraw) TableName() string {
|
||||
return "report"
|
||||
}
|
||||
|
@@ -44,3 +44,17 @@ type FullJoinedUserDetail struct {
|
||||
func (FullJoinedUserDetail) TableName() string {
|
||||
return "user_detail"
|
||||
}
|
||||
|
||||
type UserDetailSimplified struct {
|
||||
Id string `xorm:"varchar(120) pk not null" json:"-"`
|
||||
Name *string `xorm:"varchar(100)" json:"name"`
|
||||
Abbr *string `xorm:"varchar(50)" json:"abbr"`
|
||||
Region *string `xorm:"varchar(10)" json:"region"`
|
||||
Address *string `xorm:"varchar(120)" json:"address"`
|
||||
Contact *string `xorm:"varchar(100)" json:"contact"`
|
||||
Phone *string `xorm:"varchar(50)" json:"phone"`
|
||||
}
|
||||
|
||||
func (UserDetailSimplified) TableName() string {
|
||||
return "user_detail"
|
||||
}
|
||||
|
Reference in New Issue
Block a user