func (wo *WorkOrder) FromRows(rows *sql.Rows) error {
	var scanwo struct {
		ID           int
		CreateTime   sql.NullTime
		UpdateTime   sql.NullTime
		Name         sql.NullString
		Status       sql.NullString
		Priority     sql.NullString
		Description  sql.NullString
		OwnerName    sql.NullString
		InstallDate  sql.NullTime
		CreationDate sql.NullTime
		Assignee     sql.NullString
		Index        sql.NullInt64
	}
	// the order here should be the same as in the `workorder.Columns`.
	if err := rows.Scan(
		&scanwo.ID,
		&scanwo.CreateTime,
		&scanwo.UpdateTime,
		&scanwo.Name,
		&scanwo.Status,
		&scanwo.Priority,
		&scanwo.Description,
		&scanwo.OwnerName,
		&scanwo.InstallDate,
		&scanwo.CreationDate,
		&scanwo.Assignee,
		&scanwo.Index,
	); err != nil {
		return err
	}
	wo.ID = strconv.Itoa(scanwo.ID)
	wo.CreateTime = scanwo.CreateTime.Time
	wo.UpdateTime = scanwo.UpdateTime.Time
	wo.Name = scanwo.Name.String
	wo.Status = scanwo.Status.String
	wo.Priority = scanwo.Priority.String
	wo.Description = scanwo.Description.String
	wo.OwnerName = scanwo.OwnerName.String
	wo.InstallDate = scanwo.InstallDate.Time
	wo.CreationDate = scanwo.CreationDate.Time
	wo.Assignee = scanwo.Assignee.String
	wo.Index = int(scanwo.Index.Int64)
	return nil
}
// FromRows scans the sql response data into WorkOrder.
FromRows scans the sql response data into WorkOrder.
// FromRows scans the sql response data into WorkOrder .
func (wo *WorkOrder) FromRows(rows *sql.Rows) error {
	var scanwo struct {
		ID           int
		CreateTime   sql.NullTime
		UpdateTime   sql.NullTime
		Name         sql.NullString
		Status       sql.NullString
		Priority     sql.NullString
		Description  sql.NullString
		OwnerName    sql.NullString
		InstallDate  sql.NullTime
		CreationDate sql.NullTime
		Assignee     sql.NullString
		Index        sql.NullInt64
	}
	if err := rows.Scan(
		&scanwo.ID,
		&scanwo.CreateTime,
		&scanwo.UpdateTime,
		&scanwo.Name,
		&scanwo.Status,
		&scanwo.Priority,
		&scanwo.Description,
		&scanwo.OwnerName,
		&scanwo.InstallDate,
		&scanwo.CreationDate,
		&scanwo.Assignee,
		&scanwo.Index,
	); err != nil {
		return err
	}
	wo.ID = strconv.Itoa(scanwo.ID)
	wo.CreateTime = scanwo.CreateTime.Time
	wo.UpdateTime = scanwo.UpdateTime.Time
	wo.Name = scanwo.Name.String
	wo.Status = scanwo.Status.String
	wo.Priority = scanwo.Priority.String
	wo.Description = scanwo.Description.String
	wo.OwnerName = scanwo.OwnerName.String
	wo.InstallDate = scanwo.InstallDate.Time
	wo.CreationDate = scanwo.CreationDate.Time
	wo.Assignee = scanwo.Assignee.String
	wo.Index = int(scanwo.Index.Int64)
	return nil
}
func ( wo * WorkOrder ) FromRows ( rows * sql . Rows ) error { var scanwo struct { ID int CreateTime sql . NullTime UpdateTime sql . NullTime Name sql . NullString Status sql . NullString Priority sql . NullString Description sql . NullString OwnerName sql . NullString InstallDate sql . NullTime CreationDate sql . NullTime Assignee sql . NullString Index sql . NullInt64 } if err := rows . Scan ( & scanwo . ID , & scanwo . CreateTime , & scanwo . UpdateTime , & scanwo . Name , & scanwo . Status , & scanwo . Priority , & scanwo . Description , & scanwo . OwnerName , & scanwo . InstallDate , & scanwo . CreationDate , & scanwo . Assignee , & scanwo . Index , ) ; err != nil { return err } wo . ID = strconv . Itoa ( scanwo . ID ) wo . CreateTime = scanwo . CreateTime . Time wo . UpdateTime = scanwo . UpdateTime . Time wo . Name = scanwo . Name . String wo . Status = scanwo . Status . String wo . Priority = scanwo . Priority . String wo . Description = scanwo . Description . String wo . OwnerName = scanwo . OwnerName . String wo . InstallDate = scanwo . InstallDate . Time wo . CreationDate = scanwo . CreationDate . Time wo . Assignee = scanwo . Assignee . String wo . Index = int ( scanwo . Index . Int64 ) return nil }
FromRows scans the sql response data into WorkOrder.
FromRows scans the sql response data into WorkOrder .
// the order here should be the same as in the `workorder.Columns`.