github.com/hy3/cuto@v0.9.8-0.20160830082821-aa6652f877b7/db/jobnetdto.go (about)

     1  // Copyright 2015 unirita Inc.
     2  // Created 2015/04/10 shanxia
     3  
     4  package db
     5  
     6  import "os"
     7  
     8  // ジョブネットワーク実行結果
     9  type JobNetworkResult struct {
    10  	ID         int    // ジョブネットワークのインシデントID
    11  	JobnetWork string // ジョブネットワーク名
    12  	StartDate  string // 起動日時
    13  	EndDate    string // 終了日時
    14  	Status     int    // ジョブネットワークのステータス
    15  	Detail     string // 詳細メッセージ
    16  	PID        int    // masterのPID
    17  	CreateDate string // 作成日時
    18  	UpdateDate string // 更新日時
    19  }
    20  
    21  // ジョブネットワーク実行結果のコンストラクタ。
    22  //
    23  // param : jobnetName ジョブネットワーク名。
    24  //
    25  // param : startDate ジョブネットワーク起動日時。
    26  //
    27  // param : status ステータス。
    28  //
    29  // return : JobNetworkResultポインタ
    30  func NewJobNetworkResult(jobnetName string, startDate string, status int) *JobNetworkResult {
    31  	return &JobNetworkResult{
    32  		JobnetWork: jobnetName,
    33  		StartDate:  startDate,
    34  		Status:     status,
    35  		PID:        os.Getpid(),
    36  	}
    37  }