You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

cloudmodel_gen.go 2.5 kB

2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Code generated by goctl. DO NOT EDIT.
  2. package model
  3. import (
  4. "context"
  5. "database/sql"
  6. "strings"
  7. "github.com/zeromicro/go-zero/core/stores/builder"
  8. "github.com/zeromicro/go-zero/core/stores/sqlx"
  9. "github.com/zeromicro/go-zero/core/stringx"
  10. )
  11. var (
  12. cloudFieldNames = builder.RawFieldNames(&Cloud{})
  13. cloudRows = strings.Join(cloudFieldNames, ",")
  14. cloudRowsExpectAutoSet = strings.Join(stringx.Remove(cloudFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), ",")
  15. cloudRowsWithPlaceHolder = strings.Join(stringx.Remove(cloudFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), "=?,") + "=?"
  16. )
  17. type (
  18. cloudModel interface {
  19. Insert(ctx context.Context, data *Cloud) (sql.Result, error)
  20. FindOne(ctx context.Context, id int64) (*Cloud, error)
  21. FindOneByNamespaceNameServiceName(ctx context.Context, namespace sql.NullString, name sql.NullString, serviceName sql.NullString) (*Cloud, error)
  22. Update(ctx context.Context, data *Cloud) error
  23. Delete(ctx context.Context, id int64) error
  24. }
  25. defaultCloudModel struct {
  26. conn sqlx.SqlConn
  27. table string
  28. }
  29. Cloud struct {
  30. Id int64 `db:"id"` // id
  31. TaskId int64 `db:"task_id"` // 任务id
  32. ParticipantId int64 `db:"participant_id"` // 集群静态信息id
  33. ApiVersion string `db:"api_version"`
  34. Name string `db:"name"` // 名称
  35. Namespace string `db:"namespace"` // 命名空间
  36. Kind string `db:"kind"` // 种类
  37. Status string `db:"status"` // 状态
  38. StartTime string `db:"start_time"` // 开始时间
  39. RunningTime int64 `db:"running_time"` // 运行时长
  40. CreatedBy int64 `db:"created_by"` // 创建人
  41. CreatedTime sql.NullTime `db:"created_time"` // 创建时间
  42. UpdatedBy int64 `db:"updated_by"` // 更新人
  43. UpdatedTime sql.NullTime `db:"updated_time"` // 更新时间
  44. DeletedFlag int64 `db:"deleted_flag"` // 是否删除(0-否,1-是)
  45. YamlString string `db:"yaml_string"`
  46. Result string `db:"result"`
  47. }
  48. )
  49. func newCloudModel(conn sqlx.SqlConn) *defaultCloudModel {
  50. return &defaultCloudModel{
  51. conn: conn,
  52. table: "`cloud`",
  53. }
  54. }
  55. func (m *defaultCloudModel) tableName() string {
  56. return m.table
  57. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.