final_type.go 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package final
  2. import (
  3. "zhiyuan/pkg/db"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type FinalType struct {
  7. ID int64 `json:"id" prop:"add:false"`
  8. Name string `json:"name" label:"类别名称" type:"string" prop:"add edit" search:"like"`
  9. WorkTypeId int64 `json:"work_type_id" label:"工种" type:"int" prop:"edit" search:"="`
  10. WorkTypeIds string `json:"work_type_ids" label:"工种" type:"string" prop:"edit"`
  11. LivingProportion int64 `json:"living_proportion" type:"int" prop:"edit" default:"0"`
  12. LivingCount int64 `json:"living_count" type:"int" prop:"edit" default:"0"`
  13. LivingSettlement int64 `json:"living_settlement" type:"int" prop:"edit" default:"0" search:"="`
  14. Settlement int64 `json:"settlement" type:"int" prop:"edit" default:"0" search:"="`
  15. SettleChange int64 `json:"settle_change" type:"int" prop:"edit" default:"0" search:"="`
  16. CalcValue string `json:"calc_value" type:"string" prop:"edit" default:"" search:"="`
  17. AuxiliaryId int64 `json:"auxiliary_id" type:"int" prop:"edit" default:"0" search:"="`
  18. Deduct int64 `json:"deduct" type:"int" prop:"edit" default:"0" search:"="`
  19. Remark int64 `json:"remark" type:"int" prop:"edit" default:"0" search:"="`
  20. State int64 `json:"state" type:"int" prop:"edit" default:"0" search:"="`
  21. DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
  22. CreatedAt int64 `json:"created_at" prop:"add:false"`
  23. UpdatedAt int64 `json:"updated_at" prop:"add:false"`
  24. db.BaseModel
  25. }
  26. func (FinalType) TableName() string {
  27. return "zy_final_type"
  28. }
  29. func (FinalType) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
  30. return true
  31. }
  32. func (FinalType) OnePrivilege(c *gin.Context, id int64) bool {
  33. return true
  34. }
  35. func (FinalType) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
  36. return nil
  37. }
  38. func (FinalType) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
  39. return nil
  40. }
  41. func (FinalType) DelPrivilege(c *gin.Context, id int64) error {
  42. return nil
  43. }
  44. func (FinalType) Page() bool {
  45. return false
  46. }
  47. func (FinalType) Count() bool {
  48. return true
  49. }
  50. func (model FinalType) LeftJoin(data map[string]interface{}, s *db.Select) []db.JoinModel {
  51. return []db.JoinModel{}
  52. }