12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- package final
- import (
- "fmt"
- "zhiyuan/pkg/db"
- "github.com/gin-gonic/gin"
- )
- type FinalSupplierPunishDeduction struct {
- ID int64 `json:"id" prop:"add:false"`
- SupplierId int64 `json:"supplierId" label:"材料商ID" type:"int" prop:"add" search:"="`
- PunishId int64 `json:"punishId" label:"处罚ID" type:"int" prop:"add" search:"="`
- SettleId int64 `json:"settleId" label:"结算ID" type:"int" prop:"add" search:"="`
- Amount float64 `json:"amount" label:"金额" type:"float" prop:"add" default:"0" search:"="`
- DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
- CreatedAt int64 `json:"created_at" prop:"add:false"`
- UpdatedAt int64 `json:"updated_at" prop:"add:false"`
- db.BaseModel
- }
- func (FinalSupplierPunishDeduction) TableName() string {
- return "zy_final_supplier_punish_deduction"
- }
- func (FinalSupplierPunishDeduction) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
- return true
- }
- func (FinalSupplierPunishDeduction) OnePrivilege(c *gin.Context, id int64) bool {
- return true
- }
- func (FinalSupplierPunishDeduction) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
- return nil
- }
- func (FinalSupplierPunishDeduction) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
- return nil
- }
- func (FinalSupplierPunishDeduction) DelPrivilege(c *gin.Context, id int64) error {
- return nil
- }
- func (FinalSupplierPunishDeduction) Page() bool {
- return false
- }
- func (FinalSupplierPunishDeduction) Count() bool {
- return true
- }
- func (FinalSupplierPunishDeduction) LeftJoin(data map[string]interface{}, s *db.Select) []db.JoinModel {
- return []db.JoinModel{}
- }
- type FinalSupplierPunishDeductionMobile struct {
- Explain string `json:"explain" type:"string" prop:"select:punish.explain"`
- FinalSupplierPunishDeduction
- }
- func (model FinalSupplierPunishDeductionMobile) GroupBy() string {
- return fmt.Sprintf("`%s`.`id`", model.TableName())
- }
- func (model FinalSupplierPunishDeductionMobile) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
- return model.FinalSupplierPunishDeduction.ListPrivilege(c, data, s)
- }
- func (model FinalSupplierPunishDeductionMobile) LeftJoin(data map[string]interface{}, s *db.Select) []db.JoinModel {
- return append(model.FinalSupplierPunishDeduction.LeftJoin(data, s), db.JoinModel{
- Model: FinalSupplierPunish{},
- As: "punish",
- On: []string{
- fmt.Sprintf("`punish`.`id` = `%s`.`punishId`", model.TableName()),
- },
- })
- }
|